close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Tricky discount calculation

Thread began 12/03/2009 4:12 pm by phil353198 | Last modified 12/07/2009 11:36 am by CraigR | 1217 views | 2 replies |

phil353198

Tricky discount calculation

I'm not having much luck implementing a discount.

We would like to offer a discount of 'every 2nd item at half price'. Item could be the same product or a different product. We have only 10 products if that helps.

Any clues on how to go about this using PHP?

Sign in to reply to this post

Eric Mittman

This is definitely a tricky calculation or discount to implement. One way that I can think of doing this would be to have a calculation to identify every other item. You could then use the subtotal of the items that have this column value to discount by half.

The tricky part is coming up with the calculation. Since there is no easy way to determine what 'every other item' in the cart is you would need to come up with this logic. If you are up to the challenge I would suggest that you start out in the WA_eCart_Definition file in the WA_eCart folder. In here you can get a feel for how you can get at values and manipulate the data that is in the cart. Implementing this feature though would be completely custom.

Sign in to reply to this post

CraigRBeta Tester

3 for 2 discount

i did this calculation a few months ago, (with a bit of help from Eric).

if you are familiar with creating arrays in php, i may be able to offer some help.

Here is the link to the original post

showthread.php?t=618

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