form inside shop product

appetals's picture
appetals
Thu, 03/31/2016 - 05:01
#1
form inside shop product

Hi,

We are using MD Commerce and we have setup the products without "Add to Cart" option.
We currently want users to have a "Make an Enquiry" form for each product instead of 'Add to Cart".

Let us know the option for enabling the same.

phuonght's picture
phuonght
Fri, 04/01/2016 - 05:01

Hi,

You can embed form instead of printing Cart by replace code print "Add to cart" with

$block = module_invoke('webform','block','view','webform-id');
print $block['content'];

webform-id: ID of webform "Make an Enquiry". 

appetals's picture
appetals
Fri, 04/01/2016 - 05:06

ok and in which file we need to do this change?

phuonght's picture
phuonght
Fri, 04/01/2016 - 05:34

Which product page you would like to create form?

phuonght's picture
phuonght
Fri, 04/01/2016 - 05:47

So you can find it in sites\all\themes\md_make\templates\node\product\node--shop-product.tpl.php.

phuonght's picture
phuonght
Mon, 04/04/2016 - 03:15

You can follow comment #2 in file sites\all\themes\md_make\templates\node\product\node--shop-product.tpl.php to replace option "add to cart" with your own form. 

And about your form, you need to create by yourself but we can not help.

Thank you. 

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.