close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

PayPal "Error Detected" - shopping cart is empty

Thread began 3/27/2011 10:45 pm by SaladoGuy | Last modified 3/30/2011 3:18 pm by Jason Byrnes | 18611 views | 9 replies |

SaladoGuyBeta Tester

PayPal "Error Detected" - shopping cart is empty

I have made several carts using eCart and PayPal as my main checkout gateway. The site is live (softdipes.com) and I am getting the following error when I try to checkout.

Error Detected
Your shopping cart is empty

The order is being stored in the database but PayPal seems to not be getting any data. Any ideas?

Thanks

P.S. I included a zip of most of my website. I would upload the whole website, but can't due to the file size limit.
Hope I included in the zip, everything you need to see help me with my problem.

Attached Files
softdiapes.zip
Sign in to reply to this post

Jason ByrnesWebAssist

When I view source of the confirm page, the item name being passed to paypal is empty:

<input type="hidden" name="item_name_1" id="item_name_1" value="" />

The item name is a required value.

it would seam that the add to cart button is not populating the Name column of the cart object.

Sign in to reply to this post

SaladoGuyBeta Tester

PayPal "Error Detected" - shopping cart is empty

How would be the best way to fix this issue?

Thanks,
Mark

Sign in to reply to this post

Jason ByrnesWebAssist

you need to make sure the add to cart buttons are populating the name column of the cart object.

Sign in to reply to this post

SaladoGuyBeta Tester

PayPal "Error Detected" - shopping cart is empty

Is there a article on how I can find out how to fix this problem?
I'm not exactly sure to do what you said.

Thanks for your help.

Sign in to reply to this post

Jason ByrnesWebAssist

the problem is in the add to cart button server behaviors.


on any page that you have added the add to vcart button server behaviors, you need to edit the Add to cart button server behavior to make sure that a product name is being added to Name column in the cart.

Sign in to reply to this post

SaladoGuyBeta Tester

Originally Said By: Jason Byrnes
  the problem is in the add to cart button server behaviors.


on any page that you have added the add to vcart button server behaviors, you need to edit the Add to cart button server behavior to make sure that a product name is being added to Name column in the cart.  



I believe this fixed it, I modified the binding the in Server Behaviors. It now posts through to PayPal correctly.

However now I have a different problem, when I select a size option on the product page, it's supposed to increase the price (Medium, add $2, Large, add $4) and these prices are supposed to be pulled from the database. This no longer works, the price is not increased in the cart, even though the fact that the size has changed is showing correctly on the viewcart page. I can't figure this one out I've tried changing the binding to several different things and none are working. Could you show me how to set that binding right?

If I was just trying to echo the option, I would use this and it would work:
<?php echo $row_rsSize['OptionPriceIncrement']?>

I tried setting the binding to just that and it did not cause the actual item price to increase in the cart.

<?php
// WA eCart AddToCart
if (isset($_POST["softdipes_cart_1_ATC"]) || isset($_POST["softdipes_cart_1_ATC_x"])) {
$ATC_itemID = $_POST["softdipes_cart_1_ID_Add"];
$ATC_AddIfIn = 2;
$ATC_RedirectAfter = "viewcart.php";
$ATC_RedirectIfIn = "";
if (isset($totalRows_rsProduct) && $totalRows_rsProduct > 0) {
$row_rsProduct = WAEC_findRecordMySQL($rsProduct, "ProductID", $ATC_itemID);
if ($row_rsProduct) {
$ATC_itemName = "".$row_rsProduct['ProductName'] ."";// column binding
$ATC_itemDescription = "".$row_rsProduct['ProductDesc'] ."";// column binding
$ATC_itemThumbnail = "";// column binding
$ATC_itemWeight = floatval("0");// column binding
$ATC_itemQuantity = "".$_POST["softdipes_cart_1_Quantity_Add"] ."";// column binding
$ATC_itemPrice = floatval("".$row_rsProduct['ProductPrice'] ."");// column binding
$ATC_itemcolor = "".$_POST["softdipes_cart_1_color_Add"] ."";// column binding
$ATC_itemsize = "".$_POST["softdipes_cart_1_size_Add"] ."";// column binding
$ATC_itemsizePriceInc = "".$_POST["softdipes_cart_1_sizePriceInc_Add"] ."";// column binding
mysql_data_seek($rsProduct, 0);
$row_rsProduct = mysql_fetch_assoc($rsProduct);
}
}
$ATC_itemQuantity = floatval($ATC_itemQuantity);
if (is_numeric($ATC_itemQuantity) && $ATC_itemQuantity != 0) {
$softdipes_cart->AddToCart($ATC_AddIfIn, $ATC_RedirectIfIn, $ATC_itemID, $ATC_itemName, $ATC_itemDescription, $ATC_itemThumbnail, $ATC_itemWeight, $ATC_itemQuantity, $ATC_itemPrice, $ATC_itemcolor, $ATC_itemsize, $ATC_itemsizePriceInc);
if ($ATC_RedirectAfter != "" && $softdipes_cart->redirStr == "") {
$softdipes_cart->redirStr = $ATC_RedirectAfter;
}
if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != "") {
$_SESSION['WAEC_ContinueRedirect'] = $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING'];
}
else {
$_SESSION['WAEC_ContinueRedirect'] = $_SERVER['PHP_SELF'];
}
}
}
?>

Sign in to reply to this post

Jason ByrnesWebAssist

see the "Product Options with eCart" tutorial on the eCart page for details on Options that effect price.

Sign in to reply to this post

SaladoGuyBeta Tester

Originally Said By: Jason Byrnes
  see the "Product Options with eCart" tutorial on the eCart page for details on Options that effect price.  



We have done that and I'm not able to see what's wrong. At this point I would really like to find the specific problem and fix it instead of gutting the site and starting over again. I have a feeling that will cause even more problems than what I have now.

I've attached the most recent version of the site, is there any way you could please look at it and see what's wrong?

The live site is product.php and you can see what I'm talking about (if you need to) there by adding a product to the cart with Medium or Large option. You'll see that the price does not increase over the base price. Everything else seems to be working fine.

Thanks!

Attached Files
softdipes_for_WA.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the way that options effect price is to use a priceLookup recordset.


your option select list needs to pass the option ID into a recordset to return the option name and the option price increment.

when you have options that effect price, you do not set the Update ble from a select option for the option column.

you need to create the option select list manually. you will need a recordset to populate the option select list.

the label will use the option name.

the value will use the option ID.


then create a second recordset to lookup the price of the selected option.

In the add to cart button, you bind the option name and the price increment columns of the cart to name and price increment columns of the price lookup recordset.

This is not the way you have configured the add to cart buttons.

the ecart options tutorial is broken into 2 parts. the first part uses options that do not effect price.

the second part uses options that do effect price. Look through that second part of the tutorial again for full details.

I'm not suggesting that you gut your site. Only that you are not following the relevant parts of the tutorial to accomplish your goal.

Sign in to reply to this post
loading

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