Display total amount of discount in the cart

  • Posts: 129
  • Thank you received: 0
7 years 7 months ago #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:

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 or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
7 years 7 months ago #267517

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->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

Please Log in or Create an account to join the conversation.

  • Posts: 129
  • Thank you received: 0
7 years 7 months ago #267524

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 or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 7 months ago #267536

Hello,

Nicolas gave you the process to follow

You'll have to loop on the array $cart->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 & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum