View Cart Button -- how do you create it ?

FeralReason
Contributor
Contributor

After redirecting a customer to my site using the "Continue Shopping" button, a user should have the option of returning to the cart without adding anything. This would seem to require a "View Cart" button. However, I can't find anyway to generate this button code -- does PayPal have something to help with this ?

Login to Me Too
12 REPLIES 12

ELabs
Contributor
Contributor

I am running into the same issue. Any help would be appreciated.


@FeralReason wrote:

After redirecting a customer to my site using the "Continue Shopping" button, a user should have the option of returning to the cart without adding anything. This would seem to require a "View Cart" button. However, I can't find anyway to generate this button code -- does PayPal have something to help with this ?


 

 

Login to Me Too

FeralReason
Contributor
Contributor

Got a response from PayPal Developer Support. Here is the code:

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="EMAIL ADDRESS OF YOUR PAYPAL ACCOUNT">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_viewcart_LG.gif" border="0" name="submit" alt="">
<img alt="" border="0" src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
<input type="hidden" name="display" value="1">
</form>

If you are testing in Sandbox, you may have to change the action. Haven't tried this yet. Also, the first time I added a View Cart button (using source I found on the web) I got an error apparently caused by the Cookie. Once you add this, you may have to delete your cookies before this (and any other buttons that have been working) will work.

 

Good luck -- add a comment if you discover anything new.

Login to Me Too

booboys
Contributor
Contributor

The code doesn't work on my client's website (www.sweetgrassrods.com).  I have a website that uses the old version of the paypal add to cart and view cart code; it works just fine. 

 

Why doesn't this work and why isn't there a code generator for View Cart?  This can't be that difficult.  Someone just dropped the ball when the new system was developed.

Login to Me Too

skier
Advisor
Advisor

You're not seeing the forest because there are trees in the way.

 

Each time you generate an Add to Cart item button, there is a link on the same page that displays the code for you to get a copy of the View Cart item button code.  You're just not seeing it however, it is there.   Note also, you really only need one copy of this code, as then you can copy and paste it through out your web site.

 

And no someone did not drop the ball.  They simply redesigned the button creator.  The online button creator generates "hosted" item button code by default, has an item inventory feature and limits you to a maximum of 1,000 saved item code buttons.   In addition specific variables are stored on PayPal's Servers which in turn provides tamper proof protection.   It's important to understand that you cannot edit or modify "hosted" item button code after it has been created.  This all the new stuff folks have been asking for in the past.   Now they have it.  Note, to make changes to the new "hosted" code requires you to go back to your PayPal Account and edit your saved button.  This new method is fine for some folks but, not for others.

 

If you want to generate the code in clear text or like the old method, the following applies:

You can use the Online Button Creator to generate Clear Text if so desired and to save a little coding time.   Here's how:  First, start with a new item button.   What you need to do is "uncheck" the option for "Save Button At PayPal" in Step 2.   Then after you "Create" the button code, in the window that displays the code look for the link that says "Remove Code Protection".   Select this link.   Your code will be changed to clear text and is now ready for additional customization.

 

And if you're having some issues with Continue Shopping button.   See this previous forum post as there are some tips and tricks for making things work smoothly.

 

Regards,

 

skier

Login to Me Too

schoolmom
Contributor
Contributor

First of all - skier, thanks for your help.  I've looked up several topics while trying to figure all this out and your answers seem to be spot-on every time. 

 

I created the standard "view cart" button using the pay pal code generator but I can't figure out how to redirect the user back to my page when using the "continue shopping" button from the cart.  (sorry if that is hard to follow.)  Basically:  user adds something to cart, continues shopping, then decides to view cart without adding anything else, but then cannot continue shopping again after that. 

 

There's no way (that I can find) to add Advanced Variables to the "view cart" button.  At least not simply.  I"m not very HTML literate, though I can poke my way around and add the code if i have it and know where to put it.

 

Help!

Login to Me Too

skier
Advisor
Advisor

There's one exception for not seeing the Continue Shopping button on the PayPal Screens.  If the Shopping Cart is empty and you use the View Cart button, when the PayPal Screen is displayed, there is "no" Continue Shopping button on the PayPal Screen.  To get back to your web page, you must use your web browser's "back" button.  This behavior is by design and there are no features, options or tricks to change it.  If your have an item in the Shopping Cart then you will see the Continue Shopping button on the PayPal Screen.

 

Note also, there are no Advanced Variables for the View Cart item button code.   The View Cart code is simply generated automatically when you create an Add to Cart item button.   You do not create the View Cart code using the online button creator however, you can manually tweak it for better functionality as described in the link I provided in my other post.

 

Regards,

 

skier

Login to Me Too

schoolmom
Contributor
Contributor

I understand you won't see Continue Shopping when cart is empty.  In my situation, there IS something in the cart  and the button is there.

 

 

  1. user adds something to cart
  2. continues shopping
  3. Clicks view cart without adding any additional items (there is still the original item from step 1)
  4. Cannot continue shopping again after that.   There is a continue shopping button, but it does not know where to go.  How do I tell it where to go?

Does this help clarify my issue?

 

Login to Me Too

skier
Advisor
Advisor

See this previous forum post as it explains how to resolve your issue.

 

 

Regards,

 

skier

Login to Me Too

schoolmom
Contributor
Contributor

Yes, but I am using hosted buttons and there are no Advanced Variables for the "return to cart" button.   I understand how to add my page as the return in Advanced Variables fo an "add to cart button" but don't now how to do it after returning to cart.

 

 I think I may just be out of luck. 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.