Post by sboudot » Fri May 05, 2017 8:56 pm

Hi all,

OpenCart 2.3.0.2

I'm not sure if this is the correct area to post this and if not please point me in the right direction and I'll post there.

I've had a weird issue come up recently with only PayPal Standard Payment module. No custom functionality in the module. The payment is done successfully and comes back to the success page. The conversion code is generated correctly as well (placeholder text just shown as example):

Code: Select all

ga('ecommerce:addTransaction', {
  'id': 'idnumber',                     // Transaction ID. Required.
  'affiliation': 'storename',   // Affiliation or store name.
  'revenue': 'total',               // Grand Total.
  'shipping': 'shippingtotal',                  // Shipping.
  'tax': 'taxtotal'                     // Tax.
});

ga('ecommerce:addItem', {
	  'id': 'idnumber',                     // Transaction ID. Required.
	  'name': 'productname' ,    // Product name. Required. Escape common characters
	  'sku': 'skunumber',                 // SKU/code.
	  'category': 'categoryname',         // Category or variation.
	  'price': 'productprice',                 // Unit price.
	  'quantity': 'productquantity'                   // Quantity.
	});
The issue is, when the conversion goes to Google, the only parts that come through are the Order ID and the Shipping Total. Revenue goes to 0 and no product information comes in. I've confirmed through test orders that the code is generated correctly on the page with no Javascript errors.

The weirdest thing is that we also use Cheque/Money Order and PayPal Payflow Pro as possible payment options and both of those have had no issues with conversions. All data is in the conversion sent is displayed properly on the Google side.

The difference I'm seeing right now is that with PayPal Standard, it looks like some URL parameters are being added (Again, Xs are just placeholders):

Example PayPal Payflow Pro Previous Path (from Google): /index.php?route=checkout/success
Example PayPal Standard Previous Path (from Google): /index.php?route=checkout/success&amt=XXX.XX&cc=USD&cm=XXXXXX&st=Completed&tx=XXXXXXXXXXXXXXXXX

I've double checked to confirm and the return URL is correctly set to just /index.php?route=checkout/success when posting to PayPal.

Is there anything else I should be checking or has anyone ran into this issue before? Is it possible these URL parameters added by PayPal to the return link are causing the data to be sent incorrectly?

Thanks for any input!

Newbie

Posts

Joined
Thu May 04, 2017 10:42 pm
Who is online

Users browsing this forum: No registered users and 15 guests