Forums / Basic Configuration / can't supress the left column on checkout page

can't supress the left column on checkout page

Locked

Views: 689

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
22 Sep 2009, 10:15 PM
#1
jlazzarino avatar

jlazzarino

New Zenner

Join Date:
Aug 2009
Posts:
9
Plugin Contributions:
0

can't supress the left column on checkout page

I'm using the latest zc 1.3.8a

I am trying to supress the left colunm on all pages on my site, except for the product pages...

I have managed to do this successfully on every page except for the checkout page.

I'm using the following code (courtesy of the zen community) and placed it in my override tpl_main_page.php page.

The code works well for all other pages however, the checkout page, for whatever reason, continues to show the left column. :

Here's the code i've got in my MYTEMPLATE/common/tpl_main_page.php file.....

// remove left column from the home page
if ($this_is_home_page) {
$flag_disable_left = true;
}

// remove left column on all other pages
if (in_array($current_page_base,explode(",",'login,checkout,account,create_account')) ) {
$flag_disable_left = true;
}

if (in_array($current_page_base,explode(",",'login,account')) ) {
$flag_disable_footer = true;
}

if (in_array($current_page_base,explode(",",'login')) ) {
$flag_disable_header = true;
}

if ($current_page_base == 'shopping_cart' && $_SESSION['cart']->count_contents() > 0 ) {
$flag_disable_left = true;
}

Any thoughts why this code isn't working on checkout page?

Also, does anyone know where I can find a reference for how to determine the proper page names to be used as arguments? i.e. 'checkout' as opposed to 'check_out'

thanks in advance.

jon

22 Sep 2009, 10:33 PM
#2
jlazzarino avatar

jlazzarino

New Zenner

Join Date:
Aug 2009
Posts:
9
Plugin Contributions:
0

Re: can't supress the left column on checkout page

UPDATE:

I have figured it out for myself.....although i would like someone to validate that this is in fact the best approach?

It turns out that simply specifying the checkout argument wasn't sufficient as there are actually 4 pages associated with checkout:

checkout_shipping
checkout_shipping_address
checkout_payment
checkout_confirmation

I added 4 arguments to reflect each page above all appears to be well. Specifically, the code now looks like this:

if (in_array($current_page_base,explode(",",'login,checkout_shipping,checkout_shipping_address,checkout_payment,checkout_confirmation,account,create_account')) ) {
$flag_disable_left = true;
}

if (in_array($current_page_base,explode(",",'login,account')) ) {
$flag_disable_footer = true;
}

if (in_array($current_page_base,explode(",",'login')) ) {
$flag_disable_header = true;
}

if ($current_page_base == 'shopping_cart' && $_SESSION['cart']->count_contents() > 0 ) {
$flag_disable_left = true;
}