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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Prices varies by total order weight

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

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.

Sign in to reply to this post

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)

Sign in to reply to this post

info4753

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

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

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?

Sign in to reply to this post

Jason ByrnesWebAssist

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

Sign in to reply to this post

info4753

Add products to cart:

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

Shopping cart:

warenkorb.php

Attached Files
WA_eCart.zip
Sign in to reply to this post

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

Sign in to reply to this post

info4753

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

:)

Sign in to reply to this post

Jason ByrnesWebAssist

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

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