Buddypress messages


first of all, i apologize for not posting into the right category but i really do not know how to find this answer.

I am using marketpress and buddypress to sell online products, and for some products instead of the “buy now” button, i want a “contact the vendor” button. I want this button to open a div bloc containing the “compose form” from buddypress and i want the recipient field to be pre-filled.

At present, i’ve been able to do this by using the following hack (everything displays well) but for some reason, it does not succeed in sending the messages :

echo ‘<div>’



$compose_page = ob_get_clean();

echo $compose_page;

echo ‘</div>’

Do you have any idea how i could achieve that ?

Thanks !