Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

magento custom form on product page

I'm new to Magento, and i need some conceptual guide and/or references. I need to create custom form that will be a part of product-info page (at it's bottom) and that will collect user input (email, size, color). Only some product will have this feature/form (it's up to admin). So, goal of this form will be to email store-admin about a product that is available in stock but not in wished size and/or color. Should i customize existing Contact us form or should i create fresh custom form in new module?
Form should submit data to admin via email along with name of the product.

like image 225
maljukan Avatar asked Nov 05 '22 07:11

maljukan


1 Answers

Ok, so first create a .phtml file under app/design/frontend/[namespace]/[theme]/template/catalog/product/send_request.phtml

then, add this .phtml file reference in catalog.xml in /app/design/frontend/[namespace]/[theme]/layout/catalog.xml

<block type="core/template" name="customer_request" template="catalog/product/send_request.phtml"/>

below the : <label>Catalog Product View (Any)</label>

section but you should find to right section where to place ( you will find after a few try )

Finally, add your php logic into send_request.phtml file. The form contain that you implemented in send_request.phtml will available under product view page.

like image 108
Oğuz Çelikdemir Avatar answered Nov 09 '22 12:11

Oğuz Çelikdemir