Forums / Basic Configuration / Not to show Featured Product Sidebox on main page

Not to show Featured Product Sidebox on main page

Locked

Views: 9,357

Results 41 to 48 of 48
This thread is locked. New replies are disabled.
7 Aug 2008, 8:19 AM
#41
jenn8five avatar

jenn8five

New Zenner

Join Date:
Aug 2008
Posts:
54
Plugin Contributions:
0

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

7 Aug 2008, 8:21 AM
#42
jenn8five avatar

jenn8five

New Zenner

Join Date:
Aug 2008
Posts:
54
Plugin Contributions:
0

Re: Not to show Featured Product Sidebox on main page

btw: please explain in very elementary terms. i'm very new at this!! thx.

7 Aug 2008, 9:40 AM
#43
merlin01326 avatar

merlin01326

New Zenner

Join Date:
Apr 2008
Posts:
27
Plugin Contributions:
0

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.

7 Aug 2008, 2:09 PM
#44
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Not to show Featured Product Sidebox on main page

Glad to hear you have this working now ... thanks for the update! :smile:

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!

24 Jan 2009, 6:43 AM
#45
myworld20091 avatar

myworld20091

New Zenner

Join Date:
Oct 2008
Posts:
85
Plugin Contributions:
0

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:

24 Jan 2009, 4:00 PM
#46
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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:

  if (isset($_GET['products_id'])) {
    $show_specials= false;
  } else {
    $show_specials= true;
  }

to read the opposite:

  if (isset($_GET['products_id'])) {
    $show_specials= true;
  } else {
    $show_specials= false;
  }

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!

25 Jan 2009, 3:41 PM
#47
myworld20091 avatar

myworld20091

New Zenner

Join Date:
Oct 2008
Posts:
85
Plugin Contributions:
0

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?

25 Jan 2009, 8:13 PM
#48
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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 ...

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!