I wanted to change all add to cart button to open a Popup contact form which will be pre-filled with product details and send the email to the admin.
1 Answer
You need to create pop ownself.I will give you how to call contacts us form at product view page by below code
<?php $this->getLayout()->getCreateBlock('catalog/product_view')
->setFormAction( Mage::getUrl('cotacts/index/post') )->setTemplate('contacts/productform.phtml')->toHtml(); ?>
Here I create a template file productform.phtml
which is replicate of default contacts>form.phtml file
.
On your productform.phtml
file you can get product data by
<?php
// get full model
$_product = $this->getProduct();
echo $_product->getName();
?>
Now you can update your form basic of above details.