|
|
|
PayPal Developer Community >
Forums >
Technical Discussion >
PayPal Shopping Cart >
Shopping Cart continue shopping button notes (part 2)
|
|
|
|
|
|
Shopping Cart continue shopping button notes (part 2)
[ Edited ]
|
|
PayPal_FrankIb
Moderator
Posts: 13853
Registered: 06-07-2006


Message 1 of 10

Viewed 4,218 times
|

|
|
If you are having trouble with the continue shopping button and you are using IE7 or Firefox then you will need to modify the code since they work with tabbed browsing.
You need to make the following changes to the code:
Code: in the action line you need to change it to
<form action="https://www.paypal.com/cgi-bin/webscr method="post" target="_self">
add the following line
<input type="hidden" name="shopping_url" value="pageyouwantthecustomerreturnedto"> There is a shopping cart that was referred to in the other post that works with tabbed browsing
If you want to populate, the shopping_url on the fly you can use PHP to do this. This will return the buyer to the same page they came from when they clicked on the add to cart button.
Code: <—php echo "<input type=hidden name=shopping_url value=http://" . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'];">" –> Thanks to ArcticFox for contributing these pearls of information 
Message Edited by PayPal_FrankIb on 02-13-2008 01:36 PM Frank I. PayPal Certified Developer PayPal Merchant Technical Services Analyst http://www.paypaldeveloper.com PayPal, an eBay Company
Give a man a fish, and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
|
|
|
|
02-13-2008 10:45 AM
|
|
|
|
|
|
Re: Shopping Cart continue shopping button notes (part 2)
[ Edited ]
|
|
ArcticFox
Trusted Contributor
Posts: 83
Registered: 01-29-2007

Message 2 of 10

Viewed 4,216 times
|

|

Always willing to help move us forward to make more profits! Thanks Frank!
.
Message Edited by ArcticFox on 02-17-2008 10:13 PM
<---My cart is now coded by E-Junkie - awesome features, easy to use!
|
|
|
|
02-13-2008 10:50 AM
|
|
|
|
|
|
Re: Shopping Cart continue shopping button notes (part 2)
[ Edited ]
|
|
jcmaas
Regular Contributor
Posts: 37
Registered: 02-16-2008


Message 3 of 10

Viewed 4,009 times
|

|
Sorry if this is a dumb question, but does one have to change "shopping_url" to an actual url or just change the value part? I added the target="_self" and <input type="hidden" name="shopping_url" value="www.kkbabyboutique.com/bags.htm"> But it brings up an error 404 page. I did notice that between the example given here and the code that the button generator gave me there is one other difference - the generated version has a " after wbscr where this example does not. Does anyone know why I'm getting the error page? Thanks!
Update: I don't know why but now when I click the continue shopping button my original page (my site) goes to PayPal login. This is with Firefox v2 and IE7
Message Edited by jcmaas on 02-22-2008 12:27 AM
|
|
|
|
02-21-2008 07:41 PM
|
|
|
|
|
|
|
|
Re: Shopping Cart continue shopping button notes (part 2)
|
|
skier
Ace Developer
Posts: 6574
Registered: 06-01-2007


Message 5 of 10

Viewed 3,717 times
|

|
|
If you have modified your code as per the post in this thread and the Continue Shopping is still not working. Delete your web browser's cookies, close the browser, reopen it and try testing again. As for View Cart Code, check the example below: Code: This is the standard View Cart code:
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="https://www.paypal.com/en_US/i/btn/view_cart_02.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="youremail@youremail.com">
<input type="hidden" name="display" value="1">
</form>
This a text link example:
<a href="https://www.paypal.com/cart/display=1&business=youremail@youremail.com" & target="paypal">View Cart</a> Regards,
skier
|
|
|
|
03-07-2008 03:06 PM
|
|
|
|
|
|
|
|
Re: Shopping Cart continue shopping button notes (part 2)
|
|
skier
Ace Developer
Posts: 6574
Registered: 06-01-2007


Message 7 of 10

Viewed 3,702 times
|

|
|
The cookie issue is quite common. Agree and another good place to document cookie info would be the Website Payments Standard Integration Guide. PayPal relies on the use of cookies to track what's in your cart and retain other info about you and therefore the screen that is displayed may not be the screen you expect to see. You want PayPal to see you as new visitor each time when you test. For example, the cookie that holds the cart info will retain that info for 21 days. The only way it will change is if you remove the items selected from the cart or delete the cookie.
Other instances are, let's say you changed your business email address or business graphic logo. If you don't delete the cookies before you test to see the new email address or business graphic logo on the PayPal Screens, you will still see the old information. I believe when you create an Add to Cart button online, the View Cart button code is also created. It's just displayed lower on the page sometimes out of view. Not sure of the real reason behind not being able to encrypt Add to Cart buttons on line. However. from my experience, it's not really necessary. Should you want to use a script to manage the options and/or forms, it would be bit of a challenge to encrypt the script and button code. Regards, skier
|
|
|
|
03-07-2008 04:24 PM
|
|
|
|
|
|
Re: Shopping Cart continue shopping button notes (part 2)
|
|
pixfix
Newbie
Posts: 1
Registered: 03-11-2008


Message 8 of 10

Viewed 3,553 times
|

|
What an exciting solution! I'm a newbie at posting so forgive my lack of etiquette here. I've been trying to modify my continue shopping button within the standard paypal cart. I've just taught myself a little php and mysql so the solution to populate the shopping_url on the fly makes sense to me- I tried to implement it but for some reason a javascript is showing in the source code of my shopping cart which is over-riding the new elegant solution.
I'm fairly sure I didn't write this- I wouldn't know how- and the javascript in the header shows it's coming from Paypal. How do I deactivate it?
Also, how do I post the code sample here? When I try it corrects me and states that incorrect HTML is being posted and then erases the code.
Instead I've attached a document where I've pasted the javascript header info and the two code items pertaining to continue shopping from my shopping cart source code.
Thanks for your help
|
|
|
|
03-12-2008 09:57 AM
|
|
|
|
|
|
Re: Shopping Cart continue shopping button notes (part 2)
[ Edited ]
|
|
andysites
Visitor
Posts: 1
Registered: 08-07-2008


Message 9 of 10

Viewed 2,020 times
|

|
|
Hey Frank, I would like to use the PHP to let my users get back to the page they were shopping before they added to cart. I know nothing about PHP. My button is simply linked to "default". Any help? www.sunsetmountain.com Andy Message Edited by andysites on 08-07-2008 07:22 AM
|
|
|
|
08-07-2008 07:21 AM
|
|
|
|
|
|
Re: Shopping Cart continue shopping button notes (part 2)
|
|
PayPal_FrankIb
Moderator
Posts: 13853
Registered: 06-07-2006


Message 10 of 10

Viewed 2,004 times
|

|
|
Hi Andy, You won't need to go that elaborate to get back to the exact page the customer came from. Add the 'shopping_url' variable with the URL of the page they are coming from. <input type="hidden" name="shopping_url" value="http:/www.mydoemane.com/mywonderfulwebpage">
This can be added anywhere between the form tags in the HTML button code.
Frank I. PayPal Certified Developer PayPal Merchant Technical Services Analyst http://www.paypaldeveloper.com PayPal, an eBay Company
Give a man a fish, and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
|
|
|
|
08-07-2008 02:15 PM
|
|
|
|
|
|
|