Results 1 to 3 of 3
  1. #1
    Join Date
    May 2011
    Posts
    9
    Plugin Contributions
    0

    help question How do I put a "Specials" link at the TOP of my categories list?

    Hi

    I'd like one of my categories when clicked on to link directly to another page in the site and can't work out how to do it.

    To be exact I want to have my 1st category in the category box to be called specials and to link to the specials page.

    I know there is already a link at the bottom of the categories box to specials, but I want it as the very first thing people will see in the categories box.

    If it is too difficult to get a category to be a link instead of to just show products then I am happy to find out how to move the existing special link to the top of the category box. Either solution will be fine.

    Any help much appreciated thanks

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: How do I put a "Specials" link at the TOP of my categories list?

    1. First be sure you've got your own custom template set up. In this example I'll call it FRED
    2. Copy the /includes/templates/template_default/sideboxes/tpl_categories.php to your /includes/templates/FRED/sideboxes/ folder
    3. You will now edit that new copy: /includes/templates/FRED/sideboxes/tpl_categories.php
    Around line 66 you'll see a section of code that looks like this:
    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";
          }
        }
    MOVE all those lines up between lines 13-14 so it looks like this:
    Code:
      $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\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";
          }
        }
      for ($i=0;$i<sizeof($box_categories_array);$i++) {
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    May 2011
    Posts
    9
    Plugin Contributions
    0

    Default Re: How do I put a "Specials" link at the TOP of my categories list?

    Thats done the job, thank you very much

 

 

Similar Threads

  1. how to change the name "specials" to "on sale"?
    By lina0962 in forum Basic Configuration
    Replies: 1
    Last Post: 20 Nov 2010, 12:16 AM
  2. How to integrate the "quality discount" into the "categories/products"?
    By ching2010 in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 1 May 2010, 06:38 PM
  3. How to add additional link beside the "home" and "Login" page above logo?
    By corditreasures in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Apr 2010, 03:54 PM
  4. On Specials - How can I just display "20% off" or "save $x.xx", but not the price
    By candylotus in forum Setting Up Specials and SaleMaker
    Replies: 0
    Last Post: 24 Apr 2008, 12:44 AM
  5. How to put "Shopping cart" at the top right column
    By d2leader in forum Basic Configuration
    Replies: 4
    Last Post: 29 Sep 2006, 09:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg