View Single Post
  #1  
Old 05-07-2008, 01:15 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default The universal solution "Continue Shopping Button"

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.
Reply With Quote