Zen Cart Logo
Forums / Currencies & Sales Taxes, VAT, GST, etc. / Canadian taxes showing possible?

Canadian taxes showing possible?

Locked

Views: 3,700

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
22 Sep 2007, 11:12 PM
#1
christoph100 avatar

christoph100

New Zenner

Join Date:
Sep 2007
Posts:
18
Plugin Contributions:
0

Canadian taxes showing possible?

Well I have switched to using oscommerce for one reason Canadian taxes can be implemented and shown properly using a contribution. However I find zen-cart a bit easier especially with the ez-pages controls :clap:. For the fun of it I tried loading the ot_tax from os into zen needless to say it didn't work. Has anyone here good with coding attempted to modify the code in zen's ot_tax to show taxes separately when needed?

Anyway I am playing with some code that does work in os...trying to port it to zen
here is one error I cant figure out...

Fatal error: Call to a member function Execute() on a non-object in D:\shop\includes\modules\order_total\ot_tax.php on line 75

what is happening?
Thanks
Chris.

22 Sep 2007, 11:38 PM
#2
christoph100 avatar

christoph100

New Zenner

Join Date:
Sep 2007
Posts:
18
Plugin Contributions:
0

Re: Canadian taxes showing possible?

That error looks like its the only thing stopping it from working...
all the tax zones and rates show up just like they do in os and in the right order I have both carts loaded on to my local host for comparison and learning. So I assume once this error is corrected its possible that zen might have Canadian taxes shown separately.

23 Sep 2007, 2:31 AM
#3
christoph100 avatar

christoph100

New Zenner

Join Date:
Sep 2007
Posts:
18
Plugin Contributions:
0

Re: Canadian taxes showing possible?

Still have that error...only shows in admin

but the modifications work!! I have tested it with store based in Ont selling to someone in Ont....it adds shipping and GST and PST properly including the proper amount onto the shipping and all this shown on separate lines.:D

Store based in Ont. selling to N.B adds shipping and GST only, including the GST amount on the shipping.

So far it works great in the testing minus that little bug I cant squash. I have uploaded it to so hopefully in a couple of days others can download it and let more testing begin.

and here is a couple of images of the test invoices.

23 Sep 2007, 8:49 PM
#4
christoph100 avatar

christoph100

New Zenner

Join Date:
Sep 2007
Posts:
18
Plugin Contributions:
0

Re: Canadian taxes showing possible?

some of you might be saying that I loaded this on my local server and that maybe why it works, Well here was another test run done today with the code on a fresh install on a remote server. After the install I deleted the Florida tax rate and zone etc.
then I ftped the updated ot_tax.php.. same thing, same error under admin. however when I went over to tax rates/zones there was nothing there this time! (another bug?) I just manually entered the zones and tax information this time. set the one product for new tax rates.... and it worked great!. As long as the updated code is in zen it works even tho it doesn't show that its there.
Now the one thing that seems important during install when zen askes for a prefix for the database tables...such as zen. (thats what I used), is to do so.

Now that zen does what I want. I am probably going to stick with it.
anyone wants to check it working. try it out, create accounts with addresses in Ontario, or other Canadian provinces and one U.S account (no tax)

http://www.christoph.freehyperspace.com/shop
Take a look, another test invoice from fresh install on a remote server.
Chris

23 Sep 2007, 9:56 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Canadian taxes showing possible?

If the code is working for you on your site, feel free to use it.

However, it has been rejected as a contribution because it is destructive (deletes all tax and zone configurations, regardless of their use) and ignores built-in Zen Cart zone and tax calculation features. In its current state it is way too dangerous to be made available to shopowners who don't have a solid understanding of the risks of using it as well as PHP programming in general.

You seem to be content that it is meeting your needs. As such, I won't recommend that you stop using it. However, take note that you will not be able to use Zen Cart's built-in zones features for anything, including taxes, shipping/payment mod restrictions, address restrictions, etc.

We do not mean to discourage your contribution efforts. Please understand that it has been rejected specifically for the reasons stated.

If it's any consolation, the v1.4 release will most likely contain the ability you're looking for by the time it is released next year.

23 Sep 2007, 10:39 PM
#6
christoph100 avatar

christoph100

New Zenner

Join Date:
Sep 2007
Posts:
18
Plugin Contributions:
0

Re: Canadian taxes showing possible?

Yes I just found out what the code does to the rest of zencart...once its in there you can't install or take out anything under moduels/ordertotal. Everything else seems to work tho. I understand why its rejected but please feel free to make the code available to those who know code to perhaps correct the problems with it.
Actually I have another version of the code that does not overwrite the tax zones,rates etc. perhaps I should try to recode that one. There is a chance it might work with out destruction of files and formating.
It was my first time attempting to recode something like this and was a learning experience.

Thanks for considering it.
Chris.

26 Sep 2007, 6:11 AM
#7
christoph100 avatar

christoph100

New Zenner

Join Date:
Sep 2007
Posts:
18
Plugin Contributions:
0

Re: Canadian taxes showing possible?

Well its done the code has been corrected it now can calculate GST/PST/HST with out causing errors to zen cart. :D allows full function of zen, can remove/add the regular zones/moduels with out any difficulty through admin.

Chris.

1 Oct 2007, 3:12 PM
#8
bifficus avatar

bifficus

New Zenner

Join Date:
Sep 2007
Location:
Vancouver, CA
Posts:
87
Plugin Contributions:
0

Re: Canadian taxes showing possible?

Hey Chris,

