Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Changing the Back to Shopping Button

Changing the Back to Shopping Button

Locked

Views: 6,953

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
30 Jan 2008, 9:56 PM
#1
venera15 avatar

venera15

New Zenner

Join Date:
Jan 2008
Posts:
47
Plugin Contributions:
0

Changing the Back to Shopping Button

Does anyone know how can i change the "Back to Shopping" Button in my Shopping Cart page so i can direct it to go somewhere else not in
../index.php?main_page=products_all&disp_order=1

1 Feb 2008, 7:15 PM
#2
wwzeitler avatar

wwzeitler

New Zenner

Join Date:
Feb 2008
Location:
L.A.
Posts:
1
Plugin Contributions:
0

Re: Changing the Back to Shopping Button

Having stepped through the code with the debugger it really doesn't look like there's a way to configure Zen to behave that way.

So, in /zen-cart/index.php ('zen-cart' = your zen-cart install folder), right after:

/**

  • Load common library stuff
    */

put this code fragment:

if(isset($_GET['main_page']) && 'product_info' == $_GET['main_page'] && !isset($_GET['action']) )
{
$sPath = "http://".$_SERVER['HTTP_HOST'].'/WHERE_I_REALLY_WANT_TO_GO.html';
header("Location: $sPath");
exit();
}

and change '/WHERE_I_REALLY_WANT_TO_GO.html' to where you really want to go.

The idea is to redirect it when 'main_page' is set to 'product_info' but there's no 'action'. That is the state when I click my 'back to shopping' button, e.g.:

http: //localhost/zen-cart/index.php?main_page=product_info&cPath=3_14&products_id=15

where you'll see 'main_page=product_info' but there's no 'action='. You may need to tweak to taste.

6 Feb 2008, 4:30 PM
#3
venera15 avatar

venera15

New Zenner

Join Date:
Jan 2008
Posts:
47
Plugin Contributions:
0

Re: Changing the Back to Shopping Button

i did try this but i had no luck, and now it goes to
../index.php?main_page=index

Anyone any idea?