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

#   display both discounted amounts

##

- **[ionlifeusa](/forum/user/6193-ionlifeusa "View ionlifeusa's Profile")**
- [![ionlifeusa's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6193.png)](/forum/user/6193-ionlifeusa "View ionlifeusa's Profile") Topic Author
- [ Offline](/forum/user/6193-ionlifeusa)

Less More

- Posts: 5
- Thank you received: 1
-
-
- [](http://www.ionlifeusa.com)
-

14 years 5 months ago [\#52536](#52536) by [ionlifeusa](/forum/user/6193-ionlifeusa "View ionlifeusa's Profile")  *[display both discounted amounts](/forum/4-how-to/52536-display-both-discounted-amounts#52536 "How can I display in the product listing both discounted prices : discounted price and discounted amount.  F.e :  MSRP : $2000 Sale : $1500 You Save : $500  ?  The drop down list in the menu &quot;Show discounted price&quot; can select only one or another, but I need both.")* was created by *[ionlifeusa](/forum/user/6193-ionlifeusa "View ionlifeusa's Profile")*

How can I display in the product listing both discounted prices : discounted price and discounted amount.

F.e :

MSRP : $2000
Sale : $1500
You Save : $500

?

The drop down list in the menu "Show discounted price" can select only one or another, but I need both.

---

Discover Miracle Water ~ [ www.ionlifeusa.com](http://www.ionlifeusa.com)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUyNTM2LWRpc3BsYXktYm90aC1kaXNjb3VudGVkLWFtb3VudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14327
-
-

14 years 5 months ago [\#52586](#52586) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: display both discounted amounts](/forum/4-how-to/52536-display-both-discounted-amounts#52586 "How can I display in the product listing both discounted prices : discounted price and discounted amount.  F.e :  MSRP : $2000 Sale : $1500 You Save : $500  ?  The drop down list in the menu &quot;Show discounted price&quot; can select only one or another, but I need both.")*

You will have to edit the file 'listing_price' of the view 'product' via the menu Display-&gt;Views and change the code there. Remove that line:
}elseif($this-&gt;params-&gt;get('show_discount')==2){

and change the line:
if($this-&gt;params-&gt;get('show_discount')==1){

to:
if($this-&gt;params-&gt;get('show_discount')){

The following user(s) said Thank You: [lancert](/forum/user/4397-lancert "View lancert's Profile"), [ionlifeusa](/forum/user/6193-ionlifeusa "View ionlifeusa's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUyNTM2LWRpc3BsYXktYm90aC1kaXNjb3VudGVkLWFtb3VudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[ionlifeusa](/forum/user/6193-ionlifeusa "View ionlifeusa's Profile")**
- [![ionlifeusa's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6193.png)](/forum/user/6193-ionlifeusa "View ionlifeusa's Profile") Topic Author
- [ Offline](/forum/user/6193-ionlifeusa)

Less More

- Posts: 5
- Thank you received: 1
-
-
- [](http://www.ionlifeusa.com)
-

14 years 5 months ago [\#52947](#52947) by [ionlifeusa](/forum/user/6193-ionlifeusa "View ionlifeusa's Profile")  Replied by *[ionlifeusa](/forum/user/6193-ionlifeusa "View ionlifeusa's Profile")* on topic *[Re: display both discounted amounts](/forum/4-how-to/52536-display-both-discounted-amounts#52947 "How can I display in the product listing both discounted prices : discounted price and discounted amount.  F.e :  MSRP : $2000 Sale : $1500 You Save : $500  ?  The drop down list in the menu &quot;Show discounted price&quot; can select only one or another, but I need both.")*

Thank you Nicolas,

I did it as a temporary solution, I would like to see a permanent solution from Hikashop that will allow this in the future without custom coding.

-Sergey

---

Discover Miracle Water ~ [ www.ionlifeusa.com](http://www.ionlifeusa.com)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUyNTM2LWRpc3BsYXktYm90aC1kaXNjb3VudGVkLWFtb3VudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14327
-
-

14 years 5 months ago [\#53043](#53043) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: display both discounted amounts](/forum/4-how-to/52536-display-both-discounted-amounts#53043 "How can I display in the product listing both discounted prices : discounted price and discounted amount.  F.e :  MSRP : $2000 Sale : $1500 You Save : $500  ?  The drop down list in the menu &quot;Show discounted price&quot; can select only one or another, but I need both.")*

It's in the todo list.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUyNTM2LWRpc3BsYXktYm90aC1kaXNjb3VudGVkLWFtb3VudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[lancert](/forum/user/4397-lancert "View lancert's Profile")**
- [![lancert's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4397.jpg)](/forum/user/4397-lancert "View lancert's Profile")
- [ Offline](/forum/user/4397-lancert)
- CEO, Blue Sky Web Worx

Less More

- Posts: 21
- Thank you received: 1
-
-
-
- [](http://www.blueskywebworx.com)
-

13 years 9 months ago [\#90730](#90730) by [lancert](/forum/user/4397-lancert "View lancert's Profile")  Replied by *[lancert](/forum/user/4397-lancert "View lancert's Profile")* on topic *[display both discounted amounts](/forum/4-how-to/52536-display-both-discounted-amounts#90730 "How can I display in the product listing both discounted prices : discounted price and discounted amount.  F.e :  MSRP : $2000 Sale : $1500 You Save : $500  ?  The drop down list in the menu &quot;Show discounted price&quot; can select only one or another, but I need both.")*

IonLifeUSA, would you be willing to share your listing_price.php code? I can't seem to quite get it to work properly and I see you did on your site.

Thanks!

---

Lance Thompson
CEO, Blue Sky Web Worx
Web Design, Web Marketing, Search Rankings, Graphic Design
[ ](http://www.blueskywebworx.com)[ www.BlueSkyWebWorx.com](http://www.BlueSkyWebWorx.com)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUyNTM2LWRpc3BsYXktYm90aC1kaXNjb3VudGVkLWFtb3VudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[ionlifeusa](/forum/user/6193-ionlifeusa "View ionlifeusa's Profile")**
- [![ionlifeusa's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6193.png)](/forum/user/6193-ionlifeusa "View ionlifeusa's Profile") Topic Author
- [ Offline](/forum/user/6193-ionlifeusa)

Less More

- Posts: 5
- Thank you received: 1
-
-
- [](http://www.ionlifeusa.com)
-

13 years 9 months ago [\#90740](#90740) by [ionlifeusa](/forum/user/6193-ionlifeusa "View ionlifeusa's Profile")  Replied by *[ionlifeusa](/forum/user/6193-ionlifeusa "View ionlifeusa's Profile")* on topic *[display both discounted amounts](/forum/4-how-to/52536-display-both-discounted-amounts#90740 "How can I display in the product listing both discounted prices : discounted price and discounted amount.  F.e :  MSRP : $2000 Sale : $1500 You Save : $500  ?  The drop down list in the menu &quot;Show discounted price&quot; can select only one or another, but I need both.")*

Hi, sure, this is listing_price.php :
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 1.5.8 * @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;?php $class =''; if(!empty($this-&gt;row-&gt;prices)&amp;&amp; count($this-&gt;row-&gt;prices)&gt;1){ $class = ' hikashop_product_several_prices'; } ?&gt; &lt;div class="hikashop_product_price_full&lt;?php echo $class; ?&gt;"&gt; &lt;?php if(empty($this-&gt;row-&gt;prices)){ echo JText::_('FREE_PRICE'); }else{ $first=true; echo JText::_('PRICE_BEGINNING'); $i=0; if($this-&gt;params-&gt;get('price_with_tax',3)==3){ $config =&amp; hikashop_config(); $this-&gt;params-&gt;set('price_with_tax',$config-&gt;get('price_with_tax')); } foreach($this-&gt;row-&gt;prices as $price){ if($first)$first=false; else echo JText::_('PRICE_SEPARATOR'); $start = JText::_('PRICE_BEGINNING_'.$i); if($start!='PRICE_BEGINNING_'.$i){ echo $start; } 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;div class="hikashop_product_price_with_min_qty hikashop_product_price_for_at_least_'.$price-&gt;price_min_quantity.'"&gt;'; } $classes = array('hikashop_product_price hikashop_product_price_'.$i); if(!empty($this-&gt;row-&gt;discount)){ $classes[]='hikashop_product_price_with_discount'; } if(!empty($this-&gt;row-&gt;discount)){ if($this-&gt;params-&gt;get('show_discount')){ echo '&lt;div class="hikashop_product_price_before_discount"&gt;'.JText::_('PRICE_DISCOUNT_START'); 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_DISCOUNT_END').'&lt;/div&gt;'; } } echo '&lt;div class="'.implode(' ',$classes).'"&gt;'; if(!empty($this-&gt;row-&gt;discount)){ if($this-&gt;params-&gt;get('show_discount')){ echo JText::_('PRICE_SALE'); } } 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;/div&gt; '; if(isset($price-&gt;price_min_quantity) &amp;&amp; empty($this-&gt;cart_product_price) &amp;&amp; $this-&gt;params-&gt;get('per_unit',1)){ 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'); } } 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;div 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;/div&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;/div&gt;'; } if(!empty($this-&gt;row-&gt;discount)){ if($this-&gt;params-&gt;get('show_discount')){ echo '&lt;div class="hikashop_product_discount"&gt;'.JText::_('PRICE_YOU_SAVE'); 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;/div&gt;'; } } $i++; } echo JText::_('PRICE_END'); } ?&gt;&lt;/div&gt;

---

Discover Miracle Water ~ [ www.ionlifeusa.com](http://www.ionlifeusa.com)

The following user(s) said Thank You: [lancert](/forum/user/4397-lancert "View lancert's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUyNTM2LWRpc3BsYXktYm90aC1kaXNjb3VudGVkLWFtb3VudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) 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.065 seconds

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