Changing the way taxes are displayed at checkout

  • Posts: 84
  • Thank you received: 4
  • Hikashop Business
9 years 11 months ago #158408

-- url of the page with the problem -- : kiteoutlet.eu/index.php/en/
-- HikaShop version -- : 2.2.0
-- Joomla version -- : 2.5.18
-- PHP version -- : 5.2.3

The customer for which I built the site at www.kiteoutlet.eu has asked me to change the way taxes are displayed during checkout and on the invoices that customers receive. Taxes should be calculated on both the products in the shop and the shipping costs. Items in the shop should be shown with their prices including taxes. Only during checkout and in the invoices should the prices without taxes be shown, so that all tax can be added to the total in one step.

In my current set up taxes of 21% are calculated on both the product and the shipping costs. Please see the attached screen shot (h78e7a31.png) for the current way the prices are displayed during checkout. I'd like to change the display of the total price per product line, the total price for the complete order and the shipping costs, so that they are displayed without taxes added. Additionaly I'd like to add a line of text to the total price for each product line stating that this is the price without taxes. Please see the second attached screen shot (h98a9ac4.png) for an example of what I would like to achieve.

I think I can achieve what I'm looking for by editing the view Checkout -> Cart for the display during checkout and the view Order -> Invoice for the invoice, in the templates for my front end and back end respectively. However I can't seem to get it right. (My knowledge of PHP is pretty limited.)
Could you please let me know if what I try to do is possible, and if so, how to do it?

Another question I have is how to change the name that is given to my taxes depending on the language that is selected for the site by the customer. Currently it always used the tax_namekey which I have set to BTW (for Dutch customers). However I'd like it to display VAT when the English language is chosen. I don't think this is possible in the translation files or with a language override, because the tax_namekey is set only once.

Kind regards,
Chris

Attachments:
Last edit: 9 years 11 months ago by Foxworks.

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

  • Posts: 12953
  • Thank you received: 1778
9 years 11 months ago #158419

Hello,

Taxes should be calculated on both the products in the shop and the shipping costs. Items in the shop should be shown with their prices including taxes. Only during checkout and in the invoices should the prices without taxes be shown, so that all tax can be added to the total in one step.

The solution will probably be to set the "Show taxed prices" option to "Display Both" through "Hikashop->System->Configuration->Main".

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

  • Posts: 84
  • Thank you received: 4
  • Hikashop Business
9 years 11 months ago #158564

Hi Mohamed,
Thank you for your quick reply.

Unfortunately setting the option "Show taxed prices" to "Display Both" as you suggested does not give me the results I am looking for.
I do not want the price without taxes to be shown on the individual product pages; which is what selecting this option does. I want the price without taxes only to be shown during checkout, as indicated in the attached file, and on the invoice that the customer receives. Since it is only in those few specific locations that I want the untaxed prices to appear, I think it is something I will need to do by editing the view files for those specific elements. (I believe it is Checkout -> Cart for the display during checkout and the view Order -> Invoice for the invoice.) I am just not sure how I should do this.

Kind regards,
Chris

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 11 months ago #158711

Hi,

You can edit the view "checkout / listing_price" via the menu Display > Views and add the line:

$this->params->set('price_with_tax',0);
At the top of the file between php tags.

The following user(s) said Thank You: Foxworks

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

  • Posts: 84
  • Thank you received: 4
  • Hikashop Business
9 years 10 months ago #160150

Hi Xavier,

Thank you for your answer. Using this I could indeed get the result I wanted on the cart view during checkout.
I tried the same line of code on the invoice view for the back end and on the file that controls the email that is sent to users when they place an order. However this does not work.
I can edit these files by commenting out the lines that check whether price with tax is set (if($config->get('price_with_tax')){), but this seems a bit clumsy. Is there a simple solution such as the one you gave me earlier for these veiws as well?

Kind regards,
Chris

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

  • Posts: 13201
  • Thank you received: 2322
9 years 10 months ago #160368

Hi,

You can use that kind of code at the top of the view:

$this->config->set('price_with_tax',0)

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

Time to create page: 0.085 seconds
Powered by Kunena Forum