Prices varies by total order weight

Thread began 2/10/2011 11:56 pm by info4753 | Last modified 2/15/2011 7:02 am by Jason Byrnes | 1777 views | 9 replies |

2/10/2011 11:56 pm  |  #1 info4753

Prices varies by total order weight

Our customer has products with 3 different prices, based on the total weight of the order. If the total weight of the order is below 1000kg, I have to use the normal price, between 1000 and 3000 kg use price with the first discount, over 3000 price with use the second discount. The discounts are based on the products themselves not on any categories. Each product has its own price and discount prices.

Example:

Product1 has
Price1 (under 1000kg total order): 100 CHF
Price2 (more than 1000kg total order): 95 CHF - Discount 5 CHF
Price3 more (more than 3000kg total order): 90 CHF - Discount 10 CHF

Product2 has
Price1 (under 1000kg total order): 105 CHF
Price2 (more than 1000kg total order): 95 CHF - Discount 10 CHF
Price3 more (more than 3000kg total order): 90 CHF - Discount 15 CHF

etc...

I guess the best way to start would be to add the two discounts as two fields in the product table with values of (for Product1) discountPrice2: CHF 5 and discountPrice3: CHF 10.

I tried to find a suitable trigger and corresponding calculation but can't find a way to go.
Or can I chance the prices in the cart on thy fly when the total weight excees 1000kg?

How do I solve this problem?

Thanks for any help in advance.

2/11/2011 7:14 am  |  #2 Jason ByrnesWebAssist

add 2 new columns to the eCart object:

dicount1
discount2

on the calculations tab, add to new calculations:
totalDiscount1:
[discount1] * [Quantity]

totalDiscount2:
[discount2] * [Quantity]

Next On the discount tab, create 2 discounts:
Name: 1000kg - 3000kg

Triggers:
Subtotal For Any Column:
If the subtotal for column 'Total Weight' is '>' a value of '1000'

AND
Subtotal For Any Column:
If the subtotal for column 'Total Weight' is '<=' a value of '3000'

Calculation:
Column Subtotal:
Subtotal of Column 'totalDiscount1' 'plus '0'

Name: over 3000kg

Triggers:
Subtotal For Any Column:
If the subtotal for column 'Total Weight' is '>' a value of '3000'

Calculation:
Column Subtotal:
Subtotal of Column 'totalDiscount2' 'plus '0'

in the add to cart button for each product, set the Price Column to the regular price. Set the discount1 column to the discount for the second weight break (i.e. 5 for product 1, 10 for product 2), and set discount2 to the discount amount for the third weight break (i.e. 10 for product 1, 15 for products 2)

2/11/2011 8:15 am  |  #3 info4753

Thx Jason, I will give a try ... :-)

you're welcome.

2/13/2011 1:39 am  |  #5 info4753

It's not working. The discount are not beeing calculated. Maybe this is a "number" / "currency" problem?

Also, totalWeight seems to be summarized on each cartItem row, but it should be summarized by the total of all the cart items rows.

I guess I need a CartTotalWeight. How do I realize this?

2/14/2011 8:15 am  |  #6 Jason ByrnesWebAssist

Send me a copy of the eCart include file and a link where i can see the problem.

2/14/2011 1:44 pm  |  #7 info4753

artikel.php?PRODID=44
artikel.php?PRODID=43

Shopping cart:

warenkorb.php

Attached Files
WA_eCart.zip

2/14/2011 1:55 pm  |  #8 Jason ByrnesWebAssist

In the discount rules, you have selected the wrong column for the discount calcualtion.

You should be using the totalColumn1 and totlacolumn2 column totals for the discount, instead, the rules are configured to use the totalDiscount1000 and totalDiscount3000 columns

2/14/2011 11:16 pm  |  #9 info4753

Thanks again, now it works. I've also had to change the weight range to 1000 - 2999.

:)

2/15/2011 7:02 am  |  #10 Jason ByrnesWebAssist

you;re welcome, glad to hear it is working.

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.

Everything else!

Close Window

Account or customer service questions?

Need technical support?

Content

Layout

Ease of use

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 Window

We were unable to retrieve the attached file

Close Window

Attach and remove files

• Text Formatting
• Insert Element
• Block Formatting
• Cancel
Close Window

Close Window

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