close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Discounts in eCart

Thread began 5/24/2009 9:18 pm by duncanc213061 | Last modified 6/08/2009 1:02 pm by duncanc213061 | 2511 views | 19 replies |

duncanc213061

Discounts in eCart

I have a customer who is selling products, and he wants to sell six of a specific item, and only that item, for $15.00, and any additional (>6) he wants to sell for 10.00.

Can't for the life of me figure out the discount merchandising rule.

Thank you in advance.

Sign in to reply to this post

Ray BorduinWebAssist

Add Columns to the cart: DiscountMin and DiscountAmount

In this case set them to 6 and 5 respectively.

Then update the calculation:
TotalPrice = [Price] * [Quantity] - (([Quantity]>[DiscountMin])?([Quantity]-[DiscountMin])*[DiscountAmount]:0)

Sign in to reply to this post

duncanc213061

Discounts in eCart

Would I not be able to apply the discounts in the discounts rules in the cart, because there are other items with varying multiples.

Thanks, Duncan

Sign in to reply to this post

Ray BorduinWebAssist

The example I gave would allow you to have different multiples for each item.

If you want to use a discount rule instead then add the columns just as I have asked, but don't update the TotalPrice, instead add a new calculation:

TotalDiscount = (([Quantity]>[DiscountMin])?([Quantity]-[DiscountMin])*[DiscountAmount]:0)

Then you can add a discount rule to subtract the total of the TotalDiscount calculation from the cart total.

Sign in to reply to this post

duncanc213061

Discounts in eCart

I have tried what you said by adding the two columns, and adding the calculations.

The calculations are: [Price] * [Quantity] -(([Quantity]>[DiscountMin])?([Quantity]-[DiscountMin])*[DiscountAmount], and now I am getting this error:

Error Type:
Microsoft VBScript compilation (0x800A0408)
Invalid character
/drbirdie/WA_eCart/birdie_VB.asp, line 180, column 89
itmObj.TotalPrice = itmObj.Price * itmObj.Quantity -((itmObj.Quantity>itmObj.DiscountMin)?(itmObj.Quantity-itmObj.DiscountMin)*itmObj.DiscountAmount'c
----------------------------------------------------------------------------------------^

Additionally, do I need to set anything else in the rules to make this work properly?

Duncan

Sign in to reply to this post

Ray BorduinWebAssist

I gave you the php answer... in vbscript it would be:

[Price] * [Quantity] -(abs([Quantity]>[DiscountMin])*([Quantity]-[DiscountMin])*[DiscountAmount])

Sign in to reply to this post

duncanc213061

Discounts in eCart

Ray:

Thanks, that did the trick!!

Now one final how to:
I have two items, Golf Club A, and Golf Club B, both are 119.00, but I want a discount of 10.00 if a person wants to buy one of A and one of B.

Thanks,

Duncan

Sign in to reply to this post

Ray BorduinWebAssist

Add a discount rule if both Item A and item B are in the cart give them $10 discount.

Sign in to reply to this post

duncanc213061

Discounts in cart

I have tried to work through the discounts, but am unsuccessful on a major one:

VBScript

I added the two columns as you said, and I now want to show the discount on the summary cart.
When I do the discounts, it takes a discount for ALL of the golf clubs, and not just for any quantity over 6 clubs.

The trigger is:
Number of items with price of 46.17 > 6

Calculation is:

Subtotal of DiscountAmount times 1 minus 0

Si is stands to reason that if a customer orders 8 clubs, the discount shoud be 36.34, but the discount is that shows is 145.36

Sign in to reply to this post

Ray BorduinWebAssist

It looks like DiscountAmount must be calculated improperly. What did you use in the calculation for DiscountAmount?

Sign in to reply to this post
loading

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