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

Continue Shopping

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #71  
Old 01-12-2007, 01:54 PM
 
burtsTechie burtsTechie is offline
 

Member
  
Join Date: Sep 2006
Posts: 20
 

Default Re: Continue Shopping

I'm FUBARing my site every time I try to get this config.php file to accept this code. I've had comments from test users that returning to the cart/home page is frustrating, and frustrating = no sales.

I've done some searching and discovered that $HTTP_GET_VARS has been deprecated for $_GET...so I've replaced that in the following code:

Code:
<?php x_session_register("last_cat"); x_session_register("last_productid"); if($_GET["cat"] != "") { $last_cat = $cat]; } if($_GET["productid"] != "") { $last_productid = $productid; } $smarty->assign("last_productid", $last_productid); $smarty->assign("last_cat", $last_cat); ?>

And it still gives me the blank page of death.

Is there some kind of compiling going on or am I placing this in the wrong section of config.php? Help, please!

ps - replying to myself is sad. really sad.
__________________
X-Cart Version: 4.15 (in development)
Reply With Quote
  #72  
Old 01-24-2007, 06:21 AM
 
vaughan vaughan is offline
 

Newbie
  
Join Date: Jun 2005
Posts: 5
 

Default Re: Continue Shopping

using xgards code I was getting the same result when I added the code to config.php

Working on a new 4.1.5 site and found that if put the code into init.php instead all was well (at least so far).
__________________
xcart 4.0.14
Reply With Quote
  #73  
Old 01-31-2007, 07:14 AM
 
burtsTechie burtsTechie is offline
 

Member
  
Join Date: Sep 2006
Posts: 20
 

Default Re: Continue Shopping

thanks vaughan! I finally had a chance to implement your suggestion and it seems to be working on 4.15. I appreciate the help!
__________________
X-Cart Version: 4.15 (in development)
Reply With Quote
  #74  
Old 02-03-2007, 02:28 PM
 
Sisom Sisom is offline
 

eXpert
  
Join Date: Sep 2006
Posts: 310
 

Default Re: Continue Shopping

Quote:
Originally Posted by mikalou
The ⌠continue shopping■ button will only appear when a product was just added to the cart. So for instance, if you click on the ⌠View Cart■ link in the minicart from the home page, then the ⌠continue shopping■ button won▓t appear.

I don't understand why you wouldn't want to have the "continue shopping" button appearing in that case - as the customer would want to see it (at least, I would). I don't see why they wouldn't want to be able to continue shopping just because they got to the cart page from the home page, using the 'View cart' link in minicart.

While we're on the subject of the 'continue shopping' button, has anybody else found Amazon's shopping cart to be a nightmare? Say I add one item to the cart and then click on the 'Checkout' button - the next page gives you no option other than to continue with the Checkout process, you can't add any other items to the cart without having to use the back button, there isn't even a link to the Amazon home page or any other Amazon pages on their Checkout page! (At least, this is what's been happening to me).
__________________
X-Cart Gold Version 4.3.2
Reply With Quote
  #75  
Old 02-04-2007, 10:51 AM
 
kmg126 kmg126 is offline
 

Member
  
Join Date: Apr 2006
Posts: 23
 

Default Re: Continue Shopping

Quote:
Originally Posted by GM
TRY THIS...

1 Create a new button file in /buttons called

continue_shopping.tpl that contains the following code:

Code:
{include file="buttons/button.tpl" button_title=$lng.lbl_continue_shop}

2 In Admin go to "languages" edit languages and create a new

entry called "lbl_continue_shop" (without the quotes)

Now in cart.tpl or where ever you want the button to appear just add this

code:


DONE!
I've tried to do several of the "Continue Shopping" fixes in this thread and none are really working for me. The one that works best is the one above. Creates a great Continue Shopping button, I've placed it exactly where I want it on the Checkout page, but when clicked, I'm redirected exactly back to the same Checkout page.
Can anyone tell me where the problem lies in the code? I'd like it to redirect back to the category or the home page would be fine too.
Thanks,
Karen
__________________
Karen
X-cart 4.4
New Orleans, LA
Reply With Quote
  #76  
Old 02-04-2007, 12:44 PM
 
Sisom Sisom is offline
 

eXpert
  
Join Date: Sep 2006
Posts: 310
 

Default Re: Continue Shopping

All I can offer is the code that I have in my cart.tpl, bear in mind I have 4.1, but I don't think it should make any difference.

<td>
{include file="buttons/button.tpl" button_title=$lng.lbl_continue_shopping href="javascript: history.go(-1);" style="button" js_to_href="Y"}</td>
__________________
X-Cart Gold Version 4.3.2
Reply With Quote
  #77  
Old 02-04-2007, 06:44 PM
 
kmg126 kmg126 is offline
 

Member
  
Join Date: Apr 2006
Posts: 23
 

Default Re: Continue Shopping

Thanks, that worked great!
Karen
__________________
Karen
X-cart 4.4
New Orleans, LA
Reply With Quote
  #78  
Old 03-01-2007, 11:07 AM
 
grayloon grayloon is offline
 

Member
  
Join Date: Oct 2006
Posts: 27
 

Default Re: Continue Shopping

I'm using the code below, but I'm having one little problem - the cart page always takes me back to the category and never to the product detail page. I replaced $HTTP_GET_VARS with $_GET and put that part in the init.php instead of config.php. Any ideas?

Quote:
Originally Posted by xgarb
Going from inthepink's code I did this...

create a tpl. file in buttons called continue_shopping.tpl

add the following code to it...

Code:
{* source: http://forum.x-cart.com/viewtopic.php?t=1124 *} {if $goto eq "product" and $last_productid neq ""} {assign var="href" value="`$WebDir`product.php?productid=`$last_productid`"} {elseif $last_cat neq ""} {assign var="href" value="`$WebDir`home.php?cat=`$last_cat`"} {else} {assign var="href" value="`$http_location`"} {/if} {include file="buttons/button.tpl" button_title="Continue Shopping" style="button" href="$href"}

add to config.php....

Code:
x_session_register("last_cat"); x_session_register("last_productid"); if($HTTP_GET_VARS['cat'] != "") { $last_cat = $cat; } if($HTTP_GET_VARS['productid'] != "") { $last_productid = $productid; } $smarty->assign("last_productid", $last_productid); $smarty->assign("last_cat", $last_cat);

You can then use....

Code:
{include file="buttons/continue_shopping.tpl"}

whereever you like to give you a continue shopping button. I've got it next to the checkout button and also below 'Your shopping cart is empty'

sweet!
__________________
X-Cart Pro 4.1.5
Reply With Quote
  #79  
Old 03-14-2007, 12:21 PM
 
supercanon supercanon is offline
 

Member
  
Join Date: Jan 2007
Posts: 28
 

Default Re: Continue Shopping

Quote:
Originally Posted by vaughan
using xgards code I was getting the same result when I added the code to config.php

Working on a new 4.1.5 site and found that if put the code into init.php instead all was well (at least so far).



Hello, I tried adding the code to boh config.php and init.php and I got a blank page.

finally, I added the code to /include/sessions.php and it worked !

I am using version 4.1.6

This is a great modification, thank you
__________________
4.1.12 +AOM +SPECIAL OFFERS +FB +JANRAIN
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


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 01:46 AM.

   

 
X-Cart forums © 2001-2020