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

Dynamically Changing Values in eCart Object

Thread began 11/08/2011 2:32 pm by martin400112 | Last modified 11/09/2011 9:59 am by martin400112 | 548 views | 1 replies

Jason ByrnesWebAssist

It would need to be done using a database.

to get started with dynamic discount codes see this thread:

to apply the discounts to a specific manufacturer, you would need to set up the products table to have a column for manufacturer, and set the eCart object to have a column for manufacturer as well, so that when a product is added to the cart, the manufacturer is added along with it.

Your discounts table would also need to have a column for the manufacturer. this column would need to be stored in a session variable so it could be used in the trigger for the coupon. For the sake of example, lets say the session is named "manufacturer"

to set the discount up, use the trigger "Number of items with a specific column value":
If the total number of items where "manufacturer" has a value of "$_SESSION['manufacturer']" is ">" a value of "0"

The calculation would depend on how the discount should be applied, but you would use the PromoAmount session variable

tying the discount to specific products is a little more difficult. do you want to be able to apply more than one discount to to a product? for example, should discount a be able to apply product a, c, d and discount b apply to product a, b, d. with product a and d being a member of both discounts, or will each product only be able to belong to one discount?

if each product can only apply to one discount, the you would need a discountID column in the products table. This column will store the discount associated to it.

you also need a discountID column in the cart Object and set the add to cart buttons to store this value in the cart.

when the lookup recordset is creating the session variables, store the couponID from the coupon table into another session.

from here the process is similar to manufacturers. use the "Number of items with a specific column value" trigger and use the couponID session for comparison.

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...