Mmm yeah... posting at 3am... too tired to articulate that the individual sideboxes need to be controlled in their respective files and not in tpl_main_page:)
Mmm yeah... posting at 3am... too tired to articulate that the individual sideboxes need to be controlled in their respective files and not in tpl_main_page:)
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
I am not good at this... I tried your code with includes/modules/sideboxes/temp file/testimonials_manager. And it still did not work.
I also tried it with changing the word featured to testimonials_manager....it takes sidebox and footer and everything off.HTML Code:// test if box should display $show_featured= true; if (!$this_is_home_page) { $show_featured= false; } if ($show_featured == true) { $page_query = $db->Execute("select testimonials_id, testimonials_image, testimonials_title, testimonials_html_text, date_added from " . TABLE_TESTIMONIALS_MANAGER . " where status = 1 and language_id = " . (int)$_SESSION['languages_id'] . " order by rand(), testimonials_title limit " . MAX_DISPLAY_TESTIMONIALS_MANAGER_TITLES .""); if ($page_query->RecordCount()>0) { $title = BOX_HEADING_TESTIMONIALS_MANAGER; $box_id = testimonials_manager; $rows = 0; while (!$page_query->EOF) { $rows++; $page_query_list[$rows]['id'] = $page_query->fields['testimonials_id']; $page_query_list[$rows]['name'] = $page_query->fields['testimonials_title']; $page_query_list[$rows]['story'] = $page_query->fields['testimonials_html_text']; $page_query_list[$rows]['image'] = $page_query->fields['testimonials_image']; $page_query->MoveNext(); } $left_corner = false; $right_corner = false; $right_arrow = false; $title_link = false; require($template->get_template_dir('tpl_testimonials_manager.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_testimonials_manager.php'); require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); } //EOF
HTML Code:// test if box should display $show_testimonials_manager= true; if (!$this_is_home_page) { $show_testimonials_manager= false; } if ($show_testimonials_manager == true) { $page_query = $db->Execute("select testimonials_id, testimonials_image, testimonials_title, testimonials_html_text, date_added from " . TABLE_TESTIMONIALS_MANAGER . " where status = 1 and language_id = " . (int)$_SESSION['languages_id'] . " order by rand(), testimonials_title limit " . MAX_DISPLAY_TESTIMONIALS_MANAGER_TITLES .""); if ($page_query->RecordCount()>0) { $title = BOX_HEADING_TESTIMONIALS_MANAGER; $box_id = testimonials_manager; $rows = 0; while (!$page_query->EOF) { $rows++; $page_query_list[$rows]['id'] = $page_query->fields['testimonials_id']; $page_query_list[$rows]['name'] = $page_query->fields['testimonials_title']; $page_query_list[$rows]['story'] = $page_query->fields['testimonials_html_text']; $page_query_list[$rows]['image'] = $page_query->fields['testimonials_image']; $page_query->MoveNext(); } $left_corner = false; $right_corner = false; $right_arrow = false; $title_link = false; require($template->get_template_dir('tpl_testimonials_manager.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_testimonials_manager.php'); require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); } //EOF
I changed my code for the featured sidebox module to:
and only see the Featured Sidebox on the Home Page ...Code:// test if box should display $show_featured= true; if (!$this_is_home_page) { $show_featured= false; }
Now, let's check a few things ...
1 What version of Zen Cart?
2 When you say Featured Sidebox ... you do mean the Featured Sidebox in the Left or Right Column, correct?
3 What happens if you switch to Classic Template
4 Are you using templates and overrides?
5 in the Tools ... Developers Tool Kit ... if you do a search for:
if ($show_featured == true) {
what files come up, as in where are they located?
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Also check the IF statements ... do they ALL have closing brackets?
I am seeing an odd number in what you displayed ...![]()
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
I went to includes/modules/sideboxes/temp name/testimonials_manager.php
inserted this code at top
Should I put code into includes/templates/temp file/sideboxes/tpl_testimonials_manager.php instead?HTML Code:$show_featured= true; if (!$this_is_home_page) { $show_featured= false; } I even tried it with changing featured to testimonials_manager and did not work.
No ... you need to post your code for the testimonial manager from the first line to the last line so we can see that you have balanced all of the IF statements ...![]()
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
includes/modules/sideboxes/temp/testimonials_manager.php
HTML Code:// test if box should display $show_featured= true; if (!$this_is_home_page) { $show_featured= false; } $page_query = $db->Execute("select testimonials_id, testimonials_image, testimonials_title, testimonials_html_text, date_added from " . TABLE_TESTIMONIALS_MANAGER . " where status = 1 and language_id = " . (int)$_SESSION['languages_id'] . " order by rand(), testimonials_title limit " . MAX_DISPLAY_TESTIMONIALS_MANAGER_TITLES .""); if ($page_query->RecordCount()>0) { $title = BOX_HEADING_TESTIMONIALS_MANAGER; $box_id = testimonials_manager; $rows = 0; while (!$page_query->EOF) { $rows++; $page_query_list[$rows]['id'] = $page_query->fields['testimonials_id']; $page_query_list[$rows]['name'] = $page_query->fields['testimonials_title']; $page_query_list[$rows]['story'] = $page_query->fields['testimonials_html_text']; $page_query_list[$rows]['image'] = $page_query->fields['testimonials_image']; $page_query->MoveNext(); } $left_corner = false; $right_corner = false; $right_arrow = false; $title_link = false; require($template->get_template_dir('tpl_testimonials_manager.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_testimonials_manager.php'); require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); } //EOF
Try this code, instead:
The variable:Code:// test if box should display $show_testimonials_manager= true; if (!$this_is_home_page) { $show_testimonials_manager= false; } if ($show_testimonials_manager == true) { $page_query = $db->Execute("select testimonials_id, testimonials_image, testimonials_title, testimonials_html_text, date_added from " . TABLE_TESTIMONIALS_MANAGER . " where status = 1 and language_id = " . (int)$_SESSION['languages_id'] . " order by rand(), testimonials_title limit " . MAX_DISPLAY_TESTIMONIALS_MANAGER_TITLES .""); if ($page_query->RecordCount()>0) { $title = BOX_HEADING_TESTIMONIALS_MANAGER; $box_id = testimonials_manager; $rows = 0; while (!$page_query->EOF) { $rows++; $page_query_list[$rows]['id'] = $page_query->fields['testimonials_id']; $page_query_list[$rows]['name'] = $page_query->fields['testimonials_title']; $page_query_list[$rows]['story'] = $page_query->fields['testimonials_html_text']; $page_query_list[$rows]['image'] = $page_query->fields['testimonials_image']; $page_query->MoveNext(); } $left_corner = false; $right_corner = false; $right_arrow = false; $title_link = false; require($template->get_template_dir('tpl_testimonials_manager.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_testimonials_manager.php'); require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); } } //EOF
$show_testimonials_manager
could be called anything ... but I like them to match the name of the sidebox ... plus, you do not want to repeat the same variables in sideboxes to avoid issues ...
But ... the variable must match the IF statement test ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!