Show prices with discount on checkout

  • Posts: 53
  • Thank you received: 3
  • Hikashop Business
1 month 2 weeks 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: 83022
  • Thank you received: 13403
  • MODERATOR
1 month 2 weeks 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: 53
  • Thank you received: 3
  • Hikashop Business
1 month 1 day 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: 83022
  • Thank you received: 13403
  • MODERATOR
1 month 1 day 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.058 seconds
Powered by Kunena Forum