Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Your Zen Cart Products / Setting Up Specials and SaleMaker / How to make Specials Category display at top of list?

How to make Specials Category display at top of list?

Locked

Started by nathanscrivener on 31 Oct 2010, 12:56 AM · Views: 1,589

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
31 Oct 2010, 12:56 AM
#1
nathanscrivener avatar

nathanscrivener

New Zenner

Join Date:
Oct 2009
Posts:
36
Plugin Contributions:
0

Post #1 by nathanscrivener

Hi, just wondering how to move the 'Specials' category to the top of the list? It does not show up in the categories list in Zen Cart admin, so I can't set a sort order for it.

At the moment it is displaying at the bottom of the list.

Thanks in advance .... :smile:

31 Oct 2010, 2:54 AM
#2
ajeh avatar

ajeh

Oba-san

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

Post #2 by ajeh

The link for Specials is added to the end of the Categories sidebox template in the tpl_categories.php ...

You would need to use your templates and overrides and find the code:

    if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
      $show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= 1 limit 1");
      if ($show_this->RecordCount() > 0) {
        $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '<br />' . "\n";
      }
    }

Comment out the line with the $content and add that whole peice of code:

    if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
      $show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= 1 limit 1");
      if ($show_this->RecordCount() > 0) {
        $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '<br />' . "\n";
      }
    }

before the start of the FOR loop that is in the file ...

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 Oct 2010, 5:35 AM
#3
nathanscrivener avatar

nathanscrivener

New Zenner

Join Date:
Oct 2009
Posts:
36
Plugin Contributions:
0

Post #3 by nathanscrivener

Thanks Linda, you are awesome!!!! :smile:

31 Oct 2010, 5:52 AM
#4
ajeh avatar

ajeh

Oba-san

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

Post #4 by ajeh

You are most welcome ... thanks for the update that you were able to change the location of the Specials Link in the Categories sidebox by rearranging things ... :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!