Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / New Products list position on categories box

New Products list position on categories box

Locked

Views: 1,752

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
16 Nov 2006, 7:41 AM
#1
bahtiar avatar

bahtiar

New Zenner

Join Date:
Jan 2005
Posts:
19
Plugin Contributions:
0

New Products list position on categories box

Greeting All,

I turn on New Products Listing on categories box, but I found that default location at bottom line (after products categories list). How to move it to top position (before products categories list) ?
Thanks

17 Nov 2006, 10:18 PM
#2
lib99 avatar

lib99

Totally Zenned

Join Date:
Dec 2004
Location:
New York, USA
Posts:
965
Plugin Contributions:
0

Re: New Products list position on categories box

copy the following default template file
includes/templates/template_default/sideboxes/tpl_categories.php

to your template override folder
includes/templates/YOUR_TEMPLATE_DIR/sideboxes/

Then with a text editor (don't use cPanel editor) carefully move the following block of code to where you would like.

    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";
      }
    }

Moving that block of code to the line immediately after the following code should do the trick. ```
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";[CODE]