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)

nate korn 10-16-2009 08:14 AM

Re: The universal solution "Continue Shopping Button"
 
Can anyone tell me where exactly this contimue shopping button would appear? I inserted the code as explained and updated on first thread yet I see no difference. I would really like to add this...

best, nate

Yalokin 10-16-2009 10:13 AM

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

Originally Posted by Ashley
Any one???????

Hello.

Did you make it work with 4.22?

thank you.

nate korn 10-16-2009 10:35 AM

Re: The universal solution "Continue Shopping Button"
 
hey yalokin, no i did not make it work... after adding a product cart the option "continue shoppping" does not appear. do not really know why???

ecollier2012 12-12-2009 10:14 PM

Re: The universal solution "Continue Shopping Button"
 
Anyone get this to work?

successco 05-24-2010 07:32 AM

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

Originally Posted by Yurij
UPDATE: 22-10-2008

1. Edit file cart.php, after next lines:

PHP Code:

...........
x_session_register("dhl_ext_country_store");
x_session_register("ga_track_commerce");
x_session_register("initial_state_orders", array());
x_session_register("initial_state_show_notif""Y");
x_session_register("enter_as_anonymous"false); 


add next lines:

a) return to the last page;
PHP Code:

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

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




b) Is it any chance to send customers back into ROOT directory instead of subcategory? - Yes :)

PHP Code:

#back URL when cont. shoping:

x_session_register("back_url");
if (
$mode == "add")
{
    
$back_url $_SERVER['HTTP_REFERER'];

    
$id intval($productid);
    if (
$id>0) {
        
$cat_path func_query_first_cell("select categoryid_path from $sql_tbl[products_categories]$sql_tbl[categories] where (productid = $id)and(main='Y')and($sql_tbl[products_categories].categoryid=$sql_tbl[categories].categoryid)");
        if (!empty(
$cat_path)) {
            
$cats_path split("/ *",$cat_path);        
            if (!empty(
$cats_path[0])) {
                
$back_url "home.php?cat=".$cats_path[0];
            }
        }
    }
}
$smarty->assign("back_url"$back_url); 


c) Is it any chance to send customers back into PRODUCT category? - Yes :)

PHP Code:

#back URL when cont. shoping:

x_session_register("back_url");
if (
$mode == "add")
{
    
$back_url $_SERVER['HTTP_REFERER'];

    
$id intval($productid);
    if (
$id>0) {
        
$cat_path func_query_first_cell("select categoryid_path from $sql_tbl[products_categories]$sql_tbl[categories] where (productid = $id)and(main='Y')and($sql_tbl[products_categories].categoryid=$sql_tbl[categories].categoryid)");
        if (!empty(
$cat_path)) {
            
$cats_path split("/ *",$cat_path);        
            if (!empty(
$cats_path[0])) {
                
$last end($cats_path);
                
$back_url "home.php?cat=".$last;
            }
        }
    }
}
$smarty->assign("back_url"$back_url); 


2. Edit URL for "Continue Shopping Button", exm. for Fast Lan Check Out:
Edit file: "skin1/modules/Fast_Lane_Checkout/home_main.tpl", change line:
PHP Code:

<td>{include file="modules/Fast_Lane_Checkout/big_button.tpl" button_title=$lng.lbl_continue_shopping style="button" href="home.php"}</td


replaced by this code

PHP Code:

<td>{include file="modules/Fast_Lane_Checkout/big_button.tpl" button_title=$lng.lbl_continue_shopping style="button" href="`$back_url`"}</td





PS. I would be grateful for any comments on that decision. It should almost always work.


Works perfectly for returning to previous category from Checkout (not using Fast Lane), in version 4.1.6. with very extensive customizations. Took less than 5 minutes to integrate & test & adjust just a little to
PHP Code:

{include file="buttons/button.tpl" button_title=$lng.lbl_continue_shopping href=$back_url title=$title style=$style

Thank you very much for sharing this.

Denovo 07-22-2010 07:48 AM

Re: The universal solution "Continue Shopping Button"
 
The file home_main.tpl no longer contains any HTML - the line referenced above by Yurij does not exist in X-Cart 4.3.2.

Is there another way to do this?

equinix 08-23-2010 08:14 AM

Re: The universal solution "Continue Shopping Button"
 
This is working fine for me in 4.3.1
I added the original code to cart.php and then modified the template file, except it's not home_main.tpl - the file you need to edit is in skin/modules/Fast_Lane_Checkout/home.tpl

Look for these lines:

Code:

<div class="flc-buttons">
                {if !$std_checkout_disabled}
                  {include file="customer/buttons/button.tpl" button_title=$lng.lbl_checkout style="div_button" href="cart.php?mode=checkout" additional_button_class="flc-3-button"}
                {/if}
                {include file="customer/buttons/button.tpl" button_title=$lng.lbl_continue_shopping style="div_button" href="`$back_url`" additional_button_class="flc-1-button"}
              </div>
              <div class="clearing"></div>


and just replace "home.php" with "`$back_url`" - watch the apostrophes


All times are GMT -8. The time now is 01:13 AM.

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