change the display of discounts
14 years 11 months ago #26931
by niqui
change the display of discounts was created by niqui
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: [strike]€ 25,00[/strike] € 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!
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: [strike]€ 25,00[/strike] € 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
Please Log in or Create an account to join the conversation.
14 years 11 months ago #26945
by nicolas
Replied by nicolas on topic Re: change the display of discounts
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.
14 years 11 months ago #26986
by niqui
Replied by niqui on topic Re: change the display of discounts
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...
)
Thanks.
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...
Thanks.
Please Log in or Create an account to join the conversation.
14 years 11 months ago #26989
by nicolas
Replied by nicolas on topic Re: change the display of discounts
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.
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.
14 years 11 months ago #27058
by niqui
Replied by niqui on topic Re: change the display of discounts
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.184 seconds