Post by jaysh32 » Mon Oct 27, 2014 2:22 pm

Hey all,

I'm curious why the PayPal express module add's Tax as a seperate line item? PayPal and accounting reports become more difficult when tax is a line item, and not in the proper "tax" field that PayPal provides.

Also, collecting sales tax does not happen unless the customer enters their information in the cart to "Calculate Tax & Shipping." If the customer is in a state where you would collect tax, and they go straight to express checkout and bypass enterting freight & tax quote, then they can submit order without collecting tax.

My tax tables in OC seem to be working as they work with PayPal Pro, it just seems to not be 100% w/ express.

My idea is now to find a way to get the address that PayPal provides when kicking back to the PayPal Express Confirm page, and run a check to see if it matches any of my tax profiles. Has anyone tackled this yet?

Thanks!

Newbie

Posts

Joined
Sat Oct 18, 2014 3:54 am

Post by marmax » Mon Oct 27, 2014 8:29 pm

I use paypal express checkout but have not noticed the problem. Do you mean paypal express button? I have not implemented this one, so...

New member

Posts

Joined
Fri Oct 10, 2014 4:34 am

Post by jaysh32 » Tue Oct 28, 2014 1:16 am

That is correct, sorry for not clarifying in the earlier post. This is for the paypal express button.

Newbie

Posts

Joined
Sat Oct 18, 2014 3:54 am

Post by jaysh32 » Wed Oct 29, 2014 2:25 pm

Well I researched the idea for a few hours tonight, and am coming up very short...

If the PayPal Express Checkout button is on the cart page, how do people using opencart + pp express collect tax for their zone id's they have entered?

It would seem that OC file PayPalExpressConfirm would need to do another sanity check against the address, and if the state / region is taxable, collect tax. This is how it is done with shipping, just need to have same logic for tax.

Was this how it was on 1.5.6?

Newbie

Posts

Joined
Sat Oct 18, 2014 3:54 am

Post by jaysh32 » Fri Oct 31, 2014 1:27 pm

Admin you can mark as solved....

I'll leave this answer here for anyone who comes along this however. When Opencart returns from PayPals express checkout Auth, if the customer is a guest and not logged in, it uses a different address array to store the address info.

This array is found w/ :
$this->session->data['guest']['shipping']

What you need to do is VQMOD the system / tax file, and add a line...

Original:

Code: Select all

if (isset($this->session->data['shipping_address'])) {
			$this->setShippingAddress($this->session->data['shipping_address']['country_id'], $this->session->data['shipping_address']['zone_id']);
		} elseif ($this->config->get('config_tax_default') == 'shipping') {
			$this->setShippingAddress($this->config->get('config_country_id'), $this->config->get('config_zone_id'));
		}
With my edit:

Code: Select all

elseif (isset($this->session->data['guest']['shipping'])) {
			$this->setShippingAddress($this->session->data['guest']['shipping']['country_id'], $this->session->data['guest']['shipping']['zone_id']);
		}

Newbie

Posts

Joined
Sat Oct 18, 2014 3:54 am

Post by Cue4cheap » Fri Jan 02, 2015 1:51 pm

Interesting.... this behavior does the same thing when using 1.5.6.x.

But since it looks like the code is different between 1.5.6.x and 2.0 your mod doesn't seem to work. Also a search on the forum doesn't seem to come up with this topic before. I wonder why? Seems like there would be more then just you and I who have used PayPal express checkout and noticed the same thing for in state sales.

I'll look at the /system/library/tax.php file tomorrow and see how your code needed to be changed to work with 1.5.6.x.

Mike

www.cuesplus.com


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by Cue4cheap » Sat Jan 03, 2015 4:57 am

Well I tried it in the 1.5.6 file and no go. So odd this hasn't been mentioned/fixed before (and for 1.5.6).

EDIT: I uploaded the 1.5.6.4 paypal express files and low and behold things are working for tax. I have orders going on so I'll wait to see if it is the files I uploaded or your fix (or both) that fixed it.

Mike

www.cuesplus.com


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by bifflowman » Sun Jul 01, 2018 6:23 am

Cue4cheap wrote:
Sat Jan 03, 2015 4:57 am
EDIT: I uploaded the 1.5.6.4 paypal express files and low and behold things are working for tax. I have orders going on so I'll wait to see if it is the files I uploaded or your fix (or both) that fixed it.
What changes did you make to jaysh32's code? I'm using 1.5.6.4 and am experiencing the same problem. I can't get it to work. From what I've seen this tax issue is present in all OC versions when using the paypal express button. I don't understand why nobody is talking about this.

New member

Posts

Joined
Fri May 04, 2012 12:12 pm
Location - Barrington IL

Post by IP_CAM » Sun Jul 01, 2018 9:32 am

Well, since you talk about v.1.5.6.4 Versions, some PayPal-related fixes have been made in it's
no longer v.1 released successor, the v.1.5.6.5_rc, among others. It would therefore be of advantage,
to at least replace the files in charge with those, taken out of a downloaded Version 1.5.6.5_rc,
or overwrite an existing installation in full, if DEFAULT-only Code is part of DEFAULT 1.5.6.4 Files.
Just figured, and might not directly be related with your problem ... ;)
Ernie
---
OC v.1.5.6.x Change Log:
https://github.com/opencart/opencart/bl ... angelog.md
Default OC v.1.5.6.5_rc Download Link:
https://github.com/IP-CAM
---
Image

Attachments

1565_github_updates.jpg

1565_github_updates.jpg (157.88 KiB) Viewed 252 times


For Sale: Top URL's, including OpenCart V-Pro installed, like seen here:
http://www.bigmax.ch - http://www.ipcam.li - http://www.opencart.li
For Information + URL's offered, please contact me at: jti@jacob.ch
I am NOT available for Custom Support in existing OC Installations!
My Github Repositories: https://github.com/IP-CAM
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 3 guests