Forums / Basic Configuration / Subtotal showing with Tax, need it without.

Subtotal showing with Tax, need it without.

Views: 2,583

Results 1 to 8 of 8
21 Mar 2015, 10:52 AM
#1
matt_staines avatar

matt_staines

New Zenner

Join Date:
Oct 2013
Location:
Portishead, North Somerset, United Kingdom
Posts:
34
Plugin Contributions:
0

Subtotal showing with Tax, need it without.

Hi Guys,

Can anyone help me on this one?

First off, I'm in the UK and charging clients 20% VAT. This is setup in zones/taxes in the store. On the front-end clients see prices including TAX (display prices including tax conferred in admin).

When clients go to the checkout and also on the invoices, the sub-total seems to include the 20% VAT.

Example:

Product price is £28 ex VAT.
Subtotal shows £33.60
Shipping shows £0.00
UK VAT shows £5.60
Total shows £33.60

I would really need:
Product is £28 ex VAT.
Subtotal shows £28.00
Shipping shows £0.00
UK VAT shows £5.60
Total shows £33.60

Any help would be appreciated.

Regards

Matt

21 Mar 2015, 3:01 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Subtotal showing with Tax, need it without.

There is at least one or two mods out there that somewhat address this, but I'm wondering about the sequencing of the payment modules and if that would/could affect the result(s) observed.

Perhaps post the payment modules that are active/inactive and the sort order.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

21 Mar 2015, 5:52 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Subtotal showing with Tax, need it without.

mc12345678:

There is at least one or two mods out there that somewhat address this, but I'm wondering about the sequencing of the **payment **modules and if that would/could affect the result(s) observed.

Perhaps post the **payment **modules that are active/inactive and the sort order.
I believe that you meant the sort-orders of the order-total modules.

21 Mar 2015, 10:29 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Subtotal showing with Tax, need it without.

lat9:

I believe that you meant the sort-orders of the order-total modules.

You are correct (more than obviously)... That's what I get for answering a question when waking up from a nap. :P

Explanation: the order-total modules process the information in sort order. So, if the sub-total is not supposed to contain something, it should be placed before that something. If the value is to be considered (assuming it modifies a value processed by the sub-total) then it should be positioned by sort order before the sub-total. The caveat about if it modifies a value processed by the sub-total is that it is possible for an order-total module to provide order information that has no bearing on the values processed by the sub-total.

Generally speaking the above applies to any order-total module including the sequence of order-totals and not just to the sub-total.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

23 Mar 2015, 5:25 PM
#5
matt_staines avatar

matt_staines

New Zenner

Join Date:
Oct 2013
Location:
Portishead, North Somerset, United Kingdom
Posts:
34
Plugin Contributions:
0

Re: Subtotal showing with Tax, need it without.

Hi Guys, this is the current order of the modules.

Modules Sort Order Action
Discount Coupon ot_coupon 280
Group Discount ot_group_pricing 290
Gift Certificates ot_gv 840
Low Order Fee ot_loworderfee 400
Shipping ot_shipping 200
Sub-Total ot_subtotal 100
Tax ot_tax 300
Total ot_total 999
Module Directory: /home/sites/domain.com/public_html/includes/modules/order_total/

23 Mar 2015, 7:13 PM
#6
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Subtotal showing with Tax, need it without.

It has been awhile since I've looked at the code, but if I remember the subtotal is just a running total of the final_price for all products in the shopping cart (unless another order total module directly modifies the running subtotal)...

When you have DISPLAY_PRICE_WITH_TAX ("admin" -> "Configuration" -> "My Store" -> "Display Prices with Tax") enabled for products, internally the product's final_price will include applicable taxes... So the subtotal shown will include taxes because they were included with the product.

The Order Total module "ot_subtotal" is used to display the subtotal (and is stored separately in the database). Basically, "ot_subtotal" simply accesses the running subtotal for the order. One could alter ot_subtotal to show the subtotal minus the applied tax (when DISPLAY_PRICE_WITH_TAX == 'true')...

The side effect of making the above change is: the value for ot_subtotal will be stored in the database table "orders_total" without applied taxes (while the subtotal for the order is still stored with applied taxes in the "orders" database table... Not a big deal most of the time... But storing two different subtotal values in the database for a single order may have a negative impact on the operation of third party plugins reading or manipulating orders...

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

26 Nov 2015, 10:02 AM
#7
saidkouki avatar

saidkouki

New Zenner

Join Date:
Mar 2015
Location:
Stockholm, Sweden, Sweden
Posts:
1
Plugin Contributions:
0

Re: Subtotal showing with Tax, need it without.

i have the same problem , who can help me ?? please

26 Nov 2015, 11:47 AM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Subtotal showing with Tax, need it without.

saidkouki:

i have the same problem , who can help me ?? please

Glad to see that you've reached out for assistance!!!

Need more information. Preferably a good place to start is with the answers to the questions asked in the posting tips... Next is answering the same questions already asked or presenting the same level of detail.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...