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

#   show price without discount

##

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

Less More

- Posts: 26
- Thank you received: 1
-
-

7 years 4 months ago [\#308223](#308223) by [fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")  *[show price without discount](/forum/27-checkout/897792-show-price-without-discount#308223 "-- HikaShop version -- : 4.1 -- Joomla version -- : 3.9  Hello, I am trying to display the price without discount in the checkout, for this I he¡avre edited checkout / show&#95;block&#95;cart.php view and added a new line like this:  td class=&quot;hikashop&#95;cart&#95;subtotal&#95;value&quot; data-title=&quot;&quot;&gt; currencyClass-&gt;format(@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;value&#95;without&#95;discount,@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;currency&#95;id); ?&gt;   The problem is that always get 0€ in this field")* was created by *[fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")*

-- HikaShop version -- : 4.1
-- Joomla version -- : 3.9

Hello,
I am trying to display the price without discount in the checkout, for this I he¡avre edited
checkout / show_block_cart.php view and added a new line like this:

&lt;td class="hikashop_cart_subtotal_value" data-title="&lt;?php echo JText::_('SUBTOTAL'); ?&gt;"&gt;
&lt;span class="hikashop_checkout_cart_subtotal"&gt;&lt;?php
echo $this-&gt;currencyClass-&gt;format(@$cart-&gt;total-&gt;prices[0]-&gt;price_value_without_discount,@$cart-&gt;total-&gt;prices[0]-&gt;price_currency_id);
?&gt;&lt;/span&gt;
&lt;/td&gt;

The problem is that always get 0€ in this field

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5Nzc5Mi1zaG93LXByaWNlLXdpdGhvdXQtZGlzY291bnQ/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: 14326
-
-

7 years 4 months ago [\#308225](#308225) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[show price without discount](/forum/27-checkout/897792-show-price-without-discount#308225 "-- HikaShop version -- : 4.1 -- Joomla version -- : 3.9  Hello, I am trying to display the price without discount in the checkout, for this I he¡avre edited checkout / show&#95;block&#95;cart.php view and added a new line like this:  td class=&quot;hikashop&#95;cart&#95;subtotal&#95;value&quot; data-title=&quot;&quot;&gt; currencyClass-&gt;format(@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;value&#95;without&#95;discount,@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;currency&#95;id); ?&gt;   The problem is that always get 0€ in this field")*

Hi,

The price_value_without_discount on the total of the cart is the price without coupon applied. And if you don't have any coupon applied it is not set.
The total of the cart without discounts is not calculated anywhere, so you would have to calculate it in your custom code I'm afraid by looping on the $cart-&gt;products array.

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

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

Less More

- Posts: 26
- Thank you received: 1
-
-

7 years 4 months ago [\#308246](#308246) by [fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")  Replied by *[fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")* on topic *[show price without discount](/forum/27-checkout/897792-show-price-without-discount#308246 "-- HikaShop version -- : 4.1 -- Joomla version -- : 3.9  Hello, I am trying to display the price without discount in the checkout, for this I he¡avre edited checkout / show&#95;block&#95;cart.php view and added a new line like this:  td class=&quot;hikashop&#95;cart&#95;subtotal&#95;value&quot; data-title=&quot;&quot;&gt; currencyClass-&gt;format(@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;value&#95;without&#95;discount,@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;currency&#95;id); ?&gt;   The problem is that always get 0€ in this field")*

Thanks Nicolas I will try...

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

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

Less More

- Posts: 26
- Thank you received: 1
-
-

7 years 4 months ago -  7 years 4 months ago [\#308279](#308279) by [fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")  Replied by *[fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")* on topic *[show price without discount](/forum/27-checkout/897792-show-price-without-discount#308279 "-- HikaShop version -- : 4.1 -- Joomla version -- : 3.9  Hello, I am trying to display the price without discount in the checkout, for this I he¡avre edited checkout / show&#95;block&#95;cart.php view and added a new line like this:  td class=&quot;hikashop&#95;cart&#95;subtotal&#95;value&quot; data-title=&quot;&quot;&gt; currencyClass-&gt;format(@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;value&#95;without&#95;discount,@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;currency&#95;id); ?&gt;   The problem is that always get 0€ in this field")*

Finally I think I get it:

$price_without_discount = 0;
foreach($cart-&gt;products as $i =&gt; $product) {

if(empty($product-&gt;cart_product_quantity))
continue;
if($group &amp;&amp; !empty($product-&gt;cart_product_option_parent_id))
continue;

$price_without_discount += $product-&gt;prices[0]-&gt;price_value_without_discount;
}

Last edit: 7 years 4 months ago by [fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile").

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

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

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

Less More

- Posts: 26
- Thank you received: 1
-
-

7 years 2 months ago [\#310583](#310583) by [fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")  Replied by *[fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")* on topic *[show price without discount](/forum/27-checkout/897792-show-price-without-discount#310583 "-- HikaShop version -- : 4.1 -- Joomla version -- : 3.9  Hello, I am trying to display the price without discount in the checkout, for this I he¡avre edited checkout / show&#95;block&#95;cart.php view and added a new line like this:  td class=&quot;hikashop&#95;cart&#95;subtotal&#95;value&quot; data-title=&quot;&quot;&gt; currencyClass-&gt;format(@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;value&#95;without&#95;discount,@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;currency&#95;id); ?&gt;   The problem is that always get 0€ in this field")*

Hi to all,
I want to do the same (display the price without discount) in the show_default.php , but here the cart objet is still empty...

How can I show it in this view?

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5Nzc5Mi1zaG93LXByaWNlLXdpdGhvdXQtZGlzY291bnQ/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: 14326
-
-

7 years 2 months ago [\#310585](#310585) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[show price without discount](/forum/27-checkout/897792-show-price-without-discount#310585 "-- HikaShop version -- : 4.1 -- Joomla version -- : 3.9  Hello, I am trying to display the price without discount in the checkout, for this I he¡avre edited checkout / show&#95;block&#95;cart.php view and added a new line like this:  td class=&quot;hikashop&#95;cart&#95;subtotal&#95;value&quot; data-title=&quot;&quot;&gt; currencyClass-&gt;format(@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;value&#95;without&#95;discount,@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;currency&#95;id); ?&gt;   The problem is that always get 0€ in this field")*

Hi,

The price without discount is already available in a variable on the product page.
You can just display it: Code:

echo $this-&gt;element-&gt;prices[[0]-&gt;price_value_without_discount;

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

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

Less More

- Posts: 26
- Thank you received: 1
-
-

7 years 2 months ago [\#310618](#310618) by [fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")  Replied by *[fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")* on topic *[show price without discount](/forum/27-checkout/897792-show-price-without-discount#310618 "-- HikaShop version -- : 4.1 -- Joomla version -- : 3.9  Hello, I am trying to display the price without discount in the checkout, for this I he¡avre edited checkout / show&#95;block&#95;cart.php view and added a new line like this:  td class=&quot;hikashop&#95;cart&#95;subtotal&#95;value&quot; data-title=&quot;&quot;&gt; currencyClass-&gt;format(@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;value&#95;without&#95;discount,@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;currency&#95;id); ?&gt;   The problem is that always get 0€ in this field")*

Hi Nicolas,
With this I see the price of the product without options, to add the option price I tried: Code:

$price_without_dto= $this-&gt;element-&gt;prices[0]-&gt;price_value_without_discount; foreach($this-&gt;element-&gt;options as $optionElement){ $price_without_dto+= $optionElement-&gt;order_product_price; }

but is not working ![:(](/media/kunena/emoticons/22.png ":(")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5Nzc5Mi1zaG93LXByaWNlLXdpdGhvdXQtZGlzY291bnQ/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: 14326
-
-

7 years 2 months ago [\#310620](#310620) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[show price without discount](/forum/27-checkout/897792-show-price-without-discount#310620 "-- HikaShop version -- : 4.1 -- Joomla version -- : 3.9  Hello, I am trying to display the price without discount in the checkout, for this I he¡avre edited checkout / show&#95;block&#95;cart.php view and added a new line like this:  td class=&quot;hikashop&#95;cart&#95;subtotal&#95;value&quot; data-title=&quot;&quot;&gt; currencyClass-&gt;format(@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;value&#95;without&#95;discount,@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;currency&#95;id); ?&gt;   The problem is that always get 0€ in this field")*

Hi,

The price with options is calculated dynamically with javascript at the bottom of the "option.php" file of the "product" view.
Also, your code is not correct.
Supposing that your option doesn't have variants, then you can use such code instead: Code:

$price_without_dto= $this-&gt;element-&gt;prices[0]-&gt;price_value_without_discount; foreach($this-&gt;element-&gt;options as $optionElement){ $price_without_dto+= $optionElement-&gt;prices[0]-&gt;price_value; }

If it has, then it should be something like that (however, this will add the price of all the variants of the option to the main product price so you'll likely want to adapt it based on what you want):
Code:

$price_without_dto= $this-&gt;element-&gt;prices[0]-&gt;price_value_without_discount: foreach($this-&gt;element-&gt;options as $optionElement){ foreach($optionElement-&gt;variants as $variant) { $price_without_dto+= $variant-&gt;prices[0]-&gt;price_value; } }

The following user(s) said Thank You: [fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")

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

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

Less More

- Posts: 26
- Thank you received: 1
-
-

7 years 2 months ago [\#310670](#310670) by [fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")  Replied by *[fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")* on topic *[show price without discount](/forum/27-checkout/897792-show-price-without-discount#310670 "-- HikaShop version -- : 4.1 -- Joomla version -- : 3.9  Hello, I am trying to display the price without discount in the checkout, for this I he¡avre edited checkout / show&#95;block&#95;cart.php view and added a new line like this:  td class=&quot;hikashop&#95;cart&#95;subtotal&#95;value&quot; data-title=&quot;&quot;&gt; currencyClass-&gt;format(@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;value&#95;without&#95;discount,@$cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;currency&#95;id); ?&gt;   The problem is that always get 0€ in this field")*

Ok I forgot that the calculation was in the option.php.
Done and working!!! Thanks so much

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5Nzc5Mi1zaG93LXByaWNlLXdpdGhvdXQtZGlzY291bnQ/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.107 seconds

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