Post by slingeraap » Sun Nov 03, 2013 3:52 am

In my 1.5.3.1 OC shop, I display product prices with tax included. But in the estimate shipping costs, I want to display the shipping costs without tax. How can i do this?

I see that the estimated price in the popup is generated by javascript in the checkout\cart.tpl file of my template.

Code: Select all

<label for="' + json['shipping_method'][i]['quote'][j]['code'] + '">' + json['shipping_method'][i]['quote'][j]['text'] + '</label>
But that one includes the price including tax already. It is generated elsewhere. Anybody knows where i have to look to change it to the price without tax?

New member

Posts

Joined
Sun Dec 05, 2010 7:02 pm

Post by butte » Mon Nov 04, 2013 12:54 am

Did you try this, https://www.google.com/search?q=estimat ... encart.com . . . and then try refining it?

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by Johnathan » Wed Nov 06, 2013 9:03 am

So you want to show the shipping price without tax, but still have a tax class applied? You'd need to change each shipping method so that it doesn't add this into its "text" when passing it back to OpenCart. It should all be pretty similar code, but as an example, here's what you'd change for the Flat Rate shipping:

Code: Select all

IN:
/catalog/model/shipping/flat.php

REPLACE:
'text'         => $this->currency->format($this->tax->calculate($this->config->get('flat_cost'), $this->config->get('flat_tax_class_id'), $this->config->get('config_tax')))

WITH:
'text'         => $this->currency->format($this->config->get('flat_cost')) 
I haven't tested that, but I think it should work.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: bogdangergov1 and 65 guests