Forums / General Questions / Specials Sidebox showing on home page only

Specials Sidebox showing on home page only

Locked

Views: 6,707

Results 1 to 20 of 35
This thread is locked. New replies are disabled.
13 Feb 2008, 10:55 PM
#1
divinelighting avatar

divinelighting

Zen Follower

Join Date:
Jun 2006
Location:
Atlanta, GA
Posts:
124
Plugin Contributions:
0

Specials Sidebox showing on home page only

Is is normal for the specials sidebox (set to right column) to only show on home page? I would like it to be visible when viewing products as well.

Thanks,
Dustin

http://www.divinelighting.com -- Super Orders 3.0 -- Ultimate SEO -- Quantity Discounts -- SitemapXML -- Image Handler -- Shipworks

10 Nov 2008, 12:51 PM
#2
marksu avatar

marksu

Zen Follower

Join Date:
Nov 2007
Posts:
260
Plugin Contributions:
0

Re: Specials Sidebox showing on home page only

divinelighting:

Is is normal for the specials sidebox (set to right column) to only show on home page? I would like it to be visible when viewing products as well.

Thanks,
Dustin

I am wondering the same thing.

10 Nov 2008, 3:50 PM
#3
ajeh avatar

ajeh

Oba-san

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

Re: Specials Sidebox showing on home page only

The specials sidebox is designed to not show on the product _info page ...

You can customize the code with your templates and overrides ...

I prefer, when working on sideboxes, to copy both parts of a sidebox to the templates and overrides so that things are managed in pairs ... but that is a personal opinion ... :smile:
/includes/modules/sideboxes/specials.php
/includes/templates/template_default/sideboxes/tpl_specials.php

Copy to your templates and overrides directories:
/includes/modules/sideboxes/your_template_dir/specials.php
/includes/templates/your_template_dir/sideboxes/tpl_specials.php

If you look at this section of code, you will see how the sidebox is disabled when there is a $_GET['products_id'] set:

