Displaying PRICE_BEFORE_TAX and PRICE_AFTER_TAX on shipping cost

  • Posts: 243
  • Thank you received: 2
  • Hikashop Multisite
9 months 4 weeks ago #284816

-- url of the page with the problem -- : mirageweddingbackdrops.co.uk/dev/

Hello,
When I am on the checkout and you are selecting shipping. The cost of shipping is displaying both Before Tax and After Tax. How do I get it to display just the one price and where can I find this section within the PHP view files?

I have attached a few screen shots

Attachments:

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

  • Posts: 63575
  • Thank you received: 9157
  • MODERATOR
9 months 3 weeks ago #284848

Hi,

To know which view file to edit, turn on the "display view files" setting of the HikaShop configuration.
So it will be the file "show_block_shipping".
There, you'll find that line which displays the price of the shipping method:
echo $this->checkoutHelper->getDisplayPrice($shipping, 'shipping', $this->options);
And you can replace it by:
$currencyClass = hikashop_get('class.currency');
echo $currencyClass->format($shipping->price_value_with_tax, hikashop_getCurrency());

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

  • Posts: 243
  • Thank you received: 2
  • Hikashop Multisite
9 months 3 weeks ago #284858

Hello,
This has worked great however the delivery option now displays £0.00 but the shipping displays correctly in the Checkout part.

I have attched a screen shot

Attachments:

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

  • Posts: 63575
  • Thank you received: 9157
  • MODERATOR
9 months 3 weeks ago #284860

Hi,

Sorry it should actually be:
$currencyClass = hikashop_get('class.currency');
echo $currencyClass->format($shipping->shipping_price_with_tax, hikashop_getCurrency());

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

Time to create page: 0.078 seconds
Powered by Kunena Forum