Jump to content
thirty bees forum

Wrong base price displayed in FE productview when using attributes and QTY discount


Dolfijn

Recommended Posts

I think I have found a problem with the calculation of the baseprice when a customer wants to order a product in quantity, there is a quantity discount and he can choose an article attribute that changes the base price.  In my scenario it goes as follows.

- I have an article which comes in 3 options (one attribute with three values). The options change the base price (in my case the price increases significantly, but that is slightly off topic). The default option does not have an impact on the base price.

- I have a discount rule for customers if they order 5 articles or more. And another one for quantities of more then 10 (but that also does not matter, the problem already starts with the first discount rule).

If a customer sticks to the default option. Every works as expected, including the discounting rules.

However, if the customer chooses an option which has a price increasing effect. The following happens:

- For quantities lower then the quantity discount rule threshold (5 in my case), the correct increased base price is displayed.

- For quantities higher then the price discount threshold, the default option base price is displayed instead of the one linked to the option chosen. Although it then correctly applies the qty discount to this base price, it is completely wrong.

If we the proceed to the check out, everything is well again. All prices and calculations turn to be ok. But I discovered that customers get in confusion and most of the time stop the order process. In most cases, they contact me through email but this is not the way to go.

So, Am I doing things wrong or is it indeed a bug?

I also uploaded some screen images.

 

base-price-default-qty-1.PNG

base-price-default-qty-5-with discount.PNG

base-price-option-18GHz-qty-1.PNG

base-price-option-18GHz-qty-5-with discount-and-wrong-base-price-displayed.PNG

Link to comment
Share on other sites

  • 1 year later...

Hi there,

Last week I had a customer complaining about much higher product pricing during checkout then 'promised' in product view, caused by this problem. So, I decided to give it a try and I think I have solved it :-). Root cause is the construction of the product page which uses a table to display volume discount. In this table, some CSS attributes are used to store the volume discount prices and that values are (only) set on page creation (from the product.tpl code). And these CSS attributes are used to display the price (when in product view). That all works ok, until you add product attributes (combinations) that influence the price. Because, that influence is not reflected back in the mentioned DOM css attributes of the volume discount table. So, the effect is that you always use the price levels of the first product attribute, regardless of the actual attribute chosen by the user.

What I did is add a new function (UpdateDOMdiscountPriceTable(newPrice)) that updates the table DOM elements that store the prices with the correct new price levels and call it from UpdateDisplay(). All changes are made in product.js. I attached the file for those interested. Final warning: I'm not an thirthybees expert and also not a seasoned JavaScript programmer. I also only tested it for my shop config (using attributes and volume discount using some percentage).

product.js

  • Like 1
Link to comment
Share on other sites

Hi @Dolfijn,

I can't reproduce this issue on latest niara/community theme. The price calculation works correctly for all calculations and volume discounts.

This looks like a bug specific to your old ps16 theme. I'm glad you already have a solution, maybe it will help others that comes with old ps16 default theme.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...