Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

The universal solution "Continue Shopping Button"
 
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features
 
Thread Tools Search this Thread
  #11  
Old 05-08-2008, 07:23 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default 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
Reply With Quote
  #12  
Old 05-08-2008, 07:24 AM
  imexhouse's Avatar 
imexhouse imexhouse is offline
 

eXpert
  
Join Date: May 2006
Location: Canada
Posts: 377
 

Default 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.
__________________
Jack@AquasanaCA
X-CART GOLD 4.0.19 Live
DSEFU, AOM, ezCheckout, ezUpsell, ezRecommends, RememberMe, RememberAnonCarts
AquasanaCanada.com - Aquasana╝ - #1 Rated Water Filters in America!
X-CART GOLD 4.4.5 Live
CDSEO Pro v. 1.8.4
AquasanaMontreal.com
Aquasana╝ & Rhino Water Filtration Systems
Reply With Quote
  #13  
Old 05-08-2008, 07:25 AM
  imexhouse's Avatar 
imexhouse imexhouse is offline
 

eXpert
  
Join Date: May 2006
Location: Canada
Posts: 377
 

Default Re: The universal solution "Continue Shopping Button"

LOL, we mistimed our messages...
But, still, referred back to homepage.
__________________
Jack@AquasanaCA
X-CART GOLD 4.0.19 Live
DSEFU, AOM, ezCheckout, ezUpsell, ezRecommends, RememberMe, RememberAnonCarts
AquasanaCanada.com - Aquasana╝ - #1 Rated Water Filters in America!
X-CART GOLD 4.4.5 Live
CDSEO Pro v. 1.8.4
AquasanaMontreal.com
Aquasana╝ & Rhino Water Filtration Systems
Reply With Quote
  #14  
Old 05-08-2008, 07:34 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default 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.......
Reply With Quote
  #15  
Old 05-08-2008, 07:42 AM
  imexhouse's Avatar 
imexhouse imexhouse is offline
 

eXpert
  
Join Date: May 2006
Location: Canada
Posts: 377
 

Default 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.
__________________
Jack@AquasanaCA
X-CART GOLD 4.0.19 Live
DSEFU, AOM, ezCheckout, ezUpsell, ezRecommends, RememberMe, RememberAnonCarts
AquasanaCanada.com - Aquasana╝ - #1 Rated Water Filters in America!
X-CART GOLD 4.4.5 Live
CDSEO Pro v. 1.8.4
AquasanaMontreal.com
Aquasana╝ & Rhino Water Filtration Systems
Reply With Quote
  #16  
Old 05-08-2008, 07:59 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default 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.
Reply With Quote
  #17  
Old 05-08-2008, 08:08 AM
  imexhouse's Avatar 
imexhouse imexhouse is offline
 

eXpert
  
Join Date: May 2006
Location: Canada
Posts: 377
 

Default Re: The universal solution "Continue Shopping Button"

There's no include/rembember_user.php in 4.0.x
__________________
Jack@AquasanaCA
X-CART GOLD 4.0.19 Live
DSEFU, AOM, ezCheckout, ezUpsell, ezRecommends, RememberMe, RememberAnonCarts
AquasanaCanada.com - Aquasana╝ - #1 Rated Water Filters in America!
X-CART GOLD 4.4.5 Live
CDSEO Pro v. 1.8.4
AquasanaMontreal.com
Aquasana╝ & Rhino Water Filtration Systems
Reply With Quote
  #18  
Old 05-08-2008, 08:09 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default 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
Reply With Quote
  #19  
Old 05-08-2008, 08:26 AM
  imexhouse's Avatar 
imexhouse imexhouse is offline
 

eXpert
  
Join Date: May 2006
Location: Canada
Posts: 377
 

Default 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?

__________________
Jack@AquasanaCA
X-CART GOLD 4.0.19 Live
DSEFU, AOM, ezCheckout, ezUpsell, ezRecommends, RememberMe, RememberAnonCarts
AquasanaCanada.com - Aquasana╝ - #1 Rated Water Filters in America!
X-CART GOLD 4.4.5 Live
CDSEO Pro v. 1.8.4
AquasanaMontreal.com
Aquasana╝ & Rhino Water Filtration Systems
Reply With Quote
  #20  
Old 05-08-2008, 08:36 AM
  imexhouse's Avatar 
imexhouse imexhouse is offline
 

eXpert
  
Join Date: May 2006
Location: Canada
Posts: 377
 

Default 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
__________________
Jack@AquasanaCA
X-CART GOLD 4.0.19 Live
DSEFU, AOM, ezCheckout, ezUpsell, ezRecommends, RememberMe, RememberAnonCarts
AquasanaCanada.com - Aquasana╝ - #1 Rated Water Filters in America!
X-CART GOLD 4.4.5 Live
CDSEO Pro v. 1.8.4
AquasanaMontreal.com
Aquasana╝ & Rhino Water Filtration Systems
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:09 PM.

   

 
X-Cart forums © 2001-2018