I am super interested in your work. I am just building out my store, and most sales will be in Canada I expect. Do you think it is ready for primetime?

Thanks for the effort,

Todd

1 Oct 2007, 5:59 PM
#9
christoph100 avatar

christoph100

New Zenner

Join Date:
Sep 2007
Posts:
18
Plugin Contributions:
0

Re: Canadian taxes showing possible?

Thanks for the confidence it not really my work I just converted it to zencart...yes its working fine now. I have eliminated all errors.
I can remove the module or add it at my discretion, plus it allows me to remove add modules with out error in the order total admin.(it used to error) However it still is destructive it changes your ot_tax.php it overwrites the information in there. but its fairly simple enough to re-enter tax zones etc. Mine is set up with GST/PST/HST capability as well as no tax for the U.S.
I offered the work here as a contribution but its turned down cause it over writes all tax info in Ot_tax.php. and like was stated to me..I wont be troubleshooting anyones installs with this code. I had to learn abit of the basics of php to get this to work.
I will gladly offer the corrected version providing I am not held responsible for any damages it could cause from mis setup.
I will leave it up to you guys if its wanted...you will have to approach the moderators to allow this code to be shared.

Chris.

1 Oct 2007, 6:22 PM
#10
bifficus avatar

bifficus

New Zenner

Join Date:
Sep 2007
Location:
Vancouver, CA
Posts:
87
Plugin Contributions:
0

Re: Canadian taxes showing possible?

Hehehe... I guess that's what backups are for right?

How about it, moderator? How do I get a copy of Chris' work to test?

Chris, alternatively, you could go to: http://www.pccapital.ca

and send me a zip file. But, not sure if that breaks some rules of the Zen Cart project, which none of us wants to do! :no:

Thanks again,

Todd

2 Oct 2007, 4:08 AM
#11
christoph100 avatar

christoph100

New Zenner

Join Date:
Sep 2007
Posts:
18
Plugin Contributions:
0

Re: Canadian taxes showing possible?

I prefer to have their ok before I share it with anyone, perhaps it can be uploaded as testing only right here in the thread? The other thing I was thinking about since zen uses templates I am not positive but perhaps it could be put under \includes\modules\order_total\custom\ot_tax.php that way a test template could be implemented with out losing anything else.

Thoughts?

Chris.

3 Oct 2007, 1:35 PM
#12
jund avatar

jund

Zen Follower

Join Date:
Sep 2006
Location:
Ruckersville, VA, USA
Posts:
276
Plugin Contributions:
0

Re: Canadian taxes showing possible?

DrByte:

If the code is working for you on your site, feel free to use it.

However, it has been rejected as a contribution because it is destructive (deletes all tax and zone configurations, regardless of their use) and ignores built-in Zen Cart zone and tax calculation features. In its current state it is way too dangerous to be made available to shopowners who don't have a solid understanding of the risks of using it as well as PHP programming in general.

You seem to be content that it is meeting your needs. As such, I won't recommend that you stop using it. However, take note that you will not be able to use Zen Cart's built-in zones features for anything, including taxes, shipping/payment mod restrictions, address restrictions, etc.

We do not mean to discourage your contribution efforts. Please understand that it has been rejected specifically for the reasons stated.

If it's any consolation, the v1.4 release will most likely contain the ability you're looking for by the time it is released next year.

Dr. Byte,

Please help the helpless (smile)
Does your commentary mean that we should not attempt to use ZC in Canada?

Thank you,

jund

3 Oct 2007, 11:29 PM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Canadian taxes showing possible?

jund:

Does your commentary mean that we should not attempt to use ZC in Canada?

Um ... that's not what I meant at all.
Zen Cart works fine in Canada.

4 Oct 2007, 12:13 AM
#14
bifficus avatar

bifficus

New Zenner

Join Date:
Sep 2007
Location:
Vancouver, CA
Posts:
87
Plugin Contributions:
0

Re: Canadian taxes showing possible?

christoph100:

I prefer to have their ok before I share it with anyone, perhaps it can be uploaded as testing only right here in the thread? The other thing I was thinking about since zen uses templates I am not positive but perhaps it could be put under \includes\modules\order_total\custom\ot_tax.php that way a test template could be implemented with out losing anything else.

Thoughts?

Chris.

Sounds good to me... I really would rather not break my cart to get this... I want to be able to upgrade it later without too much trouble. On the other hand, this is a critical issue to any Canadian cart owner. It isn't just a small issue of appearances.

4 Oct 2007, 2:24 AM
#15
jund avatar

jund

Zen Follower

Join Date:
Sep 2006
Location:
Ruckersville, VA, USA
Posts:
276
Plugin Contributions:
0

Re: Canadian taxes showing possible?

DrByte:

Um ... that's not what I meant at all.
Zen Cart works fine in Canada.

Thanks for the reply... I totally misunderstood... my apologies.
jund

4 Oct 2007, 4:19 AM
#16
christoph100 avatar

christoph100

New Zenner

Join Date:
Sep 2007
Posts:
18
Plugin Contributions:
0

Re: Canadian taxes showing possible?

bifficus:

Sounds good to me... I really would rather not break my cart to get this... I want to be able to upgrade it later without too much trouble. On the other hand, this is a critical issue to any Canadian cart owner. It isn't just a small issue of appearances.

It doesn't break it..it just overwrites your tax information, what ever zones you may have set get changed. Thats why I suggest to have it in it own template.
Yes the taxes are important to us Canadians, so much simpler on the book work to have it calculated and shown properly on invoices.

no answer yet on uploading it as test only?

Chris.