close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

paypal says cart is empty

Thread began 7/09/2010 10:32 am by watercolor346374 | Last modified 7/09/2010 2:06 pm by Eric Mittman | 1606 views | 4 replies |

watercolor346374

paypal says cart is empty

Hi,
I am using my paypal sandbox to process orders. When I click on Place your order (checkout). I get the message from paypal: Your cart is empty. I checked the script, and cannot see why it would see an empty cart. Could you please check it out?
Thank you,
K
On this confirm I did not change the line directing the confirm to my sand box, I did change it and I still get the same error message that the cart is empty.
line that I changed that is not in the script I sent:
<form name="checkout_PP_LI_Hid" action="https://www.sandbox.paypal.com/cgi-bin/webscr"
method="post"
The account number is my sand box account

Attached Files
confirm.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

please post a link where I can see the problem to investigate the cause.

Sign in to reply to this post

Eric Mittman

The page looks ok to me, so long as you are matching up the account with the correct URL it seems that this should work. Do you see the items on the page when you get to the confirm page? If so and you submit the form it should send the cart contents to PayPal directly. Do you have a link where we can check on this?

Sign in to reply to this post

watercolor346374

pay pal

Hi Eric,
I figured out why, I did not have the following:
<input type="hidden" name="item_name_<?php echo $winkee_Index+1; ?>" id="item_name_<?php echo $winkee_Index+1; ?>" value="<?php echo $winkee->DisplayInfo("ID") ?>" />

instead I had:
<input type="hidden" name="item_name_<?php echo $winkee_Index+1; ?>" id="item_name_<?php echo $winkee_Index+1; ?>" value="<?php echo $winkee->DisplayInfo("Name") ?>" />

I know that the hidden fields are sent to paypal. I have some questions about them:
1. If I put anything else here but ID, the order is not seen by paypal. So this is where I bound the prodid? Also where does the item_name come from?
<input type="hidden" name="item_name_<?php echo $winkee_Index+1; ?>" id="item_name_<?php echo $winkee_Index+1; ?>" value="<?php echo $winkee->DisplayInfo("ID") ?>" />
In this one I put the SKU Number, Where did the item_number come from?
<input type="hidden" name="item_number_<?php echo $winkee_Index+1; ?>" id="item_number_<?php echo $winkee_Index+1; ?>" value="<?php echo $winkee->DisplayInfo("SKU") ?>" />
In these fields I can add more, can I change "on0_ and if so if I wanted to change it to size, how would I do that
<input type="hidden" name="on0_<?php echo $winkee_Index+1; ?>" id="on0_<?php echo $winkee_Index+1; ?>" value="" />
<input type="hidden" name="os0_<?php echo $winkee_Index+1; ?>" id="os0_<?php echo $winkee_Index+1; ?>" value="" />
<input type="hidden" name="on1_<?php echo $winkee_Index+1; ?>" id="on1_<?php echo $winkee_Index+1; ?>" value="" />
<input type="hidden" name="os1_<?php echo $winkee_Index+1; ?>" id="os1_<?php echo $winkee_Index+1; ?>" value="" />

When I got through to PP, I noticed that the headings were limited, only ID, description, price and total. Is this because of the way I have my fields, or is it a paypal issue?
Thank you,
K

Sign in to reply to this post

Eric Mittman

The name of the item that you send to PayPal is contained in the name element. The id value that you are using is the itemID that is set in the add to cart server behavior. The SKU is just another column in your cart, using it for the item number is appropriate. If it is working for you like this then it seems that you have it setup correctly.

For the options you would use the on0 and os0 for the first option name and option selection (value), then on1 and os1 for the second option name and value. Each item can have multiple options and values for it. So if you would like to show an item as having a particular size it might look like this:

php:
<input type="hidden" name="on0_<?php echo $winkee_Index+1?>" id="on0_<?php echo $winkee_Index+1?>" value="Size" />

<input type="hidden" name="os0_<?php echo $winkee_Index+1?>" id="os0_<?php echo $winkee_Index+1?>" value="<your size column from the cart>" />



You would bind the size column from your cart to the os0 value.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...