PDA

View Full Version : Ecart continue shopping not working


Sades
03-06-2009, 07:17 AM
I added the cart view but when i test the continue shopping button its not redirecting to the producto page or the page i was before coming to the cart view what can i do to fix this

Ray Borduin
03-06-2009, 09:12 AM
Edit the continue shopping server behavior. It should allow you to set the page, or have it go back to the last page where the add to cart button was pressed.

Sades
03-06-2009, 11:09 AM
i just compare it with an old site i did before the upgrade of ecart to work with cs4 it looks the same but the new one is not working

Ray Borduin
03-06-2009, 11:14 AM
Are you using a Cookie or Session persistance cart? Maybe it needs a:

session_start();

It should set a session variable on the add to cart page, and access it on the cart page to go back to the correct page, so if sessions aren't working then this functionality may not work.

Another possibility is that the eCart redirect code isn't on the page... Does the eCart object show with a red exclamation point in the server behaviors window? If so there may be a missing piece of code causing the problem.

Sades
03-06-2009, 12:21 PM
i added the start session on the header of the site im building but didnt do anything

the internal code for the continue button is

<?php
// WA eCart Continue Shopping
if (isset($_POST["eCart1_Continue_100"]) || isset($_POST["eCart1_Continue_100_x"])) {
$Redirect_redirStr="";
if (false && isset($_SESSION['WAEC_ContinueRedirect'])) {
$Redirect_redirStr=siteToPageRel($_SESSION['WAEC_ContinueRedirect']);
}
if ($Redirect_redirStr != "") {
$eCart1->redirStr = $Redirect_redirStr;
}
$eCart1->cartAction = "Continue";
}
?>

now i notice that if i click on go to cart if i click it from someplace not the product or article page it adds on the link http://website.com/cart.php? when i click on the continue shopping now when i come from a categorie for example http://website.com/product.php?id=1&cat=20 the link when i click on continue shopping looks like this

http://website.com/cart.php?id=1&cat=20 but it keeps placing cart.php instead of the page i was on before.

Sades
03-06-2009, 12:28 PM
ok well i had to trick the ecart and changed the continue shopping button with one i made my self with <?php
$referido = $_SERVER['HTTP_REFERER']; //
?>

it works this way i just wonder why since i upgraded ecart from the version i bout 1.4 to 1.5 it stopped working correctly all seems fine on the code but that button does not want to work

Ray Borduin
03-06-2009, 12:41 PM
the line:

if (false && isset($_SESSION['WAEC_ContinueRedirect'])) {
$Redirect_redirStr=siteToPageRel($_SESSION['WAEC_ContinueRedirect']);
}

should be:
if (true && isset($_SESSION['WAEC_ContinueRedirect'])) {
$Redirect_redirStr=siteToPageRel($_SESSION['WAEC_ContinueRedirect']);
}

It looks like redirect to previous page was somehow disabled.

Sades
03-06-2009, 02:09 PM
yea sorry i copy and pasted selecting the check box there but also that way it was not working dunno why