Forums / All Other Contributions/Addons / SplitTaxLines mod support thread

SplitTaxLines mod support thread

Locked

Views: 20,799

Results 61 to 80 of 81
This thread is locked. New replies are disabled.
6 Apr 2008, 4:17 AM
#61
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

SplitTaxLines mod support thread

The error only occurs if MORE than 1 item is added to the cart. I know my latest version of CTE is good so I will release it publicly. Hopefully alan can fix this major bug in STL.

6 Apr 2008, 5:14 AM
#62
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: SplitTaxLines mod support thread

There error in the code is coming from includes/classes/order.php:

 
      if (isset($this->info['tax_groups'][$products_tax_description[$tax_entry_description]])) {
        $this->info['tax_groups'][$tax_entry_description] += $tax_add;
      } else {
        $this->info['tax_groups'][$tax_entry_description] = $tax_add;
      }

Specifically...

 
      if (isset($this->info['tax_groups'][$products_tax_description[$tax_entry_description]])) {

...is always returning false and therefore the tax_groups value is always going to be the tax_add of the last product. Adding += to both lines makes it work, but it would be better to have the line above returning true.

6 Apr 2008, 5:17 AM
#63
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: SplitTaxLines mod support thread

Change that line to:

 
if (isset($this->info['tax_groups'][$tax_entry_description])) {

And the issue appears to be solved for the order_total, but I will have to look at the shipping next...

6 Apr 2008, 6:05 AM
#64
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: SplitTaxLines mod support thread

The shipping looks fine. Just change line 578 to the line I've put above and all issues will be solved. The newest version of CTE is available at http://www.numinix.com and has also been uploaded to the Zen Cart downloads section and should be active soon.

I'll leave it up to alan to OFFICIALLY update his module with the fix.

6 Apr 2008, 6:45 PM
#65
alanhigg avatar

alanhigg

New Zenner

Join Date:
Nov 2007
Posts:
31
Plugin Contributions:
1

Re: SplitTaxLines mod support thread

Wow numinix, you've been busy this weekend!

I'll have a look at your proposed bugfix today and release an updated STL asap.

I'm happy someone stepped up and supported you in making the necessary changes to CTE so that it plays nicely with STL. Thanks (to them, and to you) for extending that effort to STL in the form of this bugfix.

Alan

6 Apr 2008, 8:35 PM
#66
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: SplitTaxLines mod support thread

NP Alan. I hope that Zen Cart incorporates the split tax lines module into the Zen Cart core as apparently Canadian retailers must legally display GST and PST on seperate lines. Hopefully DrByte, a fellow Canadian, can understand this legal obligation.

6 Apr 2008, 9:20 PM
#67
alanhigg avatar

alanhigg

New Zenner

Join Date:
Nov 2007
Posts:
31
Plugin Contributions:
1

Re: SplitTaxLines mod support thread

Hi All,
As promised, an updated SplitTaxLines package has been uploaded to the Zen-Cart downloads area and should be available soon. EVERYONE who is using STL on zen-cart 1.3.8 should either:

  • download and install the new package ( STL v1.11 for zc 1.3.8)

or

  • make the single change as suggested by numinix above. (well spotted, numinix!)
    change:
 if (isset($this->info['tax_groups'][$products_tax_description[$tax_entry_description]])) {  

to:

 if (isset($this->info['tax_groups'][$tax_entry_description])) {  

Folks using zc1.3.7.1 can ignore this message. Just a reminder, STLv1.01 is the most recent version for 1.3.7.1-based carts.

Enjoy!
Alan

1 May 2008, 12:53 PM
#68
mshutch avatar

mshutch

New Zenner

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
34
Plugin Contributions:
0

Re: SplitTaxLines mod support thread

Does anyone using this mod have PayPal Express Checkout enabled on their account? My customers are unable to complete the checkout process with the SplitTaxLines set to true.

Colleen

--Colleen

2 May 2008, 12:00 PM
#69
alanhigg avatar

alanhigg

New Zenner

Join Date:
Nov 2007
Posts:
31
Plugin Contributions:
1

Re: SplitTaxLines mod support thread

MsHutch:

Does anyone using this mod have PayPal Express Checkout enabled on their account? My customers are unable to complete the checkout process with the SplitTaxLines set to true.

Colleen

Hi Colleen,
I have never tried STL with PayPalExpress so I'm afraid I don't have any quick help for you. Can you tell me a little more about the issue? At what point does the checkout process fail, and what is the failure? Is STL working well for your other customers (ie. customers not using PPE)? Hopefully we can narrow it down and find a solution.

Alan

3 May 2008, 9:03 AM
#70
mshutch avatar

mshutch

New Zenner

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
34
Plugin Contributions:
0

Re: SplitTaxLines mod support thread

Hi Alan,

The actual error I get is

PHP Fatal error:  Unsupported operand types in /home/hutch5/public_html/bayviewlaserengraving/includes/functions/functions_taxes.php on line 176
```This occurs at the final stage of checkout. Everything works great when other payment methods are used, like check/money order.

Thank you again for your time,

Colleen

--Colleen

8 May 2008, 11:46 AM
#71
mshutch avatar

mshutch

New Zenner

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
34
Plugin Contributions:
0

Re: SplitTaxLines mod support thread

Hi Alan,

Just a little more information on the above error. It occurs on the paypal site when I click the PAY button. The address bar is displaying https://www.bayviewengraving.ca/index.php?main_page=checkout_success. I'm not sure that will help in determining the problem or not, but???

--Colleen

10 May 2008, 5:01 PM
#72
mb1 avatar

mb1

Totally Zenned

Join Date:
Jun 2006
Posts:
565
Plugin Contributions:
0

Re: SplitTaxLines mod support thread

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Show Split Tax Lines', 'DISPLAY_SPLIT_TAX_LINES', 'true', 'Display each tax on a separate line during checkout and on invoices.', 1, 21, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), ');

how would i change this file to remove from database

thank you
Mike

https://www.gorillagear.ca = zencart v1.3.9h with 40+ mods

11 May 2008, 8:15 PM
#73
alanhigg avatar

alanhigg

New Zenner

Join Date:
Nov 2007
Posts:
31
Plugin Contributions:
1

Re: SplitTaxLines mod support thread

MsHutch:

Hi Alan,

The actual error I get is

PHP Fatal error: Unsupported operand types in /home/hutch5/public_html/bayviewlaserengraving/includes/functions/functions_taxes.php on line 176


Hi Colleen,
I don't have a solution for you yet - since I don't use paypal express, I can't test this myself easily. Hopefully you can help me narrow down the problem. 

I'll get back to you shortly with some suggestions - hopefully we can sort this out soon!

Alan
11 May 2008, 8:26 PM
#74
alanhigg avatar

alanhigg

New Zenner

Join Date:
Nov 2007
Posts:
31
Plugin Contributions:
1

Re: SplitTaxLines mod support thread

MB1:

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Show Split Tax Lines', 'DISPLAY_SPLIT_TAX_LINES', 'true', 'Display each tax on a separate line during checkout and on invoices.', 1, 21, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), ');

> 
> how would i change this file to remove from database
> 
> thank you
> Mike

Hi Mike,
If you are not using SplitTaxlines at all any more, it is safe to totally remove the entry. If you have phpmyadmin or something similar, you should be able to use the web interface to remove the entry in the database.

If you would rather remove the entry manually using standard SQL, something like:

DELETE FROM configuration
WHERE configuration_key = 'DISPLAY_SPLIT_TAX_LINES'
LIMIT 1;


should do the trick.

Please backup your database completely before you make any changes to it!

Hope this helps,
Alan
1 Aug 2008, 5:56 AM
#75
colour97 avatar

colour97

New Zenner

Join Date:
Jul 2008
Posts:
9
Plugin Contributions:
0

Re: SplitTaxLines mod support thread

need help . trying every effort and still cannot show gst and pst individually.

i think i have installed splittaxline correctly because admin/mystore , i got this setting.

in product this is only i tax class option i can choose. as a result, the checkout only shows 1 tax.

need help to advise which config i am missing .

on module/ shipping setting, i think i have installed canada post succesfully.
this is the same case, only 1 tax class.

pleae teach and advise which config i forget to set.

thank you very much.

2 Aug 2008, 12:38 PM
#76
alanhigg avatar

alanhigg

New Zenner

Join Date:
Nov 2007
Posts:
31
Plugin Contributions:
1

Re: SplitTaxLines mod support thread

colour97:

in product this is only i tax class option i can choose. as a result, the checkout only shows 1 tax.

Hi Colour97, can you give us a little bit more information about your problem?

  1. here is a link to a very valuable reference post - have you configured your tax classes and zones in this way?
    Configuring Taxes for Canadian sites

  2. when the checkout only shows 1 tax, what is the text description that it displays for that line?

  3. are you using a customized template or the default one?

Let's see if we can figure this out.

Alan

17 Sep 2008, 3:58 PM
#77
beto_pu avatar

beto_pu

New Zenner

Join Date:
Apr 2007
Posts:
14
Plugin Contributions:
0

Re: SplitTaxLines mod support thread

First of all thank you for sharing your work with the comunity...

I've just installed this mod on a 1.3.8 site with the cherry_zen template and a couple mods (easypopulate and ultimate SEO) but when you proceed with your order it crashes during checkout confirmation. Very weird... I've lost everything under under products list so no confirmation or totals available.

Can you give me any insight about this?

Thanks a lot for your time

30 Sep 2008, 7:10 PM
#78
stevenh76 avatar

stevenh76

New Zenner

Join Date:
Sep 2008
Posts:
6
Plugin Contributions:
0

Re: SplitTaxLines mod support thread

Hi, I met a problem using Edit Orders mod after SplitTaxLines installation.

SplitTaxLines works well when placing orders. But when I edit orders, the Edit Orders mod will apply all taxes to each line of tax so that the total tax may be doubled or tripled according to the number of lines. For example, an order has 5% GST and 8% PST, the sub-total is $100. Before editing, the taxes appear like:

Sub-Total: $100.00
5% GST: $5.00
8% PST: $8.00
Total : $113.00

After editing, the invoice comes like:

Sub-Total: $100.00
5% GST: $13.00
8% PST: $13.00
Total : $126.00

I guess, the reason is that Edit Orders mod doesn't invoke the tax function introduced by SplitTaxLines. But I don't know how to get them compatible. Does anybody have the same problem? Anyone can help me out?

Thanks in advance.

Steve

29 Jun 2009, 8:35 PM
#79
aporia avatar

aporia

New Zenner

Join Date:
Jun 2004
Posts:
4
Plugin Contributions:
0

Re: SplitTaxLines mod support thread

SOLVED: for my PayPal Express Checkout/Website Payments Pro

Regarding my problems with PayPal Express Checkout and Website Payments Pro: As I see it, I think the problem is that the paypal module needs to bypass the usual checkout and tax calculate part, and go directly to paypal (this is part of their service agreement). The PayPal module is expecting there to only be a single tax - but with SplitTaxLines we have two, stored in an array.

I do not not know enough about how the multiple taxes are calculated in other juridictions, but in Ontario you can fix this by adding the following line to zen_calculate_tax() in includes/functions_taxes.php on line 176, just before the return statement:

 if(is_array($tax)) $tax = array_sum($tax);

This will add the taxes together into a single tax rate that the paypal module can handle. It does not compound the taxes though...and I don't know if the compounding would have already happened. Alan, perhaps you can clarify that part...

Hope this helps some others...

Gord

21 Oct 2009, 11:43 PM
#80
bebe avatar

bebe

New Zenner

Join Date:
Jul 2009
Posts:
35
Plugin Contributions:
0

Re: SplitTaxLines mod support thread

I just saw that it is illegal to show the combined GST and PST tax rates on invoices. How can I delete the column tax in the tpl_checkout_confirmation_default.php file ?

Here is the quote from a PDF that is explaining how to configure tax for the province of Quebec :

The rates of 7.87%, 7.875%, 12.87% and 12.875% must not appear on the document attesting to the
sale.

You can find it here.