Results 1 to 7 of 7
  1. #1
    Join Date
    May 2011
    Posts
    7
    Plugin Contributions
    0

    Default [Done v1.5.0] PayPal IPN Missing free Items

    I am running Zen Cart 1.3.9h On godaddy. I am using paypal IPN for payment processing with line items turned on
    Here is what's happening. Customer goes through the check out and upon reaching paypal, cart items are missing and the total is wrong. What gets me is that only some of the items are missing. I have tried to recreate the problem with some success.
    I have an item that I am giving away free to each customer if they add it to the cart. It seems that every item in the cart after the free item and including it disappears once they arrive at paypal.
    I would appreciate any help on this, my customers are leaving because it reflects poorly on our credibility.

    Thanks in advance
    KAZ from usacanbag.com

  2. #2
    Join Date
    May 2011
    Posts
    7
    Plugin Contributions
    0

    Default Re: PayPal IPN Missing Items

    Update: I have turned line items of in paypal IPN and this seems to have corrected the issue with the total. But now I don't have line items in paypal for the customer to see.
    Help please.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: PayPal IPN Missing Items

    What happens if you use Express Checkout instead?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    May 2011
    Posts
    7
    Plugin Contributions
    0

    Default Re: PayPal IPN Missing free Items

    Thanks for the suggestion. Dr. Byte.
    Well I switched over to paypal express and I still have the problem. In this case it seems there is a rounding error on the line item subtotals. Line items are still not displayed. The text of the log fallows.

    ----------------------------------------------
    getLineItemDetails 5
    paypalwpp
    Line-item subtotals do not add up properly. Line-item-details skipped.
    72.03 0Array
    (
    [AMT] => 81.21
    [ITEMAMT] => 72.03
    [TAXAMT] => 0
    [SHIPPINGAMT] => 9.18
    [SHIPDISCAMT] => 0
    [HANDLINGAMT] => 0
    [INSURANCEAMT] => 0
    [L_NUMBER0] => 32FSGSL
    [L_NAME0] => 2 1/2 qt CanBag - 25 Pack
    [L_AMT0] => 16.65
    [L_QTY0] => 1
    [L_NUMBER1] => 2EASAMPLE
    [L_NAME1] => Sample Pack
    [L_AMT1] => 19.611
    [L_QTY1] => 1
    [L_NUMBER2] => 80FSGSL
    [L_NAME2] => 1 1/2 Gallon CanBag - 25 Pack
    [L_AMT2] => 30.375
    [L_QTY2] => 1
    [L_NUMBER4] => 21400
    [L_NAME4] => Ball Blue Book
    [L_AMT4] => 5.39
    [L_QTY4] => 1
    [L_NAME3] =>
    )
    -----------------------------
    The sub total is actually $72.026
    the odd amounts are due to a sale.

    I have some coding skills if someone could point me in the right direction.

  5. #5
    Join Date
    May 2011
    Posts
    7
    Plugin Contributions
    0

    Default Re: PayPal IPN Missing free Items

    Oh forgot to mention. After testing the free items in the cart only show up with no description. Just says "item price $0.00"

  6. #6
    Join Date
    May 2011
    Posts
    7
    Plugin Contributions
    0

    Default Re: PayPal IPN Missing free Items

    Seem to have the subtotal problem fixed with this http://www.zen-cart.com/forum/showth...otals+properly. But the coding seems not with zen standards. Also free item description still not showing.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: PayPal IPN Missing free Items

    Quote Originally Posted by UsaCanBag View Post
    I am using paypal IPN for payment processing with line items turned on
    Here is what's happening. Customer goes through the check out and upon reaching paypal, cart items are missing and the total is wrong. What gets me is that only some of the items are missing. I have tried to recreate the problem with some success.
    I have an item that I am giving away free to each customer if they add it to the cart. It seems that every item in the cart after the free item and including it disappears once they arrive at paypal.
    Moving this to Bug Reports for treatment.

    You can probably resolve this by making the following code substitutions:

    /includes/modules/payment/paypal/paypal_functions.php, around line 762 replace this:
    Code:
        // loop thru all products to prepare details of quantity and price.
        for ($i=0, $n=sizeof($order->products), $k=1; $i<$n; $i++, $k++) {
          // PayPal won't accept zero-value line-items, so skip this entry if price is zero
          if ($order->products[$i]['final_price'] == 0) continue;
    with this:
    Code:
        // loop thru all products to prepare details of quantity and price.
        for ($i=0, $n=sizeof($order->products), $k=1; $i<$n; $i++) {
          // PayPal is inconsistent in how it handles zero-value line-items, so skip this entry if price is zero
          if ($order->products[$i]['final_price'] == 0) {
            continue;
          } else {
            $k++;
          }
    and
    /includes/modules/payment/paypalwpp.php, around line 1158:
    /includes/modules/payment/paypaldp.php, around line 1495:
    Code:
        // loop thru all products to prepare details of quantity and price.
        for ($i=0, $n=sizeof($order->products), $k=0; $i<$n; $i++, $k++) {
          // PayPal won't accept zero-value line-items, so skip this entry if price is zero
          if ($order->products[$i]['final_price'] == 0) continue;
    with
    Code:
        // loop thru all products to prepare details of quantity and price.
        for ($i=0, $n=sizeof($order->products), $k=0; $i<$n; $i++) {
          // PayPal is inconsistent in how it handles zero-value line-items, so skip this entry if price is zero
          if ($order->products[$i]['final_price'] == 0) {
            continue;
          } else {
            $k++;
          }
    NOTE: while there are lots of similarities between these, DO NOT MIX THEM UP! Those 0 and 1 differences are intentional.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Replies: 2
    Last Post: 26 Sep 2008, 08:43 PM
  2. [Done 1.3.9] Duplicate paypal IPN orders
    By gothstone in forum Bug Reports
    Replies: 0
    Last Post: 5 Feb 2008, 01:33 PM
  3. PayPal IPN Orders - missing ALL items
    By quentinjs in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 28 Nov 2007, 09:16 PM
  4. Replies: 10
    Last Post: 20 Feb 2007, 05:41 PM
  5. [DONE 1.3.5] PayPal IPN and eCheck clearing
    By jrafuse in forum Bug Reports
    Replies: 8
    Last Post: 26 Jul 2006, 08:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR