X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   The universal solution "Continue Shopping Button" (https://forum.x-cart.com/showthread.php?t=39603)

Yurij 05-08-2008 07:23 AM

Re: The universal solution "Continue Shopping Button"
 
Quote:

Originally Posted by imexhouse
I have my own Continue Button gif:

<a href="`$back_url`"><img src="{$ImagesDir}/ContinueShopping.gif" border="0" align="absmiddle" alt="Continue Shopping"></img></a>

and I did add the code below to cart.php

#back URL when cont. shoping:
x_session_register("back_url");
if (
$mode == "add")
{
$back_url = $_SERVER['HTTP_REFERER'];
}

$smarty->assign("back_url", $back_url);


Are the single quote signs in `$back_url` the characters to the left of 1 on the keyboard, or are they actually single quotes that reside on the same key as double quotes?

This is the actual link from the Continue Shopping:

http://www.aquasanacanada.com/%60$back_url%60


Use this code... :)
PHP Code:

<a href="{$back_url}"><img src="{$ImagesDir}/ContinueShopping.gif" border="0" align="absmiddle" alt="Continue Shopping"></img></a


imexhouse 05-08-2008 07:24 AM

Re: The universal solution "Continue Shopping Button"
 
You know, I changed `$back_url` to {$back_url} and added the condition for the http referrer. It's working now - well, sort of - Continue Shopping redirects me to the root:
http://www.aquasanacanada.com

regardless whether the referrer was a product list page, or a product page or homepage.

imexhouse 05-08-2008 07:25 AM

Re: The universal solution "Continue Shopping Button"
 
LOL, we mistimed our messages...
But, still, referred back to homepage.

Yurij 05-08-2008 07:34 AM

Re: The universal solution "Continue Shopping Button"
 
Quote:

Originally Posted by imexhouse
LOL, we mistimed our messages...
But, still, referred back to homepage.


You are using a modified "X-cart"?

After add product to cart, I turn to page

http://www.aquasanacanada.com/added.php.......

imexhouse 05-08-2008 07:42 AM

Re: The universal solution "Continue Shopping Button"
 
Yeah, it's ezCheckout, ezRecommends and ezUpsell
That added.php file is an encrypted file for the mod.

Yurij 05-08-2008 07:59 AM

Re: The universal solution "Continue Shopping Button"
 
Quote:

Originally Posted by imexhouse
Yeah, it's ezCheckout, ezRecommends and ezUpsell
That added.php file is an encrypted file for the mod.


Try insert next code in "cart.php"
PHP Code:

#back when cont shoping.
x_session_register("back_url");
if (
$mode == "add")
{
    
$back_url $_SERVER['HTTP_REFERER'];
}
$smarty->assign("back_url"$back_url); 


after next lines:
PHP Code:

if (!empty($active_modules['Wishlist'])) {
    if (
$mode == 'add2wl' || $mode == "wishlist") {
        require 
$xcart_dir."/include/remember_user.php";

    } elseif (!empty(
$login) && !empty($remember_data) && ($mode == 'add2wl' || $mode == "wishlist" || $mode == 'add')) {
        require 
$xcart_dir."/include/remember_user.php";
    }
}

x_load('cart','user','order','tests'); 


Before the call "ezCheckout, ezRecommends and ezUpsell" in cart.php....

The form, when adding product into the card, sends the data on "cart.php? Mode = add".

When done redirection to "added.php", I do not know, because I do not have these modules.

imexhouse 05-08-2008 08:08 AM

Re: The universal solution "Continue Shopping Button"
 
There's no include/rembember_user.php in 4.0.x

Yurij 05-08-2008 08:09 AM

Re: The universal solution "Continue Shopping Button"
 
Quote:

Originally Posted by imexhouse
There's no include/rembember_user.php in 4.0.x


Show first 20-30 lines your cart.php (i worked with 4.1.9 gold/pro)

PS. Try insert after:

PHP Code:

require "./auth.php";
include 
$xcart_dir."/shipping/shipping.php"


If not help, then I do not know. Without access to code, My thought ended ;)

imexhouse 05-08-2008 08:26 AM

Re: The universal solution "Continue Shopping Button"
 
I appreciate what you're doing anyway.
Let me understand - do you want me to replace the code you provided in the previous post:

Quote:

require $xcart_dir."/include/remember_user.php";


with

Quote:

require "./auth.php";
include
$xcart_dir."/shipping/shipping.php";



So the whole code would look like this:

Quote:


if (!empty($active_modules['Wishlist'])) {
if (
$mode == 'add2wl' || $mode == "wishlist") {
require "./auth.php";
include
$xcart_dir."/shipping/shipping.php";


} elseif (!empty(
$login) && !empty($remember_data) && ($mode == 'add2wl' || $mode == "wishlist" || $mode == 'add')) {
require "./auth.php";
include
$xcart_dir."/shipping/shipping.php";

}
}

x_load('cart','user','order','tests');



Is that the idea?


imexhouse 05-08-2008 08:36 AM

Re: The universal solution "Continue Shopping Button"
 
Well, I inserted the code the way it looks in my last post, but when I click on Add to Cart, I get a blank page.
Don't worry about it. It's not a crucial part of ordering process anyway.

Thanks for all your help.

Jack


All times are GMT -8. The time now is 04:05 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.