paypal does not redirect

Phoca Cart - complex e-commerce extension
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: paypal does not redirect

Post by Jan »

I don't have any link to your site.

Jan
If you find Phoca extensions useful, please support the project
lupen666
Phoca Member
Phoca Member
Posts: 25
Joined: 24 Jan 2021, 09:43

Re: paypal does not redirect

Post by lupen666 »

good morning Jan, I have not had any more follow up to my request and I can not understand how to solve the problem. can you give me support?
thank you so much
jpeters
Phoca Professional
Phoca Professional
Posts: 225
Joined: 31 Dec 2020, 09:46

Re: paypal does not redirect

Post by jpeters »

Lupen666
please sent jan a PM with url and login details
jpeters
Phoca Professional
Phoca Professional
Posts: 225
Joined: 31 Dec 2020, 09:46

Re: paypal does not redirect

Post by jpeters »

@Lupen666 sent you another PM in this forum please check.
sent Jan a PM with the details. i am unable to help you solving this issue. i have looked but i can not find the issue.
other than that i expect that its a template / framework issue.
Cliffdiver
Phoca Member
Phoca Member
Posts: 25
Joined: 05 Apr 2020, 09:10

Re: paypal does not redirect

Post by Cliffdiver »

Hallo, maybe it's late, but for the future.
I had the same issue and the problem was in my template. The solution was very simple.
I added an onload="functionname()" in my body tag, and this onload function overrids the window.onload javascript of the paypal redirect window. After adding a small snipped of php code, the redirect to paypal worked again.

Code: Select all

<?php 
//check if we load the checkout page. Only at the checkout we need the onload in the body Tag.
//all other pages work fine without it.
if(preg_match('/checkout/',JUri::getInstance())){
	echo '<body id="phoca-site" onload="myFunction()">';
}
else{
	echo '<body id="phoca-site">';
	}
?>
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: paypal does not redirect

Post by Jan »

Hi, great, thank you for this info.

Jan
If you find Phoca extensions useful, please support the project
nscom
Phoca Member
Phoca Member
Posts: 27
Joined: 22 Oct 2021, 12:02

Re: paypal does not redirect

Post by nscom »

Hello, I have the same problem of redirection I added the code in body but it does not work can you help me?
nscom
Phoca Member
Phoca Member
Posts: 27
Joined: 22 Oct 2021, 12:02

Re: paypal does not redirect

Post by nscom »

Should I customize the code especially the body id="phoca-site"?
Thanks
Post Reply