change the display of discounts

  • Posts: 69
  • Thank you received: 4
  • Hikashop Business
13 years 1 month ago #26931

Trying to find out how to change this, but with no luck so far...

When I add a discount to a product it first displays the new price, and after that the old price with a stroke. I want to swap those two prices, so a discount is displayed like this: € 25,00 € 20,00
I suppose I have to change something in the code, but I can't find it.

Would be great if you have the solution ;) Thanks in advance!

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
13 years 1 month ago #26945

You need to edit the file listing_price of the view product via the menu Display->Views. There, you have the whole code used to display prices. So you will have to swap the code for the normal price and the code for the discounts.

Please Log in or Create an account to join the conversation.

  • Posts: 69
  • Thank you received: 4
  • Hikashop Business
13 years 1 month ago #26986

Well, first I need to say that I am not a PHP expert. I can do some little changes (mostly after just trying a lot) but I've been trying for hours but without any success. Best thing U get is to swap the prices before and after discount, but then the other products that don't have any discount display a price of zero.

If you have a hint for me where to swap to code it would be great. Otherwise, I will leave it like it is (but it seems just so odd to display the old price after the discount... :unsure: )

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
13 years 1 month ago #26989

It's not complicated.
The whole block of code of the if(!empty($this->row->discount)){ should be moved just before the line echo '<span class="hikashop_product_price">'; in order to do what you want.

Please Log in or Create an account to join the conversation.

  • Posts: 69
  • Thank you received: 4
  • Hikashop Business
13 years 1 month ago #27058

Ah, this hint was just what I needed :) Thanks for your great support.

Please Log in or Create an account to join the conversation.

Time to create page: 0.057 seconds
Powered by Kunena Forum