Re: Not to show Featured Product Sidebox on main page
Hi Ajeh,
So are you saying the correct code I should use is:
$show_featured= false;
$this_is_home_page = ($current_page=='index' && (!isset($_GET['cPath'])) && (!isset($_GET['manufacturers_id'])) && (!isset($_GET['typefilter'])) );
$show_featured = !$this_is_home_page;
if (true) {
// show box
}
Is that it? If not, can you give me the "cut and paste" code to make my life easier? :) Thanks for your patience. Much appreciated.
Regards,
Ethan
Re: Not to show Featured Product Sidebox on main page
Old Code:
PHP Code:
// test if box should display
$show_featured= true;
if ($show_featured == true) {
New Code:
PHP Code:
// test if box should display
$show_featured= true;
$this_is_home_page = ($current_page=='index' && (!isset($_GET['cPath'])) && (!isset($_GET['manufacturers_id'])) && (!isset($_GET['typefilter'])) );
$show_featured = !$this_is_home_page;
if ($show_featured == true) {
Re: Not to show Featured Product Sidebox on main page
Hi Ajeh,
I tried the new code but the Feature sidebox is still showing on the main page I am afraid. What should I do now?
Regards,
Ethan
Re: Not to show Featured Product Sidebox on main page
Do you have an override for the file:
/includes/modules/sideboxes/featured.php
in your overrides directory?
/includes/modules/sideboxes/your_template_dir/featured.php
Are you changing the right file?
Re: Not to show Featured Product Sidebox on main page
Hi Ajeh,
Thank you. I got that to work now :)
I also want to turn off the New Product Sidebox on the main page. Do I apply the same principle? I had a look at the file and the coding is slightly different. Not sure how to fit the code you gave me in there.
Regards,
Ethan
Re: Not to show Featured Product Sidebox on main page
On the new products sidebox ... you need to add an IF around the whole code ...
This is not using the:
PHP Code:
if ($show_something) {
But you could add one similar to the featured for:
PHP Code:
if ($show_whats_new == true) {
// all code here
}
And build the $show_whats_new in the same manner ...
Re: Not to show Featured Product Sidebox on main page
Hi Ajeh,
Thanks very much :) It worked. Magic!
Regards,
Ethan
Re: Not to show Featured Product Sidebox on main page
You are most welcome ... glad you are starting to get the hang of this now ... :smile:
Re: Not to show Featured Product Sidebox on main page
Hi,
I am looking for a solution similar to this issue.
Is there a flag like $show_featured for the information box? I don't see any test to show the information box in any of the information box pages. I want to hide the information box on all pages except one ez page. The original post is located here:
http://www.zen-cart.com/forum/showthread.php?t=51520
If I could just grab the flag to show/hide the info box, then I should be set.
Any help would be great! Thanks.
Re: Not to show Featured Product Sidebox on main page
You can build an IF surrounding the code for any of the sideboxes to test any condition you like ...
PHP Code:
$some_condition_here = something_is_evaluated;
if ($some_condition_here == true) {
// code here
}