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

#   Total discounts amount

##

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

Less More

- Posts: 61
- Thank you received: 3
-
-

2 years 3 weeks ago [\#364120](#364120) by [demoisellegol](/forum/user/79354-demoisellegol "View demoisellegol's Profile")  *[Total discounts amount](/forum/27-checkout/908799-total-discounts-amount#364120 "-- HikaShop version -- : 5.1.1 -- Joomla version -- : 5.2.0 -- PHP version -- : 8.2  Hi suppose that I have 3 products in my cart, which I have $2 discount on each  how can I display the total discount (which will be $6 in this example) in my cart summery ?")* was created by *[demoisellegol](/forum/user/79354-demoisellegol "View demoisellegol's Profile")*

-- HikaShop version -- : 5.1.1
-- Joomla version -- : 5.2.0
-- PHP version -- : 8.2

Hi
suppose that I have 3 products in my cart, which I have $2 discount on each

how can I display the total discount (which will be $6 in this example) in my cart summery ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwODc5OS10b3RhbC1kaXNjb3VudHMtYW1vdW50P3RtcGw9bWFya2Rvd24=) 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: 86582
- Thank you received: 14322
-
-

2 years 3 weeks ago [\#364122](#364122) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Total discounts amount](/forum/27-checkout/908799-total-discounts-amount#364122 "-- HikaShop version -- : 5.1.1 -- Joomla version -- : 5.2.0 -- PHP version -- : 8.2  Hi suppose that I have 3 products in my cart, which I have $2 discount on each  how can I display the total discount (which will be $6 in this example) in my cart summery ?")*

Hi,

There is no option for such a display. You would need to edit the checkout / show_block_cart view file via the menu Display&gt;Views to add custom PHP code to calculate that total discount amount and then display it.

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

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

Less More

- Posts: 61
- Thank you received: 3
-
-

2 years 3 weeks ago [\#364128](#364128) by [demoisellegol](/forum/user/79354-demoisellegol "View demoisellegol's Profile")  Replied by *[demoisellegol](/forum/user/79354-demoisellegol "View demoisellegol's Profile")* on topic *[Total discounts amount](/forum/27-checkout/908799-total-discounts-amount#364128 "-- HikaShop version -- : 5.1.1 -- Joomla version -- : 5.2.0 -- PHP version -- : 8.2  Hi suppose that I have 3 products in my cart, which I have $2 discount on each  how can I display the total discount (which will be $6 in this example) in my cart summery ?")*

I used print_r and fount somewhere that total_price_without_discount
if i could echo this number somewhere in that file, i can get total discount amount by subtracting total price wiout discout and total price

but i cant get that total without dicount ![:(](/media/kunena/emoticons/22.png ":(")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwODc5OS10b3RhbC1kaXNjb3VudHMtYW1vdW50P3RtcGw9bWFya2Rvd24=) 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: 86582
- Thank you received: 14322
-
-

2 years 3 weeks ago [\#364130](#364130) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Total discounts amount](/forum/27-checkout/908799-total-discounts-amount#364130 "-- HikaShop version -- : 5.1.1 -- Joomla version -- : 5.2.0 -- PHP version -- : 8.2  Hi suppose that I have 3 products in my cart, which I have $2 discount on each  how can I display the total discount (which will be $6 in this example) in my cart summery ?")*

Hi,

The "total_price_without_discount" is the subtotal without coupons added, not discounts. So, it's not what you want.
You need to loop through the $cart-&gt;products array and in each product object, if there is a "discount" attribute object then the discount_flat_amount can be summed.
This will give you the total discount amount.

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

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