Totally Zenned
- Join Date:
- Dec 2005
- Location:
- Perth, Western Australia, Australia
- Posts:
- 782
- Plugin Contributions:
- 0
Show/Hide sideboxes based on page
Excellent, it works. Thanks :)
Views: 43,781
Totally Zenned
Excellent, it works. Thanks :)
Zen Follower
How would you hide all side boxes for the entire checkout process? (Not to distract the customer from finishing the purchase)
I don't know what pages are called up during the checkout funnel. *I guess this would include the registration, signin/login, checkout, confirmation etc...
Would it be something like the code to hide the main page? Maybe there is a setting in the admin panel?
Please help
Totally Zenned
You can disable left and right sideboxes in includes/templates/YOUR_TEMPLATE/common/tpl_mainpage.php
There are instructions at the top telling you how to do that.
Zen Follower
Thanks for the quick replay!
I took a look at the instructions for $flag_disable_left = true; etc... but how could I find out all the pages to put this on for the Checkout process? Or, what are the pages of the process?
I want the left menu to show for all other pages.. Just not during the checkout process.
Could somebody help with a list? Or is the answer there in the code somewhere and I didn't see it?
Totally Zenned
Add this to tpl_main_page.php
$center_column_only = array('checkout');
Zen Follower
dealbyethan.com:
Add this to tpl_main_page.php
$center_column_only = array('checkout');
:clap: Thank you! *Didn't think it was going to be That easy!
Totally Zenned
You're welcome. Glad to hear you got it working.
Zen Follower
This would work as well
if (in_array($current_page_base,explode(",",'login,checkout')) ) {
$flag_disable_left = true;
}
Totally Zenned
i want to hide the category sidebox untill a user logs in
Is that possible
New Zenner
Hello all-
I am in the process of getting my ZenCart pages up and running, hopefully for a launch on the 17th of April. My question is, I have created, using the editable sidebax contribution, a rotating set of vintage ads and other images on my antiques site and I would like for this sidebox to be active ONLY on the main page, as I feel it's a distraction throughout the entire shop. I really just added it because I thought it would be neat and give my visitors something else to look at. How would I go about doing that in the most efficient way? If you need it, the store URL is: http://www.mrtomsalley.com/catalog Thanks for any help!
Harry
Totally Zenned
CnTGifts:
i want to hide the category sidebox untill a user logs in
Is that possibleIt's not only possible, it's straightforward. You would make an over-ride copy of the includes/modules/sideboxes/categories.php file and then wrap all the executable statements inside this condition
if ($_SESSION['customer_id']) {...
}
Totally Zenned
hharper1321:
I have created, using the editable sidebax contribution, a rotating set of vintage ads and other images on my antiques site and I would like for this sidebox to be active ONLY on the main pageThis is also straightforward. In your modules/sideboxes/editable_sidebox.php file, change
$show_editable_sidebox = true;
to
$show_editable_sidebox = $this_is_home_page ? true : false;
New Zenner
kuroi:
This is also straightforward. In your modules/sideboxes/editable_sidebox.php file, change
$show_editable_sidebox = true;
to
$show_editable_sidebox = $this_is_home_page ? true : false;
Thanks for the help, kuroi!
H
New Zenner
Hi,
I use the blank sidebox for a legend, that I'd like to show only on the product-listing and product-description pages.
But how...
Thanks in advance, anna
New Zenner
anniti:
Hi,
I use the blank sidebox for a legend, that I'd like to show only on the product-listing and product-description pages.
But how...
Thanks in advance, anna
My question is similar to this one. I want to only show the categories sidebox on the product pages.
Thanks!
New Zenner
hi SHokuf,
I did find a solution, probably not very elegant, but it works:
// test if box should display
$show_my_sidebox = false;
if ($_GET['main_page']=='product_info' or $_GET['main_page']=='index') {
$show_my_sidebox = true;
}
if ($this_is_home_page) {
$show_my_sidebox = false;
}
The HomePage is also an indexpage, that's why I had to add the second part.
regards, anna
New Zenner
sorry, I got confused,
for the productpages, you'd need:
// test if box should display
$show_my_sidebox = false;
if ($_GET['main_page']=='product_info') {
$show_my_sidebox = true;
}
New Zenner
Awesome! That worked! :clap:
Thanks so much!
New Zenner
Ok, so if I wanted to show a different sidebox depending on the base category the user was viewing, how would i find out the category and set the sidebox to display (rather than setting it not to display)?
Totally Zenned
Sorry if has been answered before.
I want to Keep the Sidebars open ONLY for the main page and then turned off for all other pages.
How can I do that?
Tell staff why this post should be reviewed.