Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Sorting Featured/Specials/What's New in Category Box

Sorting Featured/Specials/What's New in Category Box

Locked

Views: 836

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
24 Aug 2009, 6:12 PM
#1
debiwebi avatar

debiwebi

New Zenner

Join Date:
Aug 2009
Location:
Highlands Ranch, Colorado
Posts:
84
Plugin Contributions:
0

Sorting Featured/Specials/What's New in Category Box

Hopefully this will be an easy answer for you, I couldn't find info on my searching the forum.

I want to sort the links to Featured/Specials/What's New in the category sidebox to appear as:

What's New
Rosie's Specials (this is actually featured items)
Beaker's Bargains (this is actually specials)

Can you tell me how to do this? Can't get it to work from the Admin panel.

Here's how it looks now:

http://avianoutfitters.com

24 Aug 2009, 9:44 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Sorting Featured/Specials/What's New in Category Box

You would have to re-order them in the file /includes/templates/template_default/sideboxes/tpl_categories.php
Look for this

$content .= '<br />' . "\n";
    }
  }

  if (SHOW_CATEGORIES_BOX_SPECIALS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true' or SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
// display a separator between categories and links
    if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') {
      $content .= '<hr id="catBoxDivider" />' . "\n";
    }
    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";
      }
    }
    if (SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') {
      // display limits
//      $display_limit = zen_get_products_new_timelimit();
      $display_limit = zen_get_new_date_range();

      $show_this = $db->Execute("select p.products_id
                                 from " . TABLE_PRODUCTS . " p
                                 where p.products_status = 1 " . $display_limit . " limit 1");
      if ($show_this->RecordCount() > 0) {
        $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_NEW) . '">' . CATEGORIES_BOX_HEADING_WHATS_NEW . '</a>' . '<br />' . "\n";
      }
    }
    if (SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true') {
      $show_this = $db->Execute("select products_id from " . TABLE_FEATURED . " where status= 1 limit 1");
      if ($show_this->RecordCount() > 0) {
        $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS . '</a>' . '<br />' . "\n";
      }
    }
    if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
      $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a>' . "\n";
    }
  }
  $content .= '</div>';
?>
24 Aug 2009, 11:14 PM
#3
debiwebi avatar

debiwebi

New Zenner

Join Date:
Aug 2009
Location:
Highlands Ranch, Colorado
Posts:
84
Plugin Contributions:
0

Re: Sorting Featured/Specials/What's New in Category Box

Whoa, that looks scary. I'll give it a shot. :ohmy: Thank you!!!

25 Aug 2009, 2:41 PM
#4
debiwebi avatar

debiwebi

New Zenner

Join Date:
Aug 2009
Location:
Highlands Ranch, Colorado
Posts:
84
Plugin Contributions:
0

Re: Sorting Featured/Specials/What's New in Category Box

Yea! It worked and it wasn't hard to do. Thank you!!:hug: