close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Multiple Dynamic Options....

Thread began 9/04/2015 7:43 am by codamedia | Last modified 9/04/2015 1:17 pm by Ray Borduin | 225 views | 1 replies |


Multiple Dynamic Options....

I've read both the "dynamic options" tutorials... and although they work perfectly fine - they are not what I would call dynamic. Sure - the options can be added to the database, but each option "name, price diff and weight diff" needs to be manually added to the eCart Object in order to be recognized.

So - rather than manually setting up color(text), size(text), sizePriceDiff, sizeWeightDiff, colorPriceDiff etc... I figured - why not create re-usable containers in the eCart Object that all options can use. That way the the option is truly dynamic and can be any name and price change as needed.

So far, so good.... now the problem.
Even if I have 3 or 4 options on a product, only one of those (the last one) makes it to the containers in the eCart Object

Is there another tutorial I am missing? If not - would I do this using arrays, or is there an easy solution I am overlooking?

Sign in to reply to this post


Quick update to say I have solved this problem...

1: From the product page, Option ID's are submitted as an array
2: I "implode" the Array, and use that (with IN) for my option value lookup
3: My option value lookup sums the prices differences to a value, and sums the weight differences to a value
4: Option names are saved as a comma list.

In the eCart Object there are just three containers that hold all the necessary data.... Name (which takes the comma list from #4), priceDiff, and weightDiff.... both from the calculations in #3.

The benefit of this method is that you don't have to create an eCart Object for each option... It allows for unlimited options per product, and all options can be managed from the database alone.

If there is a caveat to this that I am missing, please feel free to point it out. Or.... if there was an easier method that I overlooked - I'm open to that as well!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...