Show prices with discount on checkout

  • Posts: 50
  • Thank you received: 3
  • Hikashop Business
2 weeks 2 days ago #364281

Hi,
How can I show prices, like the product page (full price and price with discount), also in checkout page and user email? Thank you

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

  • Posts: 82823
  • Thank you received: 13370
  • MODERATOR
2 weeks 2 days ago #364283

Hi,

There is no options to display the price with discount in these places.
So it will require some modifications.

For the checkout, you want to go in the Display>Views menu and edit the show_block_cart view file.
There, you can add such code at the top and it should do it:

<?php $this->params->set('show_discount', 2); ?>

For the emails, you want to edit them via the menu System>Emails. There, you can add the tag {LINEVAR:PRODUCT_PRICE_BEFORE_DISCOUNT} to add the price before discount, for example, after the tag for the price after discount: {LINEVAR:PRODUCT_PRICE}
Since you didn't provider your version of HikaShop in your message, note that this tag was not available several years ago. So if you have a really old override of the preload of your email, or a really old version of HikaShop, this won't be possible.

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

  • Posts: 50
  • Thank you received: 3
  • Hikashop Business
1 day 3 hours ago #364582

Thank you, it works. Is it possible to have the same view in the administration orders page?

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

  • Posts: 82823
  • Thank you received: 13370
  • MODERATOR
23 hours 23 minutes ago #364583

Hi,

You can edit the order / show_products view file for your backend template via the menu Display>Views.
There, the product price with discount is displayed by this line:

echo $this->currencyHelper->format($product->order_product_price, $this->order->order_currency_id);
You can use a similar line for the price before discount:
echo $this->currencyHelper->format($product->order_product_price_before_discount, $this->order->order_currency_id);

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

Time to create page: 0.066 seconds
Powered by Kunena Forum