close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Create dynamic discounted items

Thread began 7/13/2010 7:04 am by sandy259886 | Last modified 7/14/2010 5:01 pm by Eric Mittman | 1081 views | 3 replies |

sandy259886

Create dynamic discounted items

I want to create a dynamic discount based on specific item numbers. I have set up a db table to hold 3 variables ... The item number and the Discount Code and the percentage of the discount.

Here's my question:
How do I get eCart to run through a loop checking each record to see if the item is in the cart and applying the correct discount?

I can create a separate rule for each item, but that has become cumbersome. Any help is greatly appreciated

Sign in to reply to this post

Eric Mittman

The discount and charge rules do not work like this. If you wanted to do it like this with a recordset it will be a custom implementation. You can only work with static values or session variables in a discount or charge rule.

If you setup these values so that they are added to the cart you could potentially use subtotals for the various columns to create the discount but each product having it's own discount percentage would not be something that would be easily handled.

If you are up to the custom approach you could add in a cart loop to your cart page before the display and have the recordset inline in the loop. You could then use the current item id as the filtering value for the recordset and do the calculation for the discount on a per item basis and store the result in one or more session variables. You could then use this session variable or variables in your discount rule to apply the discount to the cart.

Sign in to reply to this post

sandy259886

thanks

Doing an inline loop sounds like the right way to go. Thanks.

Sign in to reply to this post

Eric Mittman

Your welcome, let us know if you have any other questions.

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

Content

rating

Layout

rating

Ease of use

rating

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