[Skip to main content](#vessel-content)

#   Move price before discount above discounted price

##

- **[ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")**
- [![ALEXIAC's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5711-alexiac "View ALEXIAC's Profile") Topic Author
- [ Offline](/forum/user/5711-alexiac)

Less More

- Posts: 42
- Thank you received: 0
-
-

14 years 6 months ago [\#46230](#46230) by [ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")  *[Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#46230 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")* was created by *[ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")*

Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price?
Thank you!

- [ ![price.jpg](/forum/attachment/3413) ](/forum/attachment/3413 "price.jpg") [ ](/forum/attachment/3413?download=1 "price.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

14 years 6 months ago [\#46309](#46309) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#46309 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")*

It's the file "listing_price" of the view "product" via the menu Display-&gt;views.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")**
- [![ALEXIAC's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5711-alexiac "View ALEXIAC's Profile") Topic Author
- [ Offline](/forum/user/5711-alexiac)

Less More

- Posts: 42
- Thank you received: 0
-
-

14 years 6 months ago [\#46311](#46311) by [ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")  Replied by *[ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")* on topic *[Re: Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#46311 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")*

Thank you Nicolas. I have already tried moving some code in that file but I was messing something.. Can you be more specific on which piece of code do I have to move in that file?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")**
- [![ALEXIAC's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5711-alexiac "View ALEXIAC's Profile") Topic Author
- [ Offline](/forum/user/5711-alexiac)

Less More

- Posts: 42
- Thank you received: 0
-
-

14 years 6 months ago -  14 years 6 months ago [\#46769](#46769) by [ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")  Replied by *[ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")* on topic *[Re: Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#46769 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")*

After a lot of struggle in "listing_price" file, I managed to make the price display as shown in the attachement.

1. [strike]€500,00[/strike] (Initial Price)
2. -25% (Discount Percentage)
3. €375,00 (Final Price)

There is one last thing though that I would like to be displayed and I've tried everything with no luck.
Which code do I have to add/modify so that the Discount Amount (i.e €125,00) is also displayed?
Your advice would be very helpful!
Thank you.

- [ ![Price1.png](/forum/attachment/3480) ](/forum/attachment/3480 "Price1.png") [ ](/forum/attachment/3480?download=1 "Price1.png")

Last edit: 14 years 6 months ago by [ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

14 years 6 months ago [\#46790](#46790) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#46790 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")*

You can use that line:
echo $this-&gt;currencyHelper-&gt;format(-1*$this-&gt;row-&gt;discount-&gt;discount_flat_amount,$price-&gt;price_currency_id);

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")**
- [![ALEXIAC's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5711-alexiac "View ALEXIAC's Profile") Topic Author
- [ Offline](/forum/user/5711-alexiac)

Less More

- Posts: 42
- Thank you received: 0
-
-

14 years 6 months ago [\#46797](#46797) by [ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")  Replied by *[ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")* on topic *[Re: Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#46797 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")*

For some reason this returns €0,00. Any idea what might be wrong?
Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")**
- [![ALEXIAC's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5711-alexiac "View ALEXIAC's Profile") Topic Author
- [ Offline](/forum/user/5711-alexiac)

Less More

- Posts: 42
- Thank you received: 0
-
-

14 years 6 months ago [\#46818](#46818) by [ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")  Replied by *[ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")* on topic *[Re: Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#46818 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")*

Any advice please?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

14 years 6 months ago [\#46916](#46916) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#46916 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")*

Ah yes, that's because you're using percentages. In that case, you'll have to calculate the discount, like that:

echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_without_discount-$price-&gt;price_value,$price-&gt;price_currency_id);

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")**
- [![ALEXIAC's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5711-alexiac "View ALEXIAC's Profile") Topic Author
- [ Offline](/forum/user/5711-alexiac)

Less More

- Posts: 42
- Thank you received: 0
-
-

14 years 6 months ago [\#47053](#47053) by [ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")  Replied by *[ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")* on topic *[Re: Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#47053 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")*

Almost there Nicolas. The problem now is that the Discount Amount (100,00-80,00 see attachement) is displayed without the VAT (17,09 instead of 20,00). VAT is 17%.
One of my attempts was to add the line Code:

echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_without_discount_with_tax-$price-&gt;price_value,$price-&gt;price_currency_id);

but again the discount amount is wrong. I also have enabled the option my discounts to be applied After Taxes.

I've been busting my head to solve this but unfortunately I need your help again.
Below is my listing_price.php after the modifications I've made to make the price display as shown in the attachement.
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 1.5.6 * @author hikashop.com * @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt; &lt;span class="hikashop_product_price_full"&gt; &lt;?php if(empty($this-&gt;row-&gt;prices)){ echo JText::_('FREE_PRICE'); }else{ $first=true; echo JText::_('PRICE_BEGINNING'); $i=0; foreach($this-&gt;row-&gt;prices as $price){ if($first)$first=false; else echo JText::_('PRICE_SEPARATOR'); if(isset($price-&gt;price_min_quantity) &amp;&amp; empty($this-&gt;cart_product_price) &amp;&amp; $price-&gt;price_min_quantity&gt;1){ echo '&lt;span class="hikashop_product_price_with_min_qty hikashop_product_price_for_at_least_'.$price-&gt;price_min_quantity.'"&gt;'; } if(!empty($this-&gt;row-&gt;discount)){ if($this-&gt;params-&gt;get('show_discount')==1){ echo '&lt;span class="hikashop_product_discount"&gt;'.JText::_('PRICE_DISCOUNT_START'); if(bccomp($this-&gt;row-&gt;discount-&gt;discount_flat_amount,0,5)!==0){ echo $this-&gt;currencyHelper-&gt;format(-1*$this-&gt;row-&gt;discount-&gt;discount_flat_amount,$price-&gt;price_currency_id); }elseif(bccomp($this-&gt;row-&gt;discount-&gt;discount_percent_amount,0,5)!==0){ echo -1*$this-&gt;row-&gt;discount-&gt;discount_percent_amount.'%'; } echo JText::_('PRICE_DISCOUNT_END').'&lt;/span&gt;'; }elseif($this-&gt;params-&gt;get('show_discount')==2){ echo '&lt;span class="hikashop_product_price_before_discount"&gt;'.JText::_('PRICE_BEFORE_ORIG'); if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_without_discount_with_tax,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_without_discount,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } if($this-&gt;params-&gt;get('show_original_price') &amp;&amp; !empty($price-&gt;price_orig_value_without_discount_with_tax)){ echo JText::_('PRICE_BEFORE_ORIG'); if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_without_discount_with_tax,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax') &amp;&amp; !empty($price-&gt;price_orig_value_without_discount)){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_without_discount,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } echo JText::_('PRICE_AFTER_ORIG'); } echo JText::_('PRICE_AFTER_ORIG').'&lt;/span&gt;'; echo '&lt;span class="hikashop_product_discount"&gt;' .JText::_('PRICE_DISCOUNT_START') .JText::_('PRICE_DISCOUNT_START1'); if(bccomp($this-&gt;row-&gt;discount-&gt;discount_flat_amount,0,5)!==0){ echo $this-&gt;currencyHelper-&gt;format(-1*$this-&gt;row-&gt;discount-&gt;discount_flat_amount,$price-&gt;price_currency_id); }elseif(bccomp($this-&gt;row-&gt;discount-&gt;discount_percent_amount,0,5)!==0){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_without_discount-$price-&gt;price_value,$price-&gt;price_currency_id); echo -1*$this-&gt;row-&gt;discount-&gt;discount_percent_amount.'%'; } echo JText::_('PRICE_DISCOUNT_END').'&lt;/span&gt;'; }elseif($this-&gt;params-&gt;get('show_discount')==3){ } } if(isset($price-&gt;price_min_quantity) &amp;&amp; empty($this-&gt;cart_product_price)){ if($price-&gt;price_min_quantity&gt;1){ echo JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price-&gt;price_min_quantity); }else{ echo JText::_('PER_UNIT');$first=true; $i=0; } } echo '&lt;span class="hikashop_product_price hikashop_product_price_'.$i.'"&gt;'; if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_with_tax,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } if($this-&gt;params-&gt;get('show_original_price') &amp;&amp; !empty($price-&gt;price_orig_value)){ echo JText::_('PRICE_BEFORE_ORIG'); if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_with_tax,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } echo JText::_('PRICE_AFTER_ORIG'); } echo '&lt;/span&gt; '; if($this-&gt;params-&gt;get('show_price_weight')){ if(!empty($this-&gt;element-&gt;product_id) &amp;&amp; isset($this-&gt;row-&gt;product_weight) &amp;&amp; bccomp($this-&gt;row-&gt;product_weight,0,3)){ echo JText::_('PRICE_SEPARATOR').'&lt;span class="hikashop_product_price_per_weight_unit"&gt;'; if($this-&gt;params-&gt;get('price_with_tax')){ $weight_price = $price-&gt;price_value_with_tax / $this-&gt;row-&gt;product_weight; echo $this-&gt;currencyHelper-&gt;format($weight_price,$price-&gt;price_currency_id).' / '.JText::_($this-&gt;row-&gt;product_weight_unit); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ $weight_price = $price-&gt;price_value / $this-&gt;row-&gt;product_weight; echo $this-&gt;currencyHelper-&gt;format($weight_price,$price-&gt;price_currency_id).' / '.JText::_($this-&gt;row-&gt;product_weight_unit); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } echo '&lt;/span&gt;'; } } if(isset($price-&gt;price_min_quantity) &amp;&amp; empty($this-&gt;cart_product_price) &amp;&amp; $price-&gt;price_min_quantity&gt;1){ echo '&lt;/span&gt;'; } $i++; } echo JText::_('PRICE_END'); } ?&gt; &lt;/span&gt;

Thank you!

- [ ![Price2.png](/forum/attachment/3503) ](/forum/attachment/3503 "Price2.png") [ ](/forum/attachment/3503?download=1 "Price2.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

14 years 6 months ago [\#47313](#47313) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#47313 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")*

Try with that:
echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_without_discount_with_tax-$price-&gt;price_value_with_tax,$price-&gt;price_currency_id);

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")**
- [![ALEXIAC's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5711-alexiac "View ALEXIAC's Profile") Topic Author
- [ Offline](/forum/user/5711-alexiac)

Less More

- Posts: 42
- Thank you received: 0
-
-

14 years 6 months ago [\#47323](#47323) by [ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")  Replied by *[ALEXIAC](/forum/user/5711-alexiac "View ALEXIAC's Profile")* on topic *[Re: Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#47323 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")*

Thank you very much! That solved the problem..

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[bendraper](/forum/user/6360-bendraper "View bendraper's Profile")**
- [![bendraper's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6360-bendraper "View bendraper's Profile")
- [ Offline](/forum/user/6360-bendraper)

Less More

- Posts: 28
- Thank you received: 2
-
-

14 years 4 months ago -  14 years 4 months ago [\#54047](#54047) by [bendraper](/forum/user/6360-bendraper "View bendraper's Profile")  Replied by *[bendraper](/forum/user/6360-bendraper "View bendraper's Profile")* on topic *[Re: Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#54047 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")*

following on from this post I've done a very similar thing (thanks for directing me here nicolas)

The product listing works fine where the product is viewed in a product listing with other, but when you click to go to the main product page I can't find the code to alter that as well

The result is that the product listing looks like the first picture and the product page looks like the second

Am I being a bit thick because I can't find which code to alter!

- [ ![Untitled.jpg](/forum/attachment/4292) ](/forum/attachment/4292 "Untitled.jpg") [ ](/forum/attachment/4292?download=1 "Untitled.jpg")

Last edit: 14 years 4 months ago by [bendraper](/forum/user/6360-bendraper "View bendraper's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

14 years 4 months ago [\#54122](#54122) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#54122 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")*

It's the same code actually.
However, the options for the product page are in the "Display" tab of the configuration while the options of the products listing are in the menu/module's hikashop options.
So you should look in your configuration for the product prices options so that you have the same values as for your listing.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[bendraper](/forum/user/6360-bendraper "View bendraper's Profile")**
- [![bendraper's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6360-bendraper "View bendraper's Profile")
- [ Offline](/forum/user/6360-bendraper)

Less More

- Posts: 28
- Thank you received: 2
-
-

14 years 4 months ago [\#54928](#54928) by [bendraper](/forum/user/6360-bendraper "View bendraper's Profile")  Replied by *[bendraper](/forum/user/6360-bendraper "View bendraper's Profile")* on topic *[Re: Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#54928 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")*

right as always, thanks for the help it's looking much better now

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[omegatechmax](/forum/user/10353-omegatechmax "View omegatechmax's Profile")**
- [![omegatechmax's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10353-omegatechmax "View omegatechmax's Profile")
- [ Offline](/forum/user/10353-omegatechmax)

Less More

- Posts: 3
- Thank you received: 0
-
-

13 years 11 months ago [\#76814](#76814) by [omegatechmax](/forum/user/10353-omegatechmax "View omegatechmax's Profile")  Replied by *[omegatechmax](/forum/user/10353-omegatechmax "View omegatechmax's Profile")* on topic *[Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#76814 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")*

I would like the same layout displayed when a discount is applied.

I've tried editing the code myself but keep getting the incorrect result. The result like the result you have where the Sale price is shown along with the old price and the saving amount.

Any chance sombody would be nice enough to show me the code to put into product / listing_price.php?

using Hika 2.0

thanks!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 11 months ago [\#76919](#76919) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#76919 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")*

Hi,

Try to replace your file content by the content of the following file:

*This attachment is hidden for guests.
Please log in or register to see it.*

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[omegatechmax](/forum/user/10353-omegatechmax "View omegatechmax's Profile")**
- [![omegatechmax's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10353-omegatechmax "View omegatechmax's Profile")
- [ Offline](/forum/user/10353-omegatechmax)

Less More

- Posts: 3
- Thank you received: 0
-
-

13 years 11 months ago [\#76947](#76947) by [omegatechmax](/forum/user/10353-omegatechmax "View omegatechmax's Profile")  Replied by *[omegatechmax](/forum/user/10353-omegatechmax "View omegatechmax's Profile")* on topic *[Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#76947 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")*

> Xavier wrote: Hi,
>
> Try to replace your file content by the content of the following file:
>
>  *This attachment is hidden for guests.
> Please log in or register to see it.*

Hi Xavier, thank you for your reply.

although this had no effect on my layout.

site: [ www.dp2u.ivisioneers.com](http://www.dp2u.ivisioneers.com)

![:(](/media/kunena/emoticons/22.png ":(")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 11 months ago [\#77046](#77046) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Move price before discount above discounted price](/forum/4-how-to/46230-move-price-before-discount-above-discounted-price#77046 "Hello. In the attached image you can see how the price with discount is displayed in my products. Which code do I have to edit so that the price before the discount (linethrough) is shown above the discounted price? Thank you!")*

Hi,

I think that you have replaced the content of the file in the wrong template.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MjMwLW1vdmUtcHJpY2UtYmVmb3JlLWRpc2NvdW50LWFib3ZlLWRpc2NvdW50ZWQtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.149 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
