Re: Not to show Featured Product Sidebox on main page
hi, i have a similar issue -- i am trying to get my featured product sidebox to display on the right side, but no matter what i do, it won't show. this is what i currently have in my /public_html/includes/templates/12541/sideboxes/tpl_featured.php file. /tpl_featured had to be copied from the default template folder because it did not exist in my modified template (12541).
my website is: http://www.indiediggs.com
<?php
/**
* Side Box Template
*
* @package templateSystem
* @copyright Copyright 2003-2007 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_featured.php 6128 2007-04-08 04:53:32Z birdbrain $
*/
$content = "";
$featured_box_counter = 0;
while (!$random_featured_product->EOF) {
$featured_box_counter++;
$featured_box_price = zen_get_products_display_price($random_featured_product->fields['products_id']);
$content .= '<div class="sideBoxContent centeredContent">';
$content .= '<a href="' . zen_href_link(zen_get_info_page($random_featured_product->fields["products_id"]), 'cPath=' . zen_get_generated_category_path_rev($random_featured_product->fields["master_categories_id"]) . '&products_id=' . $random_featured_product->fields["products_id"]) . '">' . zen_image(DIR_WS_IMAGES . $random_featured_product->fields['products_image'], $random_featured_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
$content .= '<br />' . $random_featured_product->fields['products_name'] . '</a>';
$content .= '<div>' . $featured_box_price . '</div>';
$content .= '</div>';
$random_featured_product->MoveNextRandom();
}
?>
also, how do i change the "manufacturer" section to read "designer"? as seen here -- http://www.templatemonster.com/sampleView.php?type=16
Re: Not to show Featured Product Sidebox on main page
btw: please explain in very elementary terms. i'm very new at this!! thx.
Re: Not to show Featured Product Sidebox on main page
Hi Linda
I am most impressed by your patience and help given.
I went back to basics and installed the blank-sidebox package again.
Using your help and coding from earlier in the thread It now Works. :smile:
I am using the following code....
// test if box should display
$show_blank_sidebox = true;
$show_blank_sidebox = !$this_is_home_page;
//echo 'I SEE ' . ($this_is_home_page == true ? "Lucy I'm Home!" : "Rick? Where are you");
if ($show_blank_sidebox == true) {
require($template->get_template_dir('tpl_blank_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_blank_sidebox.php');
$title = BOX_HEADING_BLANK_SIDEBOX;
$title_link = false;
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
?>
Once again thankyou for your help. Will call on you again.
Re: Not to show Featured Product Sidebox on main page
Glad to hear you have this working now ... thanks for the update! :smile:
Re: Not to show Featured Product Sidebox on main page
hi, i want the special sidebox to show on product page only, how do i modify the codes? :smile:
Re: Not to show Featured Product Sidebox on main page
As the logic on the specials sidebox is the opposite, where it shows everywhere except the product _info page ... you need to reverse the logic ...
Using your templates and overrides ... I always copy both pieces of a sidebox to the overrides so I don't confuse myself ... you can change the code:
Code:
if (isset($_GET['products_id'])) {
$show_specials= false;
} else {
$show_specials= true;
}
to read the opposite:
Code:
if (isset($_GET['products_id'])) {
$show_specials= true;
} else {
$show_specials= false;
}
Re: Not to show Featured Product Sidebox on main page
thanks linda :clap:
another question, i have links manager and blank sidebox installed, on my links page and links submit page, i only want to show links sidebox and blank sidebox. do i have to modify all of my other sidebox files such as specials, whats new, featured, category, currency ... ? or i could just modify the files of links manager ? how do i make it done?
Re: Not to show Featured Product Sidebox on main page
If you want other sideboxes to not show based on some condition, you would want to clone the concept of how the specials sidebox is managed to show or not show ...