If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Bug Reports / [Done v1.3.9] Discount groups and tax calc problem with tax-included pricing

[Done v1.3.9] Discount groups and tax calc problem with tax-included pricing

Locked

Started by srt9969 on 16 Feb 2009, 2:16 PM · Views: 13,309

Results 21 to 29 of 29
This thread is locked. New replies are disabled.
3 Oct 2009, 8:47 PM
#21
pupsandpets avatar

pupsandpets

New Zenner

Join Date:
Mar 2008
Posts:
30
Plugin Contributions:
0

Post #21 by pupsandpets

Brent:

What are your settings for Order Totals Modules >> Discount Coupon?

Hi
They are set as;

**Discount Coupon

This module is installed
true

Sort Order
280

Include Shipping
false

Include Tax
false

Re-calculate Tax
Standard

Tax Class
--none--**

3 Oct 2009, 9:51 PM
#22
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Post #22 by brent

With those settings I can't replicate your problem. I have however installed the code changes suggested in this thread but had to miss out the code from post #9

I also have the Display price with VAT/TAX and Ex VAT/TAX and VAT-mod for European companies installed. Because of the European VAT mod I also made the change suggested here.

I think there is still a bug in ot_coupon.php when running UK stores. If I have Include Shipping set to false in Order Totals>> Discount Coupon the Order Total is wrong. Sub Totals and VAT are correct though. If I set Include Shipping to true the order total is correct.

I think ot_coupon.php needs similar code changes as applied to includes/modules/order_total/ot_group_pricing.php but I've tried to copy them across as they are but it doesn't work.

Sorry I couldn't be more helpful.

4 Oct 2009, 5:45 PM
#23
pupsandpets avatar

pupsandpets

New Zenner

Join Date:
Mar 2008
Posts:
30
Plugin Contributions:
0

Post #23 by pupsandpets

No worries, thanks for trying :smile:

11 Feb 2010, 6:33 PM
#24
crunch avatar

crunch

Zen Follower

Join Date:
Mar 2009
Posts:
227
Plugin Contributions:
0

Post #24 by crunch

Directed here from the 1.3.8a bug fix thread...

This thread is a mess...

Is this the correct UPDATED code (being used in 1.3.9) for includes/modules/order_total/ot_group_pricing.php ???????

  function get_order_total() {
    global  $order;
    $order_total_tax = $order->info['tax'];
    $order_total = $order->info['total'];
    if ($this->include_shipping != 'true') $order_total -= $order->info['shipping_cost'];
    if ($this->include_shipping != 'true') $order_total_tax -= $order->info['shipping_tax'];
    if ($this->include_tax != "true" && $this->include_shipping != 'true') $order_total += $order->info['shipping_tax'];
    if ($this->include_tax != 'true') $order_total -= $order->info['tax'];
    $orderTotalFull = $order_total;
    $order_total = array('totalFull'=>$orderTotalFull, 'total'=>$order_total, 'tax'=>$order_total_tax);

    return $order_total;
  }

And shouldn't this thread have [Done v1.3.9] prefixed ?????

7 Mar 2010, 8:49 PM
#25
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Post #25 by divavocals

Actually it wasn't much of a mess at all if you followed Wilt's posts and ignore all the other posts in tis thread (some of which don't appear to have followed all of Wilt's instructions) I followed Wilt's posts and made ALL the changes and mods he recommended in this thread since after his posted changes, the person reporting the issue verified that the application of his posts were what worked..:

http://www.zen-cart.com/forum/showpost.php?p=687972&postcount=2
http://www.zen-cart.com/forum/showpost.php?p=689124&postcount=4
http://www.zen-cart.com/forum/showpost.php?p=689645&postcount=9

Crunch:

Directed here from the 1.3.8a bug fix thread...

This thread is a mess...

Is this the correct UPDATED code (being used in 1.3.9) for includes/modules/order_total/ot_group_pricing.php ???????

function get_order_total() {
global $order;
$order_total_tax = $order->info['tax'];
$order_total = $order->info['total'];
if ($this->include_shipping != 'true') $order_total -= $order->info['shipping_cost'];
if ($this->include_shipping != 'true') $order_total_tax -= $order->info['shipping_tax'];
if ($this->include_tax != "true" && $this->include_shipping != 'true') $order_total += $order->info['shipping_tax'];
if ($this->include_tax != 'true') $order_total -= $order->info['tax'];
$orderTotalFull = $order_total;
$order_total = array('totalFull'=>$orderTotalFull, 'total'=>$order_total, 'tax'=>$order_total_tax);

return $order_total;

}

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

18 Mar 2010, 12:42 PM
#26
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,766
Plugin Contributions:
56

Post #26 by swguy

Same issue occurs with coupons; fixes posted here:

http://www.zen-cart.com/forum/showthread.php?t=150689

Scott

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

19 Mar 2010, 3:05 PM
#27
crunch avatar

crunch

Zen Follower

Join Date:
Mar 2009
Posts:
227
Plugin Contributions:
0

Post #27 by crunch

wilt:

The fix is to add this line

if ($this->include_tax != "true" && $this->include_shipping != 'true') $order_total += $order->info['shipping_tax'];
> 
> This should be added after the similar lines we changed earlier to adjuts the shipping tax.
> 
> I now get 
> 
> Sub-Total:£100.00
> Flat Rate (Best Way):£10.00
> Group Discount:-£5.00
> VAT 15%:£13.70
> Total:£105.00

Which file do I add this line to (order, ot_shipping, ot-group_pricing) ?  It's not clear to me.  Thanks!
19 Mar 2010, 3:08 PM
#28
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,766
Plugin Contributions:
56

Post #28 by swguy

If you look at the thread

http://www.zen-cart.com/forum/showthread.php?t=150689

you will see all the required fixes summarized.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

19 Mar 2010, 3:45 PM
#29
crunch avatar

crunch

Zen Follower

Join Date:
Mar 2009
Posts:
227
Plugin Contributions:
0

Post #29 by crunch

swguy:

you will see all the required fixes summarized.

Thanks!!! Exactly what I needed.