close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Question about database structure and eCart discounts

Thread began 2/16/2011 6:16 am by Nathon Jones Web Design | Last modified 2/17/2011 5:54 am by Nathon Jones Web Design | 1890 views | 9 replies

CraigRBeta Tester

Ok then, thinking off the top of my head...

its the size that you need to use in your discount calculation.

you need to add a column for size to your ecart object, so when you have items in the cart array, you can use this to determine how many of each size you have.

presuming all plants are the same price, and that you can mix and match any combination of plants...

take 15-29 plants

the pseudo logic would be

if the number of size 'plug' is greater than or equal to 15 and less than 30, then apply a flat rate discount of 0.15 * the number of size 'plug'

so for 20 plugs, the overall discount would be 0.15 * 20 (£3.00), which equates to £1.00 per unit

Repeat...

This will give 18 discount rules which, once set up, will work fine, but take more effort to maintain if the values change regularly, or if the customer needs to have conrol over the discounts.

In this instance, you could store the discounts in a database table and interrogate this instead, but i'll leave that for now.

Hope this helps

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