New Zenner
- Join Date:
- Feb 2008
- Location:
- by Nuremberg Germany
- Posts:
- 52
- Plugin Contributions:
- 0
Got shopping cart items to show in PayPal IPN
Well, folks I think I finally figured out the age long problem of the shopping cart items not showing up in PayPal when using the PayPal IPN module (I am using Zen Cart 1.3.8a just in case it matters). Oddly enough, even the core designers of ZC said it couldn't be done. Or maybe my "hack" is screwing up the system, which I am sure I will hear from our master Sensei.
In looking at the paypal.php file it IS set up to transfer all the cart data to PayPal but there was a IF statement stopping it from happening with IPN.
Go to:
includes/modules/payment/paypal.php
Line 241 is:
if (MODULE_PAYMENT_PAYPAL_DETAILED_CART == 'Yes') $optionsLineItems = ipn_getLineItemDetails();
Delete the:
if (MODULE_PAYMENT_PAYPAL_DETAILED_CART == 'Yes')
So it only reads:
$optionsLineItems = ipn_getLineItemDetails();
Seems like that IF statement was there when there was an option in the PayPal IPN payment module to "send a detailed cart" to PayPal, which isn't an option anymore (or was it ever??).
PLEASE, make a backup of the file before you change it because this is not going in an override folder. Also, this is just for the PayPal IPN module but I just did the change on two sites and both work great. One is using the FEC (Fast & Easy Checkout) module and the other is using the COWOA (Checkout without account) module. I only hope this will work for others but who knows if it has any conflicts with other mods, etc.
One problem I found is with the Optional Insurance module. Seems like since PayPal does not have a field for optional insurance it throws the system an error and defaults it to the old way (showing only the total order and "store receipt") if somebody selects it or you have it set as mandatory. So it looks like the optional insurance is going to have to go in lieu of the benefit of having the shopping cart items show in PayPal.
If anybody has a cool idea on how to get the Insurance values over to PayPal, please let me know. Even if they got "combined to one value" in the shipping total on the checkout confirmation page would work for me!