Jump to content

Inverse Discount (from minus to plus)


padii

Recommended Posts

Hi friends,

 

i know this may sound really weird and useless but i want to reverse all discount functions in prestashop (from reduce amount to add amount), ok not all but the ones that display price in cart, product-page, category-page and homepage.

 

Example: I set a price for a product of 5,00€, now i Add a Discount (amount) of 2,00€ and it should display something like "New price 7,00€, and the old price crossed out. 

 

I tried some weeks now. One option is to modify the tpl-files, but this is difficult in 1.6, becuase the prices are calculated elsewhere. On 1.5 this was enough.

 

I can change the file product.php in /classes to get the amount added instead of reduced.

        if ($use_reduc) {
            $price += $specific_price_reduction; //original its '-='
        }

But then it destroys my layout:

bug_discountcxj75.png

 

When i change it back it looks like this (i switched + and - somewhere else)

bug_discount26fkeg.png

 

The red price is correct, its even correct in the cart and other modules / views. But its showing "+- 3,00€) which is pretty ugly and the old price is not displayed.

 

Can somebody help me where to start? I do try&error all the time and i'm stuck here now.

 

side-information: customers cant buy products, so no need to update buying-related files. i just want to display this.

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

  • 2 weeks 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...