Wednesday, 11 September 2013

Getting Product name and code to Contact form

Getting Product name and code to Contact form

I have added two fields in the contact form.
Product Name:
Product Code:
I have a pre-order button on the product page so all products that is 0
quantity will have this button enabled. When the user click this button
they will be redirected to the contact form.
<a
href="http://localhost/store/index.php?route=information/contact"><button>Pre-Order</button></a>
Now How do i Autofill the Product Name and Product Code input in the
Contact form when the user click on the Pre-Order button on the product
page?
Sample Scenario:
Customer is browsing on the product Lenovo Motherboard with Product code:
LV032, But he finds out that this product is out of stock and Pre-Order is
only the available option. So he clicks on the Pre-Order button then
customer is redirected to the contact form with the product name and
product code fields already filled with the Name and Code of the Product
that the customer want's to pre-order.
EDIT:
I got a working solution using sessions on the product page then using the
session on the contact form. Please advise if I'm doing a right thing.

No comments:

Post a Comment