Jump to content

Wrong price displayed on product page


Recommended Posts

Sorry for the long description but I'll try to be as specific as possible.

 

For some reason the price displayed on the product page is showing an incorrect lower value but only when using a customer group discount, it does not happen when I use the default customer group (0%).

 

When the product is added to cart, the cart displays the correct price and also the product list page is unaffected and shows the correct price.

 

The problem is present in both version 1.4.4.0 and the latest version 1.4.5.1 and appears in both Internet Explorer and Firefox.

 

I have attemted to fix this after researching similar problems on the forum pages but to no avail. I have checked the currency conversion rate but this is set to "1" as I only have one currency.

 

I have included three screenshots to help illustrate the problem.

 

The correct price displays on the product page whilst the page is loading, then it changes to the incorrect lower price. If I check the source code of the page the price is correct within the source code.

 

Also, just to clarify, the wrong price is displayed in both the prestashop default theme and my custom theme.

post-298684-0-81891300-1322521213_thumb.jpg

post-298684-0-27795200-1322521221_thumb.jpg

post-298684-0-44520800-1322521228_thumb.jpg

Link to comment
Share on other sites

  • 3 weeks later...

I'm having the same issue. Have culled through product.js and see that productPrice is taking the discount off the default product price, but adding in the full combination price without discount.

 

For instance:

Group1 has a 30% discount. The price of an item is $200 by default. One of the combinations adds $100 to the price. So, when logged in with a Group1 member, the price that is shown when choosing the $100 attribute is $240 instead of $210. It should be $210 ($200 - $60=$140, plus $100-$30=$70), not $240 ($200-$60=$140 plus $100). You see? productPrice in product.js is not deducting the group discount from the combination price addition.

 

Any ideas on how to correct would save me hours and hours. I would even write a small rap for the solution. :)

Link to comment
Share on other sites

Hi jayzee,

I just set this up on a clean test environment and it worked fine for me. Could you PM me with your Back Office login details (username, password and admin URL) so that I can compare our settings and try to locate where the issue may be occurring? In the meantime though, I hope you've got your beatbox handy; I'm personally partial to Biz Markie B).

 

-Mike

Link to comment
Share on other sites

Hi jayzee,

I'm not sure if this is the only thing causing this issue, but I noticed something that may be leading to some confusion in the final calculation:

 

In your Combinations Generator, I noticed that you have 4 different features with a $44 price impact, and only one with a different value ($211 for satin nickel). So essentially, every single combination that does NOT include the satin nickel canopy and stem would have the exact same price, which would be $44 more than the base price you have set at $425.

 

While I cannot guarantee that this will completely fix the issue, I would suggest that you adjust your combinations to reflect no price impacts except the satin nickel attribute, which you would instead set at a price impact of $167 instead of $211, with the default, pre-tax retail price set at $469 instead of $425.

 

Again, I can't guarantee that this, in and of itself, will immediately fix anything, but it will allow me to clear up some confusion on what is leading to this issue, while also simplifying your own sales process.

 

Once you've done that, please let me know and I'll be happy to take a look at it once again.

 

-Mike

Link to comment
Share on other sites

Hi Mike,

 

I appreciate your help with this.

 

Yeah, I can't do this as it violates business rules and would require a wholesale change of pricing structure. I guess I just will have to figure out how to accommodate this somehow.

 

Would this be considered a bug? I didn't expect this to have to be dinked around with so much. Thanks!

Link to comment
Share on other sites

Ok my homeboyyyyyzzz, here's how this sistah rolls. I fixed it. But it will take a bit of mad skeelz to make it happen.

 

First off, in your product.tpl, add a line at the bottom that goes:

 

<div id="group_reduction" style="display:none">{$group_reduction}</div>

 

This will hold your group_reduction amount in a div tag that can be accessed in product.js.

 

Then, in product.js (locations vary by theme), look for line 118. Add this just above it:

 

var group_reduction = $('#group_reduction').html();

 

and modify selectedCombination['price'] = combinations[combination]['price'];

 

to

selectedCombination['price'] = combinations[combination]['price']*group_reduction;

 

 

This will multiply the combination price by the group reduction price, thereby giving you the correct price for the attribute.

 

EDIT: This fix won't withstand an upgrade, so make sure you document for the future.

 

Hope this helps someone out there. I won't mark this [solved] since I was not the OP.

Link to comment
Share on other sites

  • 4 months later...

Ok my homeboyyyyyzzz, here's how this sistah rolls. I fixed it. But it will take a bit of mad skeelz to make it happen.

 

First off, in your product.tpl, add a line at the bottom that goes:

 

<div id="group_reduction" style="display:none">{$group_reduction}</div>

 

This will hold your group_reduction amount in a div tag that can be accessed in product.js.

 

Then, in product.js (locations vary by theme), look for line 118. Add this just above it:

 

var group_reduction = $('#group_reduction').html();

 

and modify selectedCombination['price'] = combinations[combination]['price'];

 

to

selectedCombination['price'] = combinations[combination]['price']*group_reduction;

 

 

This will multiply the combination price by the group reduction price, thereby giving you the correct price for the attribute.

 

EDIT: This fix won't withstand an upgrade, so make sure you document for the future.

 

Hope this helps someone out there. I won't mark this [solved] since I was not the OP.

 

Hello PrestaMagic,

Thank you for the post but I have made all changes and still do not see that price being corrected.

Please advise. Thanks a lot.

Link to comment
Share on other sites

×
×
  • Create New...