Jump to content

[1.6] productPriceWithoutReduction behaves differently depending on the theme/shop version?


tumil

Recommended Posts

Hi,

because of how my software (it links Prestashop to my database) works, I need to apply price drops by adding discounts to particular groups of clients instead of using specific prices.

The problem was that because of that method, the old prices didn't show up, the reduction percent didn't show up. Just the new, lowered price and a potential customer couldn't know that the product's price is reduced.

I managed to display old prices and these reduction percentages by editing some code e.g. in product.tpl

I have added "$group_reduction == 0" to the IF instruction which determined the display of the information of the sale

AND!

I simply used such code

{if $productPriceWithoutReduction > $productPrice}{convertPrice price=$productPriceWithoutReduction}{/if}

to display the old price

And it worked like a charm

 

But now I have to achieve that in the other store. And this store has another theme which doesn't seem to work the same way. The previous shop (which worked) was LEO EXIST template, this is WAREHOUSE theme.

 

And in this theme $productPriceWithoutReduction doesn't refer to the old price - the one that isn't affected by the group reductions. $productPriceWithoutReduction and $productPrice are just the same prices and I cannot compare them anyway in the IF instruction.

I suspect that the theme just handle this $productPriceWithoutReduction in a different way, which skips the group reduction.

 

 

How can I handle it to behave the same way the other theme does? Would I need to edit something in "classes". I don't know much about it and I would appreciate your help.

 

 

 

TL;DR

 

$productPriceWithoutReduction in Product.tpl doesn't take group reduction into account in my theme, while it did in the other theme. I NEED it to be dependent on the group reduction and I don't know how to achieve it

 

 

 

UPDATE:

I should add that the shop which handles it well is based on Prestashop 1.6.0.14.

The other shop which doesn't work the right way is Prestashop 1.6.1.6

Edited by tumil (see edit history)
Link to comment
Share on other sites

  • 2 months later...

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