How can I create a "bundled" group of products with options that are added to the cart as a single object?
The short version of what I am trying to do: (please also see diagram)
- Bundle, or "kit" of products that are selected in steps. A main item, associated items and their options.
- Some items are a choice in a category. A minimum of one must be selected.
- Some items will have options. Some options will affect price.
- Lastly, combine the items as a group (single object), when added to cart.
I realize this isn't a supported eCart feature. And I don't expect a full step by step tutorial, but if you can point me in the right direction, that would really help.
What I have tried so far:
Adding multiple items with checkboxes using eCart & DA Search. This works fine but adds individual items which are independent of each other.
I also tried posting the selected items to a second page and stringing the details together into a hidden field which then would be used to bind to the "Add To Cart" behavior. My thought here was that I could create a single object from the previous page and then create an "Add To Cart" behavior from there.
This isn't completely working for me because the options and option prices are not getting posted to the page.
I have several tables setup as relationships between the Products table and the Options tables. And my JOINS contain all of the data for the products including prices, options, etc.
All the tables and joins work fine on individual products and the items that have "price affecting options" work by passing the id from the select. Here, I created a recordset just for Prices. It's filtered by both the ProductID and the $_POST['os1'] and bound to price in the "Add To Cart".
I created 2 versions of the "os1" form fields. They are Shown or not, based on if their "OptionTitle" is NULL. So if an item has an option, the "OptionTitle" won't be NULL and the "os1" Select drop down is presented and used to pass the ID for that option. If an item has no option, then a hidden field for "os1" is used and it has the ID for that price.