Post by JNeuhoff » Fri Nov 11, 2016 8:24 pm

I think the concept of using the Paypal Express module is somewhat flawed.

For example, if the Paypal Express module is configured to show up as an Express Checkout button on places other than the regular checkout sequence, and a user clicks on that button, there is no guarantee that Opencart knows about the customer's address, the shipping quote, or even whether the taxes (e.g. VAT) applies or not. In many cases the user only enters his address and delivery details on the Paypal pages, but he won't be charged for the shipping costs. He might always be charged a VAT if it is UK-based Opencart shop, even if the customer enters an address from outside the VAT zone, e.g. US or Canada, on the Paypal pages.

Hence my question: Has anybody successfully addressed these issues? Is it possible to replicate the same tax rules and shipping rules on the Paypal pages? If so, how and where?

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Burt65 » Tue Nov 15, 2016 11:33 am

JNeuhoff wrote:I think the concept of using the Paypal Express module is somewhat flawed.

For example, if the Paypal Express module is configured to show up as an Express Checkout button on places other than the regular checkout sequence, and a user clicks on that button, there is no guarantee that Opencart knows about the customer's address, the shipping quote, or even whether the taxes (e.g. VAT) applies or not. In many cases the user only enters his address and delivery details on the Paypal pages, but he won't be charged for the shipping costs. He might always be charged a VAT if it is UK-based Opencart shop, even if the customer enters an address from outside the VAT zone, e.g. US or Canada, on the Paypal pages.

Hence my question: Has anybody successfully addressed these issues? Is it possible to replicate the same tax rules and shipping rules on the Paypal pages? If so, how and where?
Personally I don't use the module because i'm failing to see the real purpose...
I'm using single page checkout and the checkout button is available in the header all the times, so why would I need another button that virtually does the same thing. Is not that much quicker anyway..
Plus, 70-80% of my sales are purchases made by guests.

I have however used Paypal checkout button on other websites and when I enter my email and password, it automatically generate a sale tax invoice with all the correct details and I never got charge for taxes.

But I had to stop using those "Quick Checkout buttons" because of the problem with Paypal and Exchange fees, since now all banks do charge for exchange fees based on the Invoice origin and not on the vendor banking details anymore...No point in paying twice the same fee... ;D

Over 95% of all computer problems can be traced back to the interface between the keyboard and the chair...


User avatar
Active Member

Posts

Joined
Mon Nov 18, 2013 3:23 pm
Location - Oz

Post by JNeuhoff » Wed Nov 16, 2016 12:50 am

I noticed you can define tax rules on the Paypal end for selected countries. And it even offers to define shipping rates there, too, though it's quite limited, it's mainly based on the cart total (fixed or percentage rates), nothing weight-based, nor geo-zones.

Paypal Express is supposed to be an alternative checkout, and as such should not rely on Opencart's tax rules or shipping quotes at all. Opencart should just receive an IPN from Paypal once the Paypal Express checkout has been successfully completed, and should take Paypal's calculated shipping and taxes, along with the ordered items, and store it as that in OpenCart.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by msangani » Wed Jul 18, 2018 12:28 pm

OC 2.1
I was able to resolve this, so posting my solution here for others.

The way I have designed my website is to use weight field as per-product shipping and completely bypassing weight-based shipping method. So for example my product XYZ has price of $99.99 + $2 (Shipping). The 2 is set as weight for product XYZ. Likewise all products would have different weights, which would act as shipping.

I have made following changes to catalog/model/payment/pp_express.php

$i = 0;
$item_total = 0;
$shipping_total = 0; // CUSTOM
:

$item_total += number_format($item_price * $item['quantity'], 2, '.', '');
$shipping_total += number_format($item['weight'], 2, '.', ''); // CUSTOM

$data['L_PAYMENTREQUEST_0_QTY' . $i] = $item['quantity'];
:
$data['PAYMENTREQUEST_0_ITEMAMT'] = number_format($item_total, 2, '.', '');
$item_total += $shipping_total; // CUSTOM
$data['PAYMENTREQUEST_0_AMT'] = number_format($item_total, 2, '.', '');
$data['PAYMENTREQUEST_0_SHIPPINGAMT'] = number_format($shipping_total, 2, '.', ''); // CUSTOM

That's it! The above code should pass on shipping to PayPal. Please note you should enable "Require Shipping" and put in some amount for "Per Item Shipping"

To get weight field added. Modify the file: catalog/controller/product/product.php

$data['model'] = $product_info['model'];
$data['weight'] = (int)$product_info['weight']; // CUSTOM
$data['reward'] = $product_info['reward'];


if ($this->config->get('config_review_status')) {
$rating = (int)$result['rating'];
} else {
$rating = false;
}

// START CUSTOM: Add Weight
if ($result['weight']) {
$weight = (int)$result['weight'];
} else {
$weight = 0;
}
// END CUSTOM: Add Weight


'rating' => $rating,
'weight' => $weight, // CUSTOM

Hopefully someone can write OCMOD for this.

New member

Posts

Joined
Sat Jan 17, 2015 1:12 pm
Who is online

Users browsing this forum: No registered users and 70 guests