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

#   Display total amount of discount in the cart

##

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

Less More

- Posts: 129
- Thank you received: 0
-
-

9 years 7 months ago [\#267473](#267473) by [nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")  *[Display total amount of discount in the cart](/forum/27-checkout/889825-display-total-amount-of-discount-in-the-cart#267473 "-- HikaShop version -- : 3.0.1 -- Joomla version -- : 3.6.5  hi, in checkout cart and cart status view i want to add the total amount of discount used in the cart next to Total amount of purchased! for example if a user purchased 5 item with 200$ on each product and used 50$ discount for each iwant this to show:  i think i have to add come codes in Show&#95;Block&#95;Cart in Checkout and i appreciate if you can help me do this.  thanks")* was created by *[nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")*

-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.6.5

hi,
in checkout cart and cart status view i want to add the total amount of discount used in the cart next to Total amount of purchased!
for example if a user purchased 5 item with 200$ on each product and used 50$ discount for each iwant this to show:

total: 1000$
total discount: 250$
u can pay: 750$

i think i have to add come codes in Show_Block_Cart in Checkout and i appreciate if you can help me do this.

thanks

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

9 years 7 months ago [\#267517](#267517) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Display total amount of discount in the cart](/forum/27-checkout/889825-display-total-amount-of-discount-in-the-cart#267517 "-- HikaShop version -- : 3.0.1 -- Joomla version -- : 3.6.5  hi, in checkout cart and cart status view i want to add the total amount of discount used in the cart next to Total amount of purchased! for example if a user purchased 5 item with 200$ on each product and used 50$ discount for each iwant this to show:  i think i have to add come codes in Show&#95;Block&#95;Cart in Checkout and i appreciate if you can help me do this.  thanks")*

Hi,

That's right you need to add code there if you want to do that.
You'll have to loop on the array $cart-&gt;products and sum the price_value - price_value_without_discount of each product to be able to get the total amount of discount so that you can just echo it at the correct place, between the sub total and the total blocks of code.

It will require some development skill. If you're not a developer, I encourage you to contact our partners:
[ www.hikashop.com/home/our-partners.html](https://www.hikashop.com/home/our-partners.html)

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

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

Less More

- Posts: 129
- Thank you received: 0
-
-

9 years 7 months ago [\#267524](#267524) by [nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")  Replied by *[nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")* on topic *[Display total amount of discount in the cart](/forum/27-checkout/889825-display-total-amount-of-discount-in-the-cart#267524 "-- HikaShop version -- : 3.0.1 -- Joomla version -- : 3.6.5  hi, in checkout cart and cart status view i want to add the total amount of discount used in the cart next to Total amount of purchased! for example if a user purchased 5 item with 200$ on each product and used 50$ discount for each iwant this to show:  i think i have to add come codes in Show&#95;Block&#95;Cart in Checkout and i appreciate if you can help me do this.  thanks")*

Hi Nicolas,
yes, i know that, and i even know the exact place to where to place the code
i only want a line of code that can echo sum of discounts.

i'm running out of time, and hiring an expert need lots of it.
i'll be appreciative if u can give the exact code. or an example or ...

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

9 years 7 months ago [\#267536](#267536) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Display total amount of discount in the cart](/forum/27-checkout/889825-display-total-amount-of-discount-in-the-cart#267536 "-- HikaShop version -- : 3.0.1 -- Joomla version -- : 3.6.5  hi, in checkout cart and cart status view i want to add the total amount of discount used in the cart next to Total amount of purchased! for example if a user purchased 5 item with 200$ on each product and used 50$ discount for each iwant this to show:  i think i have to add come codes in Show&#95;Block&#95;Cart in Checkout and i appreciate if you can help me do this.  thanks")*

Hello,

Nicolas gave you the process to follow

> You'll have to loop on the array $cart-&gt;products and sum the price\_value - price\_value\_without\_discount of each product to be able to get the total amount of discount so that you can just echo it at the correct place, between the sub total and the total blocks of code.

The explanation have details and can be easily translated to PHP code if you have the basis knowledge.
Afterwards, I'm afraid that it's going outside the limit of our support ; like Nicolas mentioned, it is related to customization.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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