Jump to content

Paypal module not showing with more than 10 items in cart


pdbintheusa

Recommended Posts

My store has been working very well except I ran across a very interesting problem.  I have PayPal USA, Canada v. 1.3.4 installed, set up and working.  I am having a problem with the PayPal module not showing up as a payment method if there are more than 10 unique items in a customers cart.  I did recreate the problem.  There is no error code or any information other than it just is not there.  I have not found any other people with the same problem.  I have no idea where to find a solution.

Link to comment
Share on other sites

I am using version 1.5.6.2 because the theme I'm using isn't compatible with the newest version.  Changing the theme to default doesn't change anything.  I've tried to look for someone with the same problem and I haven't been able to find anything like it.  But anytime I or a customer adds more than 10 unique items to a cart (so 11 of the same product or some combination like that does work) PayPal does not show up as an option to checkout on the payment section of the checkout.

Link to comment
Share on other sites

  • 1 year later...

I am having exactly the same problem!  When the shopping cart has more than 10 (sometimes 9) unique items, the PayPal payment option will not show up in the check out page.  I am using PS 1.6.0.14, and PayPal v1.3.9.

Interestingly, whenever I apply a cart rule, e.g. free shipping or 10% off the total, this problem goes away!  I have no idea what is going on.   For the time being, I have the system automatically apply free shipping on every order higher than $300 (10 items will exceed this amount).  Can someone help with that? 

Link to comment
Share on other sites

I have enabled check payment as well, and it works fine.  I am having issues with PayPal advanced payment, which will not show up at check out page when unique items exceed 10.  However both PayPal standard and PayPal express work fine if I chose either of them instead of PayPal Advanced. Payment amount shows correctly in PayPal standard or PayPal express.

 

I have both check payment and PayPal advanced enabled all the time.   I had this Paypal not-showing issue a while back (several months ago) and I didn't know why.  I just found out that it relates to the number of unique items in carts.  Applying any cart rule will make this problem go away, and the PayPal iframe shows up again. Very strange.

 

Any suggestion is highly appreciated.

Link to comment
Share on other sites

Well, the right suggestion is to report the issue to the developer of the module.  In this case that is Prestashop and I would tell you not to bother.  They haven't fixed any issues reported on this module in over a year.

 

What I would do is 2 fold

1) Install PS v1.6.0.9 and Paypal USA v1.3.9 on a local test store.  Out of the box, not other custom modules or themes and see if the problem occurs again. 

2) Install PS v1.6.1.6 and Paypal USA v1.3.9 on a local test store.  Out of the box, not other custom modules or themes and see if the problem occurs again.

 

If they both fail, then the issue is likely with the module, and it is time for you to move onto a better supported Paypal module.  It's not worth paying someone to fix their broken unsupported module.

 

However if it works on both, or it works in PS v1.6.1.6, then perhaps the issue is not with the module itself.  Perhaps the issue is caused by some other module or theme you have installed, or perhaps the issue is within Prestashop itself.

Link to comment
Share on other sites

  • 1 month later...

I did not find any solution through the web.  Developer or PayPal is not going to solve it any time soon.  Then I decided to start learning some coding from PHP101.  Now it seems like the problem is solved partially.  At least I can take order and receive PayPal payment (PayPal Advance) no matter how many unique items are ordered.

 

The Paypal module (paypalusa.php) sends itemized order information to PayPal.  However PapPal will only receive this itemized information when there is no additional cart rules or discounts (I believe this is a bug).

 

When a cart rule is applied, order itemized information (no matter how many unique items, can be more than 10) at the PayPal end would only show the first item and the total amount, and order will go through with the correct amount charged without any problem.

 

For some reasons (I don't know exactly) PayPal would reject item information when the number of unique items exceed 10.  At the store front, customer will receive error payment information. (A big bug here)

 

To solve this problem, I disabled (commented) the section that sends order item information to PayPal  (I don't need this information through PayPal. It will show up in the BO anyway)

 

It is about line 400 in the paypalusa.php

 

/* if ($this->context->cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS) == 0)
{
foreach ($this->context->cart->getProducts() as $product)
{
$nvp_request .= '&L_NAME'.$i.'['.strlen(urlencode($product['name'])).']='.urlencode($product['name']).
'&L_SKU'.$i.'['.strlen(urlencode((int)$product['id_product'])).']='.urlencode((int)$product['id_product']).
'&L_DESC'.$i.'['.strlen(urlencode(strip_tags(Tools::truncate($product['description_short'], 80)))).']='.urlencode(strip_tags(Tools::truncate($product['description_short'], 80))).
'&L_COST'.$i.'['.strlen(urlencode((float)$product['price'])).']='.urlencode((float)$product['price']).
'&L_QTY'.$i.'['.strlen(urlencode((int)$product['cart_quantity'])).']='.urlencode((int)$product['cart_quantity']);
$i++;
}
$nvp_request .= '&FREIGHTAMT['.strlen(urlencode((float)$this->context->cart->getTotalShippingCost())).']='.urlencode((float)$this->context->cart->getTotalShippingCost()).
'&TAXAMT['.strlen(urlencode((float)$taxes)).']='.urlencode((float)$taxes);
} */
 
It has been working well for my last 10 or so orders.  It would be appreciated if someone could dig into this issue and have some better explanation or solution.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...