How can I display field data from the "CUSTOMERS" table on to the confirmation page (page after "Add to Cart" button is clicked)?
Zen Cart 1.3.8 (fresh install)
How can I display field data from the "CUSTOMERS" table on to the confirmation page (page after "Add to Cart" button is clicked)?
Zen Cart 1.3.8 (fresh install)
Created a text input field as one of the product attributes used for personalizing an item. How can I pre-fill these fields with data from $_SESSION['customer_first_name'], $_SESSION['customer_last_name'], etc.? Looked into tpl_product_info_display, tpl_modules_attributes.php and attributes.php but not sure how to do it as I'm limited with PHP codings. Any help is appreciated.
I created a few text input fields as product attributes used for personalizing an item. Is there a way to pre-fill these fields with data from fields in CUSTOMERS table(eg. first and last name)? Looked into tpl_product_info_display, tpl_modules_attributes.php and attributes.php but not sure how to do it as I'm limited with PHP codings. I've seen something similar (pre-filling first/last name, tel num) was done on the CONTACT US page. However I really cant' figure out which files to modify for the attributes. Any help is appreciated.
/includes/modules/your_template/attributes.php would be the place to insert the text prefilling functionality. The text option code is built starting at line 388, and added to the output accumulator arrays at line 509.
got it to work finally. Thanks!!
That's good to know! Would you mind sharing how you did it? It would be a big help to others wanting the same thing.
Just wondering if the solution was ever posted anywhere? I have exactly the same requirement, to copy customer data and pre-populate some product attributes.