close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

PowerStore Submit Processes but returns to cart.php

Thread began 2/10/2010 11:19 am by paul.urgero235355 | Last modified 2/18/2010 1:16 pm by Jason Byrnes | 4318 views | 20 replies |

Paul

PowerStore Submit Processes but returns to cart.php

I've been trying to troubleshoot this problem with the forum results I've found, but I'm not having any luck.

I'm using authorize.net (through my developer account). Here are my Global settings:
$WAGLOBAL_Gateway = 2;
$WAGLOBAL_Test_Mode = true;

$WAGLOBAL_Authnet_Sandbox = "TRUE";

When I clicked on the Submit button, the order was processed (I get the confirmation email), but it was taking me back to the cart.php page.

Am I missing something?

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

First, on the confirm page, find the following:

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
$WA_Store_Cart->GetContent();
if (
$WA_Store_Cart->redirStr != "")     {
  
session_commit();
  
header("Location: ".$WA_Store_Cart->redirStr);
}
?>





If you are still having the same problem, we need to determine what code is directing to the cart page. find the following two lines on the cehckout_sucess.php page:

php:
header("Location: cart.php");



php:
$WA_Store_Cart->redirStr = "cart.php";



and change them to:

php:
header("Location: cart.php?qty=1");



php:
$WA_Store_Cart->redirStr = "cart.php?empty=1";




on the checkout success page, find

php:
$WA_Store_Cart->redirStr = "cart.php";



and change it to:

php:
$WA_Store_Cart->redirStr = "cart.php?oid=1";




this is adding querystring variables to the code that directs to the cart page that we can use to find out why the redirect is happening. when you get to the cart page, make a note of which querystring variable is added and post back.

Sign in to reply to this post

Paul

I changed the confirm page, as you directed. No change in the processing of the order.

In the checkout_success.php page, I searched for: header("Location: cart.php"); and it was nowhere to be found.

I did find:
$WA_Store_Cart->redirStr = "cart.php";

and changed it to:
$WA_Store_Cart->redirStr = "cart.php?empty=1";

But then you say: on the checkout success page find: $WA_Store_Cart->redirStr = "cart.php"; and change it to: $WA_Store_Cart->redirStr = "cart.php?oid=1"; but the one you want me to find, was what I already changed the old one too...what did you mean?


Thanks,
Paul

Sign in to reply to this post

Jason ByrnesWebAssist

This code is not going to change the processing of the order, it is only going to help us find the cause of the problem.


basically the idea is to find each occurrence of "cart.php" on the confirm page and the success page and add a unique query string variable, this way when you are directed to the cart page, you can tell which line of code was responsible for sending you there.


the line "header("Location: cart.php");" is not on the success page, you should look for it on the confirm page.


after you make the changes as I directed above, when you get redirected to the cart page, let me know the address in the address bar including the query string, this will tell me which line of code was responsible for the redirect.

Sign in to reply to this post

Paul

Jason,

I made the changes you said:

This: $WA_Store_Cart->redirStr = "cart.php";
is not in the checkout_success.php page

But after replacing the file with the originals, and making all the changes below (except for the above mentioned change), all works fine except I'm not getting any email confirmations.

When I start the Checkout procedure, and I'm at the page that says" Your Shopping Cart", the address is: cart.php. When I Submit the Order from the confirm.php page, it takes me to: checkout_success.php. So the order is processing fine now...I'm just not getting any email notifications, which I was before I made the changes.

Paul

Sign in to reply to this post

Jason ByrnesWebAssist

If you are using Power Store 3, that code is at line 13 of the checkout success page.


In power store 2, that code is at line 11.

the code changes I suggested will not have any affect on the email being sent.



you say:

  after replacing the file with the originals, and making all the changes below  




I dont understand what you mean by all the changes below, which changes are those?


perhaps it would help if you sent a copy of the confirm page.

Sign in to reply to this post

Paul

Sorry, Jason...the code IS at line 11, and I had already changed it to: $WA_Store_Cart->redirStr = "cart.php?empty=1";

Here is the confirm page.

Paul

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

Jason ByrnesWebAssist

change line 1064:

php:
$WA_redirectURL = "checkout_success.php";





to:

php:
$WA_redirectURL = "";
Sign in to reply to this post

Paul

I made the change to line 1064 as you suggested...placed a test order...received a confirmation email, but the page went to: cart.php?empty=1 after I submitted the order, instead of the success page.

Sign in to reply to this post

Jason ByrnesWebAssist

change:

php:
<?php

if ($WA_Store_Cart->IsEmpty())     {
  
$WA_Store_Cart->redirStr "cart.php?empty=1";
  
$WA_Store_Cart->cartAction "RedirectIfEmpty";
}
?>




to:

php:
<?php

$WA_Store_Cart
->GetContent();
if (
$WA_Store_Cart->IsEmpty())     {
  
$WA_Store_Cart->redirStr "cart.php?empty=1";
  
$WA_Store_Cart->cartAction "RedirectIfEmpty";
}
?>
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...