Zen Follower
- Join Date:
- Oct 2007
- Posts:
- 385
- Plugin Contributions:
- 0
Creating a Form to Help Customers Choose Products
I am trying to create a form that will help my customers choose products to buy. So, I created a simple form in HTML and had the variables post to a PHP file. The PHP file is filled with a bunch of if-statements and echoes the products that they should buy based on the responses provided on the form. It all works nicely!
But, integrating it into Zen Cart is giving me fits. I have two problems:
-
I can add the form using EZ-PAGES. I can add the PHP script by adding another define page. But, I can't get the variables to pass from the EZ-PAGE form to the Define Page PHP Script. They pass fine when I use the same code outside of Zen Cart.
-
I would like to present some product choices based on the form they filled out and then give customers the option to add these products to their cart. I can figure out how to add one product to a cart: just link to /index.php?main_page=index&action=buy_now&products_id=(PRODUCT_ID HERE)
But, I can't figure out how to do this with multiple products. I'd like to provide checkboxes next to each product, and if they are checked, they will get added to their cart when clicking a submit button.
Any help would be greatly appreciated!
Thanks!