// test if box should display
  $show_specials= false;

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

  if ($show_specials == true) {

Any time $show_specials is set to false you will not see the specials sidebox and when $show_specials is set to true then there will be a special sidebox ...

You can add any number of conditions to the sideboxes to use this method to control them ...

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!

17 Jan 2009, 4:24 AM
#4
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

Re: Specials Sidebox showing on home page only

I'm curious what the thought might be to have no specials on detail pages by default. Would this maybe be to not distract someone away from a page containing an add-to-cart button on it?

Is the strategy only I'm wondering about.

17 Jan 2009, 3:32 PM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Specials Sidebox showing on home page only

In part, it is to show that it "can be done" ... the other part is to remove a distraction ... :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!

31 Jan 2009, 9:09 PM
#6
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: Specials Sidebox showing on home page only

Ajeh:

The specials sidebox is designed to not show on the product _info page ...

You can customize the code with your templates and overrides ...

I prefer, when working on sideboxes, to copy both parts of a sidebox to the templates and overrides so that things are managed in pairs ... but that is a personal opinion ... :smile:
/includes/modules/sideboxes/specials.php
/includes/templates/template_default/sideboxes/tpl_specials.php

Copy to your templates and overrides directories:
/includes/modules/sideboxes/your_template_dir/specials.php
/includes/templates/your_template_dir/sideboxes/tpl_specials.php

If you look at this section of code, you will see how the sidebox is disabled when there is a $_GET['products_id'] set:

// test if box should display
$show_specials= false;

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

if ($show_specials == true) {

> 
> Any time $show_specials is set to false you will not see the specials sidebox and when $show_specials is set to true then there will be a special sidebox ...
> 
> You can add any number of conditions to the sideboxes to use this method to control them ...

I can not get specials to work when click on [more]. I changed the false to true in includes/modules/sideboxes/temp/specials.php and still does not work.

Did you do anything to the other file includes/template/temp/sidesboxes/tpl_specials.php? Currently, when you click on[more] it takes you to page with lines and no images or details.

Kim

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

1 Feb 2009, 4:20 PM
#7
ajeh avatar

ajeh

Oba-san

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

Re: Specials Sidebox showing on home page only

If I change the code to read:

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

where it always evaluates to true, then I always have a specials sidebox ...

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!

1 Feb 2009, 9:38 PM
#8
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: Specials Sidebox showing on home page only

Ajeh:

If I change the code to read:

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

> 
> where it always evaluates to true, then I always have a specials sidebox ...

I have this in includes/modules/sideboxes/temp/specials.php

// test if box should display
  $show_specials= true;

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

And I still do not have images or descriptions, just doted lines.

Kim

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

2 Feb 2009, 3:49 PM
#9
ajeh avatar

ajeh

Oba-san

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

Re: Specials Sidebox showing on home page only

Do a search in the Developers Tool Kit in the bottom input box for:
$show_specials

and select Catalog and click search ... to see what files come up and make sure the files have the right settings on the server ...

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!

2 Feb 2009, 4:34 PM
#10
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: Specials Sidebox showing on home page only

Ajeh:

Do a search in the Developers Tool Kit in the bottom input box for:
$show_specials

and select Catalog and click search ... to see what files come up and make sure the files have the right settings on the server ...

Hi Ajeh,

I did the admin search with developers tool kit and all came up as true. What are the correct settings for the files? Next, I need to look at settings on the server.
Thanks, Kim

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

2 Feb 2009, 5:15 PM
#11
ajeh avatar

ajeh

Oba-san

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

Re: Specials Sidebox showing on home page only

If they are both set to true and you have active specials you should see the specials in the sidebox regardless of where you are ...

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!

2 Feb 2009, 7:47 PM
#12
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: Specials Sidebox showing on home page only

Ajeh:

If they are both set to true and you have active specials you should see the specials in the sidebox regardless of where you are ...

Yes, I see a few in the sidebox. It is when I click on [more] the next page does not show the rest. I just has the dots for in between each product with no images or information....

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

3 Feb 2009, 5:59 PM
#13
ajeh avatar

ajeh

Oba-san

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

Re: Specials Sidebox showing on home page only

If it worked in the sidebox but then the specials page itself is broken then it sounds like there is an error with that page ...

If you switch to the Classic Template, does the Specials page now work?

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!

3 Feb 2009, 10:37 PM
#14
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: Specials Sidebox showing on home page only

Ajeh:

If it worked in the sidebox but then the specials page itself is broken then it sounds like there is an error with that page ...

If you switch to the Classic Template, does the Specials page now work?

Yes, it works with classic template.

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

4 Feb 2009, 4:27 PM
#15
ajeh avatar

ajeh

Oba-san

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

Re: Specials Sidebox showing on home page only

Sounds like an issue with your template files ...

You may want to compare them to the original files to see if anything stands out ...

Beyond Compare from scootersoftware.com is a handy tool for this ...

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!

5 Feb 2009, 11:47 PM
#16
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: Specials Sidebox showing on home page only

Ajeh:

Sounds like an issue with your template files ...

You may want to compare them to the original files to see if anything stands out ...

Beyond Compare from scootersoftware.com is a handy tool for this ...

I compared with original files and did not see anything...

Here are two files unless there are others I do not know about.

include/modules/sidebox/temp/specials.php

// test if box should display
  $show_specials= true;

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

  if ($show_specials == true) {
    $random_specials_sidebox_product_query = "select p.products_id, pd.products_name, p.products_price,
                                    p.products_tax_class_id, p.products_image,
                                    s.specials_new_products_price,
                                    p.master_categories_id
                             from " . TABLE_PRODUCTS . " p, " .
                                      TABLE_PRODUCTS_DESCRIPTION . " pd, " .
                                      TABLE_SPECIALS . " s
                             where p.products_status = 1
                             and p.products_id = s.products_id
                             and pd.products_id = s.products_id
                             and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                             and s.status = 1";

//    $random_specials_sidebox_product = zen_random_select($random_specials_sidebox_product_query);
    $random_specials_sidebox_product = $db->ExecuteRandomMulti($random_specials_sidebox_product_query, MAX_RANDOM_SELECT_SPECIALS);

    if ($random_specials_sidebox_product->RecordCount() > 0)  {
      require($template->get_template_dir('tpl_specials.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_specials.php');
      $title =  BOX_HEADING_SPECIALS;
      $title_link = FILENAME_SPECIALS;
      require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
    }
  }
?>

includes/templates/temp/sideboxes/tpl_specials.php

$content = "";
 $specials_box_counter = 0;
 while (!$random_specials_sidebox_product->EOF) {
   $specials_box_counter++;
   $specials_box_price = zen_get_products_display_price($random_specials_sidebox_product->fields['products_id']);
   $content .= '<div class="sideBoxContent centeredContent">';
   $content .= '<a href="' . zen_href_link(zen_get_info_page($random_specials_sidebox_product->fields["products_id"]), 'cPath=' . zen_get_generated_category_path_rev($random_specials_sidebox_product->fields["master_categories_id"]) . '&products_id=' . $random_specials_sidebox_product->fields["products_id"]) . '">' . zen_image(DIR_WS_IMAGES . $random_specials_sidebox_product->fields['products_image'], $random_specials_sidebox_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); 
   $content .= '<br />' . $random_specials_sidebox_product->fields['products_name'] . '</a>';
   $content .= '<div>' . $specials_box_price . '</div>';
   $content .= '</div>';
   $random_specials_sidebox_product->MoveNextRandom();
 }
?>

Do you see anything?

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

7 Feb 2009, 2:13 PM
#17
ajeh avatar

ajeh

Oba-san

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

Re: Specials Sidebox showing on home page only

Does the Specials page show when you use the link to specials from the Categories sidebox?

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!

7 Feb 2009, 2:28 PM
#18
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: Specials Sidebox showing on home page only

Ajeh:

Does the Specials page show when you use the link to specials from the Categories sidebox?

No, it does not work from the categories sidebox either. :frusty:

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

7 Feb 2009, 5:17 PM
#19
ajeh avatar

ajeh

Oba-san

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

Re: Specials Sidebox showing on home page only

This makes me think you are looking in the wrong place for the problem ... :blink:

Check the files:
/includes/templates/template_default/templates/tpl_specials_default.php
/includes/languages/english/specials.php

against your template files:
/includes/templates/temp/templates/tpl_specials_default.php
/includes/languages/english/temp/specials.php

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!

7 Feb 2009, 6:40 PM
#20
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: Specials Sidebox showing on home page only

Ajeh:

This makes me think you are looking in the wrong place for the problem ... :blink:

Check the files:
/includes/templates/template_default/templates/tpl_specials_default.php
/includes/languages/english/specials.php

against your template files:
/includes/templates/temp/templates/tpl_specials_default.php
/includes/languages/english/temp/specials.php

Checked the files and they match....

kburner
Burner Christian Bookstore
https://www.burnerbooks.com