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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Empty cart on Submit

Thread began 2/03/2010 3:48 pm by denise234045 | Last modified 2/05/2010 5:24 pm by Jason Byrnes | 1700 views | 9 replies |

denise234045

Empty cart on Submit

I have no idea how to go about fixing this.... it appears that a large number of our orders are not going through. When users click on submit they are redirected in some cases to an empty cart w/out going to authorize.net at all!!

It doesn't seem to be a problem on macs - but right now I can't get athorize.net transactions to go through on my pc at all.... the paypal option works fine.

The site is

www.intlarrivals.com

I've also had issues with email confirmations not confirming - even though users click on the link to confirm - on their profile page it remains saying that they have not confirmed, no matter how often they try.... it doesn't always happen and I gave up trying to fix it. Just mentioning it here in case its somehow related.

Globals:
$WAGLOBAL_Root_URL = "http://www.intlarrivals.com/" ;

Help is most appreciated as this site is very live......

Sign in to reply to this post

Jason ByrnesWebAssist

I am not able to reproduce the problem, the transaction went to the checkout failure page because I entered a bogus cc#.


Make sure when you are testing that you are not starting at:
intlarrivals.com


Without the www, this is considered a different domain and the cart will be emptied when the checkout cart page redirects to:
checkout.php


also make sure you have cookies enabled in the browser, if cookies are not enabled, the session will not be stored correctly.

Sign in to reply to this post

denise234045

Yes - I'm doing it from www.intlarrivals.com (but certainly with my track record, is worth checking! :-)

The problem is when on the 'confirm.php' page - once the submit button is pressed the site redirects to 'cart.php' - and its empty.

As I said before it seems to be working fine from my mac?!

I'm not sure where to start looking

FYI - On your site I tried to take a look at : Customizing the WA_Globals.php file (PDF)
but got this error message:
NoSuchKeyThe specified key does not exist.how-tos/sp_ps_globals_2.pdf290D001053A6714AfsH9U/K2jwuijGGZBbcDI5h+pijfOWvLBKj9yhtWOeLMk5aKTRJL0euPBti1qEGn

I have $WAGLOBAL_remoteRoot = "/";

Is that wrong??

Could it have to do with sessions...

Cookies ARE enabled. The site has 3x's more registered users on the site than actual customers and there is no reason for someone to register w/out making a purchase, so this is of great concern....

As always, thanks for your help. Its greatly appreciated!

Denise

Sign in to reply to this post

Jason ByrnesWebAssist

find the following code on the confirm page:

php:
<?php
if ($WA_Store_Cart->IsEmpty())     {
  
$WA_Store_Cart->redirStr "cart.php";
  
$WA_Store_Cart->cartAction "RedirectIfEmpty";
}
?>





and change it to:

php:
<?php
$WA_Store_Cart
->GetContent();
if (
$WA_Store_Cart->IsEmpty())     {
  
$WA_Store_Cart->redirStr "cart.php";
  
$WA_Store_Cart->cartAction "RedirectIfEmpty";
}
?>
Sign in to reply to this post

denise234045

Sorry - that doesn't work either...

Attaching confirm.php in case that's helpful.

Thank you SO MUCH.

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

Jason ByrnesWebAssist

here are a couple other things to tryL


1) On the confirm page, find the following code:

php:
<?php
// WA eCart Redirect
if ($WA_Store_Cart->redirStr != "")     {
  
header("Location: ".$WA_Store_Cart->redirStr);
}
?>




and change it to:

php:
<?php
// WA eCart Redirect
if ($WA_Store_Cart->redirStr != "")     {
  
session_commit();
  
header("Location: ".$WA_Store_Cart->redirStr);
}
?>






2) on the checkout success page, find the following:

php:
<?php
if (!isset($_SESSION['OrderID']))     {
  
$WA_Store_Cart->redirStr "cart.php";
}
?>




and change it to:

php:
<?php
if(!session_id()) session_start();
if (!isset(
$_SESSION['OrderID']))     {
  
$WA_Store_Cart->redirStr "cart.php?oid=0";
}
?>




if you are still directed to the empty cart page, check the address bar and let me know if the address includes the querystring "cart.php?oid=0"

Sign in to reply to this post

denise234045

That didn't work either.

But yes, I was directed to "cart.php?oid=0"

Does oid stand for orders in database??

Thank you...

Sign in to reply to this post

Jason ByrnesWebAssist

One of the last code changes was to add oid to the querystring so in the redirect onthe checkout success page, I had you do this so I could see if the redirect was happening on the success page or not.


So now we know the redirect to the empty cart is happening because of this code on the success page:
<?php
if(!session_id()) session_start();
if (!isset($_SESSION['OrderID'])) {
$WA_Store_Cart->redirStr = "cart.php?oid=0";
}
?>

The redirect is occuring because $_SESSION['OrderID'] is not set, this is set by the Store Order Summary Behavior on the confirm page.

can you double check in the database to see if the order information is being stored.

Sign in to reply to this post

denise234045

No, I don't think it is. I see in the db that there are 34 orders - which is the number of orders that have been processed and gone through.... none of these orders that redirect to the cart page are there.

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
login.php

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