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
    9,683
    Plugin Contributions
    123

    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.
    That Software Guy. My Store: Zen Cart Modifications
    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.

  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
    9,683
    Plugin Contributions
    123

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

    I had this mixed up with payment module sorting behavior; disregard my remarks.
    That Software Guy. My Store: Zen Cart Modifications
    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.

 

 

Similar Threads

  1. v139h How can I get the Shipping Estimator to include USPS Insurance Cost?
    By NDboots in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 28 Jul 2012, 12:44 AM
  2. Replies: 0
    Last Post: 12 Jul 2012, 08:48 PM
  3. v139h Can't Find Sub-Total Display
    By voltar in forum General Questions
    Replies: 2
    Last Post: 6 Jul 2012, 01:18 PM
  4. Can I Add shipping to sub Total BEFORE adding Tax?
    By iantopanto in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 3 May 2008, 12:12 PM
  5. Free shipping needed on the sub total not (as it currently is)the total
    By imageriot in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 21 Feb 2008, 05:43 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR