Jump to content

Guest Checkout and Paypal - not working in 1.5.3 install


Recommended Posts

I am new to Prestashop and hoping to use it for my store.

I have a fresh installation of PS1.5.3 with default theme. http://www.swaefas.com/hipresta

 

I am testing out the paypal module (3.4.4) and my configuration works fine if I use the paypal button direct OR if I register as a customer.

 

But I can't get it to work for guest checkout. After the paypal login/confirmation screens it takes me straight back to the store home page (no error messages). The customer details are entered into the database - but no order or payment is taken.

 

I see this was a a fix in 1.5.2 - could it have come back? I tried a 1.5.2 installation but couldn't get paypal to work at all which is why I upgraded.

 

I don't know enough to debug any further so would be very grateful for some help.

Julie.

Link to comment
Share on other sites

Hi Julie. If the order is processed correctly, you should be brought back to the order confirmation screen.

Can you see if it redirects you 2 times after the payment? Maybe first to that page, then to the home? Also, try turning on PS_MODE_DEV in config/defines.inc.php if you didn't do it already

Link to comment
Share on other sites

Thank you Nemo1

The order is not processed correctly and I am redirected to the home page (with the product still in the shopping cart) - It doesn't appear to go to the confirmation screen first but perhaps it is too quick to see!

 

I will turn on PS_MODE_DEV and see what that shows.

Thanks,

Julie.

Link to comment
Share on other sites

Hi

I turned on PS_Mode_dev but I don't get any errors on this problem.

 

The problem only occurs when I do the following:

1. Prestashop One Page Checkout is enabled

2. Guest Checkout is enabled

 

Then if I try to checkout as a guest it doesn't finish the transaction (no payment, no order, product remains in cart). All other versions of checkout work ie. Guest checkout with the 5 step checkout works ok.

 

I really don't know how to debug this any further. Any ideas?

Link to comment
Share on other sites

Hi Nemo1

I can't see any errors

I want the store to be multi-vendor so have spoken to the Agile guys about the problem. They have promised to sort it for me if it is still a problem after they have installed all their stuff.

Many thanks for your help though- much appreciated.

Julie.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

Hi everyone,

 

I also have this same problem. On top of this if I am logged in as a customer and click on "Accept terms and conditions" I get taken straight to the Order Summary page instead of being able to choose payment methods first (it is impossible to choose bankwire because the page redirects as soon as i tick the box "Terms and conditions").

Another issue I have is that when I enable PayPal module the "voucher" part of the shopping cart disappears. It flashes for half a second and then disappears.

 

UPDATE: I don't know what I have done but it now all of a sudden seems to work. I think I changed back to the default theme and then again back to the one I am using. Maybe it was a caching issue, not sure.

Edited by cyjambo (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Hi! Had anyone found a solution for this yet? I'm in the same boat, the problem only occurs when I do the following:

 

1. Prestashop One Page Checkout is enabled

2. Guest Checkout is enabled

 

Then if I try to checkout as a guest, the moment i click on "Accept terms and conditions" I get taken straight to home page.

 

It works fine for Guest checkout with the 5 step checkout but not when One Page Checkout is enabled which is what i need.

Link to comment
Share on other sites

Hello,

 

I have the same problem using paypal prestashop module 3.4.8 and prestashop 1.5.2. or 1.5.3.1 with the same options:

 

1) Guest checkout and 2) Single page checkout. Paypal module is configured as express checkout.

 

 

I figure out that this line of code is responsible inside controllers/front/confirm.php:

 

 if (!$this->context->customer->isLogged() || empty($this->context->cart))
  Tools::redirect('index.php');

 

 

Why these two lines exist ?

Link to comment
Share on other sites

  • 1 month later...

Hi everyone,

 

@ glampros: judicious comment :). Guest check out means that $this->context->customer->isLogged() is false. So redirect to home page!

 

I would replace this by :

if ( (!$this->context->customer->is_guest && (!$this->context->customer->isLogged() || empty($this->context->cart)) )
|| ( $this->context->customer->is_guest && empty($this->context->cart) ) )
Tools::redirect('index.php');

in modules\paypal\controllers\front\confirm.php

 

Because we need to find out the process, guest or customer.

1st line, check out as a customer (so not as a guest): same current test

2nd line, check out as a guest: check if cart not empty because we need context->cart afterwards

 

I tried out as a guest or as a customer and it worked. Please try out carefully !

 

Denis

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...

DD_DD thanks for your reply to this post.  Was having the exact same problem (redirecting to Home page and order not completing) and had been struggling to find a solution. 

 

Just to let you (and anyone else having this issue) that your advice to change the above lines in "confirm.php" works.

 

Prestashop test payments with Paypal working fine now when above lines of code amended. (I was using Prestashop 1.5.6.1 with Paypal module version 3.6.1).

Link to comment
Share on other sites

  • 6 months later...

Hi all. 

I am having a similar issue but in my case, when one clicks on the paypal payment option, they are taken back to the homepage and that's it instead of being taken to paypal.

 

this only began to happen when i activated multi store but even after deactivating the paypal issue is still there. 

 

i have done the code replacement mentioned above but no good, did not work.

 

any ideas?

jez...

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...