0

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 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.