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

Discounts on unigue items

Thread began 8/13/2014 10:19 am by jon392819 | Last modified 8/13/2014 3:10 pm by Jason Byrnes | 1460 views | 13 replies |

jon392819

Discounts on unigue items

Hi Guys, cant work this out. I have thousands of products. We want to offer a percentage discount on each unique item in the cart based on the qty of that unique item. Not the combined qty of the cart.

Imagine the cart has3 items in it.

if item one has a qty of 5 or more the price of the item is discounted by 5%

If item 2 only has a qty of one its price is not discounted

If item 3 has a qty of over 10 its price per item is discounted by 10%

We are looking to discount every item individually based on their qty in the cart.

I was hoping to create a rule that said something like, get the count of each each unique id in cart, if over 5 apply a discount of 5%

Is this possible. Thanks

Jon

Sign in to reply to this post

Jason ByrnesWebAssist

on the calculations tab, create a new calculation as:

discountAmount
(abs([Quantity] >= 5 && [Quantity] < 10)?[Price] * 0.05:0) + (abs([Quantity] >= 5 && [Quantity] < 10)?[Price] * 0.1:0)


then on the discount tab, create a discount as:
Trigger:
Subtotal of column discount amount > 0

calculation:
Subtotal of column discountAmount plus 0

Sign in to reply to this post

jon392819

Thanks Jason, the above worked super for the 5%. How do add in other qty breakpoints so if an item has qty between 11 and 20 they get a higher discount.

Many thanks Jason

Sign in to reply to this post

Jason ByrnesWebAssist

sorry, should have been:
(abs([Quantity] >= 5 && [Quantity] < 10)?[Price] * 0.05:0) + (abs([Quantity] >= 10 && [Quantity] < 20)?[Price] * 0.1:0)

Sign in to reply to this post

jon392819

Ah, I got it. If I'd engaged my brain for a second I should have gotten that. I presume I can use the example and add other breakpoints like

(abs([Quantity] >= 5 && [Quantity] < 10)?[Price] * 0.05:0) + (abs([Quantity] >= 10 && [Quantity] < 20)?[Price] * 0.1:0) + (abs([Quantity] >= 20 && [Quantity] < 30)?[Price] * 0.2:0)

Sign in to reply to this post

Jason ByrnesWebAssist

yup, that's correct.

Sign in to reply to this post

jon392819

Hi Jason, tried to run the display manager wizard again to include the discount info under each product but get the attached error. Other ecart sites I have do not share the same. Cleared cache but no luck.
Also Jason, is it possible to show the discount applied to each item in the cart.

I also cant work out how the above calculation gets worked out on a unique product. Where in the above does the code get told do this for each item and not the combined qty of the cart?


Apologies for the questions....


J

Sign in to reply to this post

Jason ByrnesWebAssist

instead of running the display manager to recreate the desplay use the bindings panel to add the discountAmount amount binding to the cart display.

calculations are performed on a line by line basis, just by doing the discount as a calculation is how you ensure that it is applied to unique items and not the cart total quantity.

Sign in to reply to this post

jon392819

Thanks Jason, I see the bindings thanks. I think I gave you the wrong idea above. I need to discount to be a percentage of the total cost for the item.

If item x has a price of 1 Euro and it has qty of 3 the discount would be 3 Euro - 5%.

At the minute I think we are just working out the discount on the Item price and taking that from the total.

Also, at the minute when I add two different items to the cart each with a different price per unit and a qty of 6 or more they both get the exact same discount showing. Appreciate this may heading to a premium ticket.

I attach a screen shot. Thanks Jason

Jon

Sign in to reply to this post

Jason ByrnesWebAssist

ok, so multiply the price * quantity in the calculation:

(abs([Quantity] >= 5 && [Quantity] < 10)?([Price] * [Quantity]) * 0.05:0) + (abs([Quantity] >= 10 && [Quantity] < 20)?([Price] * [Quantity]) * 0.1:0)


send a copy ofd the cart display page please.

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