Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2007
    Posts
    2
    Plugin Contributions
    0

    Default How can sub-total include shipping??

    Hello,

    Sorry to post this, but I've read through the forums and although the forum on setting up Canadian Tax classes may help, it doesn't quite fit my problem. So here goes:

    I would like to charge PST and GST on shipping costs, but I don't want it to show up on different lines(ie, a GST line for products, and a GST line for shipping, a PST line for products, and a PST line for shipping). I had someone edit the code so PST and GST will show up separately, but it's not including the tax on the shipping. Currently my site outputs:

    Your Total

    Sub-Total: $3.49 CDN
    Zone Rates (Shipping to CA): $2.10 CDN
    6.0% GST: $0.21 CDN
    7.0% PST: $0.24 CDN
    Total: $6.04 CDN

    I want it to say something like:

    Merchandise: $3.49 CDN
    Zone Rates (Shipping to CA): $2.10 CDN

    Sub-Total: $5.59
    6.0% GST: $0.31 CDN
    7.0% PST: $0.39 CDN
    Total: $6.29 CDN

    The modification used to make GST and PST be on separate line was:

    Code:
    if(stripos($key, 'BC') !== false) // We're in BC, show PST & HST separately
    {
    	$pattern= '/([\d.]+)[%] ([A-Za-z]+)/';
    	preg_match_all($pattern, $key, $matches);
    	$num_tax_types = count($matches[0]);
    	$total_percent = array_sum($matches[1]);
    	for($tax_type = 0; $tax_type < $num_tax_types; $tax_type++)
    	{
    		$tax_val = $value * ($matches[1][$tax_type] / $total_percent);
    		$tax_title = $matches[1][$tax_type].'% '.$matches[2][$tax_type];
    
    		$this->output[] = array('title' => $tax_title . ':',
          	            'text' => $currencies->format($tax_val, true, $order->info['currency'], $order->info['currency_value']),
                	    'value' => $tax_val);
    	}
    }	
    else
    {
    
    	$this->output[] = array('title' => $key . ':',
          	           'text' => $currencies->format($value, true, $order->info['currency'], $order->info['currency_value']),
                	   'value' => $value);
    }
    		/// END MODIFICATION
    So basically to have a new order total module that I can install and activate which will include the Sub-Total + shipping, and then this will be called the new "sub-total" and be used as the basis to calculate tax. Since all my products are taxable it doesn't really matter if zencart checks each product included in sub-total for tax class, although for a good sub-total+shipping module it should. Potentially tax could still be calculated from the new Merchandise (the old sub-total) and then added to this could be the tax on the difference between Subtotal and merchandise, and all that summed in one line. Is there anything you can recommend? My site is already live so I'd like to fix this ASAP!

    Thanks!

  2. #2
    Join Date
    Jul 2007
    Posts
    2
    Plugin Contributions
    0

    Default Re: How can sub-total include shipping??

    Ok, I changed the tax class in shipping and now the tax is worked out correctly:

    Sub-Total: $3.49
    Zone Rates (Shipping to CA): $2.10 CDN
    6.0&#37; GST: $0.33 CDN
    7.0% PST: $0.39 CDN
    Total: $6.31 CDN

    But I'd still like to get that extra line with subtotal+shipping. Doesn't seem to need to be a module, maybe just an addition to this page's output?

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    4,478
    Plugin Contributions
    121

    Default Re: How can sub-total include shipping??

    You can change the order of sort for these lines in admin->modules->order total. Put shipping above (a lower number) subtotal and see if you like that better.
    Scott C Wilson, That Software Guy, Plugin Moderator
    Contributions: Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more.

  4. #4
    Join Date
    Oct 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: How can sub-total include shipping??

    It doesn't work for me, maybe there are other settings that prevent it to happen?

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    4,478
    Plugin Contributions
    121

    Default Re: How can sub-total include shipping??

    I had this mixed up with payment module sorting behavior; disregard my remarks.
    Scott C Wilson, That Software Guy, Plugin Moderator
    Contributions: Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more.

 

 

Similar Threads

  1. Free Shipping Option not showing
    By mbheald in forum Addon Shipping Modules
    Replies: 2
    Last Post: 17 Dec 2007, 06:25 PM
  2. Sub total, tax, and shipping with linkpoint
    By Razathorn in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 26 Jul 2007, 06:45 PM
  3. Replies: 8
    Last Post: 3 Dec 2006, 08:23 AM
  4. Shipping using ot_loworderfee, ot_shipping and zones
    By nipinuk in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 21 Oct 2006, 06:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •