How to add new field to the cart form?


Here's a short guide on how to add a new field to the cart form and as an example we'll add the 'address' field to the form.

  1. Open your HTML file.
  2. Search for the "products-form-block" class.
  3. Add the 'address' input like shown in the ​screenshot, please use a unique 'name' attribute, without space, we'll use this name later to identify this input within the PHP file.
  4. Open the 'sendmail.php' file and fetch the data from the address filed like shown in the ​screenshot.
  5. Inject the information from the input to the email template like shown in the screenshot.
  6. Open the 'mail/mail.html' file.
  7. Copy one table row and change the row's title and the row's value like shown in the screenshot.
Tags: add, cart, filed, form

Last update:
2016-02-29 10:45
Author:
Vlad Sargu
Revision:
1.0
Average rating:0 (0 Votes)