price with and without VAT are the same

  • Posts: 80
  • Thank you received: 0
7 years 2 months ago #277547

-- HikaShop version -- : HikaShop Business: 3.1.1
-- Joomla version -- : 3.7.5
-- PHP version -- : 7.0.17
-- Browser(s) name and version -- : Firefox

Hi,

Prices with and without tax are the same in cart during checkout, which should not be. While in the email confirmation order the two prices are well computed. How can I fix the problem during the checkout?
Thanks

Attachments:

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
7 years 2 months ago #277561

Hi,

This indicates that you have the "show taxed prices" setting activated in your HikaShop configuration.
So the prices of the products and the sub total prices include the tax.
And thus, the tax row on your screenshot is only there as an information and not to be summed to the sub total.

The following user(s) said Thank You: idimarco

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

  • Posts: 80
  • Thank you received: 0
7 years 2 months ago #277626

Following your advice, now the prices are well computed in the summary of the checkout.
However is there a way to show price with VAT in product page and keep the two different prices in the summery only?

In addition, how can I delete "each" text after price ? I did not find the span string in php of my Template

www.mangialarossa.com/index.php/en/shop/checkout

Thanks
Imma

Last edit: 7 years 2 months ago by idimarco.

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
7 years 2 months ago #277636

Hi,

In that case, rather than changing that option, you can add at the top of the file step (or show) of the view checkout after the php tag, in the menu Display->Views, the code :
$this->params->set('price_with_tax',0); //or 1 for taxed prices
And that will force it on the checkout page regardless of that setting.

To know exactly which view file to edit and how to edit it, you can read this:
www.hikashop.com/support/documentation/1...-display.html#layout

Note : Please, don't edit your message a long time after have posted your topic, that mess our work organisation, thank you for your understanding.

Last edit: 7 years 2 months ago by Philip.

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

  • Posts: 80
  • Thank you received: 0
7 years 2 months ago #277823

Thanks for your advice but I really do not understand where to add the string $this->params->set('price_with_tax',0); //or 1 for taxed prices.

I tried to add it to checkout / step.php as well as checkout / show.php but it does not work.

Any other way to see the price with tax on product page ?

www.mangialarossa.com/index.php/en/shop/product/11-miel

Thanks

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

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

Hello,

As Nicolas told you :

To know exactly which view file to edit and how to edit it, you can read this:
www.hikashop.com/support/documentation/1...-display.html#layout

We do not have the required information to know the context (and the configuration) so we cannot know the view you need to edit.

As Nicolas told you :

This indicates that you have the "show taxed prices" setting activated in your HikaShop configuration.
So the prices of the products and the sub total prices include the tax.

So you can change that setting to get the price without taxes ; then you can use the previous code but in the product page (as Nicolas suggested in a way by giving you the value to force the display of taxed prices).

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.

  • Posts: 80
  • Thank you received: 0
7 years 2 months ago #278018

Hi,

Could you please confirm my understanding?

1. First, in Taxes settings, I have to choose "no tax" in Show taxed prices
2. Then, in product/show.php page, I have to add the following string after php tag:
$this->params->set('price_with_tax',0); //or 1;

If my understanding is correct, I tried to add the above string to many lines but nothing happened. Is there a easier way to show product price with tax in product page, as well as in related products boxes?

Or could you be more precise in which line should I add the string?

Thanks

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

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

Hello,

Please read correctly (and fully) the code given by Nicolas ; you're missing very important information.
So you misunderstood what is important :

$this->params->set('price_with_tax',0); // OR 1 FOR TAXED PRICE

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.

  • Posts: 80
  • Thank you received: 0
7 years 2 months ago #278212

Hi,

Thanks for your remark. I therefore added it and here below is how it looks the div (I deleted $this->params->set('price_with_tax',0); //or 1):

<div id="hikashop_product_price_<?php echo $variant_name; ?>" style="display:none;"><?php
$this->params->set('price_with_tax',0); //or 1 for taxed prices;
if((int)$this->params->get('show_price', -1) == -1) {
$this->params->set('show_price', (int)$this->config->get('show_price'));
}
if ($this->params->get('show_price')) {
$this->setLayout('listing_price');
echo $this->loadTemplate();
}

I also kept the tax option "with tax".
However, it does not work. Do I miss something ?
Thanks

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

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
7 years 2 months ago #278214

Hello,

Why not replace the parameter 0 ? As for example :
$this->params->set('price_with_tax',1);
As the comment say it, 1 is the parameter to pass in order to have what you required.

Regards

Last edit: 7 years 2 months ago by Philip.

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

  • Posts: 80
  • Thank you received: 0
7 years 2 months ago #278304

Hi Philippe
Thanks for your reply but still the prices in product page are shown without tax. Attached is the printscreen of product/show.php I changes in accordance to your comment. I am a bit frustrating since it should be now easy but it doesn't. What is wrong in the code?
thanks

Attachments:

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

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

Hello,

You put the code in the view "show" and not at the beginning.
Before that, there is some code which perform the display of the product page ; since the place that you are is the display of variant prices (which also mean that it will just override how the variant prices are displayed, so you need to have products with characteristics).

Just as reminder :

In that case, rather than changing that option, you can add at the top of the file step (or show)


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.

  • Posts: 80
  • Thank you received: 0
7 years 2 months ago #278664

Does it mean that I should add the code here?

www.mangialarossa.com/administrator/inde...block_characteristic

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
7 years 2 months ago #278666

Hi,

No. It means that you were right to put it in product / show.php, but you should put it at the top of the file, just after the first line with <?php

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

  • Posts: 80
  • Thank you received: 0
7 years 1 month ago #279915

Unfortunately, no way to fix the problem.

I put the code
$this->params->set('price_with_tax',1);
at the top of the file product/show_default.php but without success.

The problem is just on the product page.

I therefore decided to set prices with no VAT in Display tab.

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

Time to create page: 0.093 seconds
Powered by Kunena Forum