Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default adding link to categories sidebox under all products

    I've searched all through the tutorials and forum and haven't been able to find the answer to my question. What do I need to do to add a link to my site's Quick Orders mod page on the category sidebox? I would like to place it under the "All Products" link. I've had a look at MYTEMPLATE/templates/tpl_categories.php and have located the code for the "permanent" category links of specials, featured products, new products and all products. But I don't know what steps I need to take to add "Quick Orders" to them. Can anyone please give me a step by step of what to do? I'm still pretty wet behind the ears with coding, and for the thousands of other newbies like me I would gladly package it together for the tutorials/wiki or as a mod.

    Thanks!

    Matt

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: adding link to categories sidebox under all products

    You're in the right file. Just two steps:

    1. Add the following to the file that you are using to override english.php (or whatever language file you are using on your site) and add the following to it
    PHP Code:
      define('CATEGORIES_BOX_HEADING_QUICK_ORDER''Quick Order by Model'); 
    2. Replace this
    PHP Code:
        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>'
    with this
    PHP Code:
        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 .= '<a class="category-links" href="' zen_href_link(FILENAME_QUICK_ORDER) . '">' CATEGORIES_BOX_HEADING_QUICK_ORDER '</a>' "\n";
      }
      
    $content .= '</div>'
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default Re: adding link to categories sidebox under all products

    Thank you so much Kuroi!!! That did it!

    Just to clarify my original post, the category file that needs to be changed is in includes/templates/MYTEMPLATE/sideboxes/tpl_categories.php and the define file needs to be added to includes/languages/MYTEMPLATE/english.php (or whatever language you are using).

    I had to change your code slightly to fit the code of the CSS flyout menu that I'm using, so for anyone else using this menu the code changes are:

    look for this code:

    Code:
    [FONT=Courier New]if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') { 
          $content .= '<ul class="level1"><li><a href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a></li></ul>'; 
        } 
      } 
      $content .= '</div>';  
    [/FONT]
    and change it to this:

    Code:
     [FONT=Courier New]if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true'[/FONT][FONT=Courier New]) { 
          $content .= '<ul class="level1"><li><a href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a></li></ul>'[/FONT][FONT=Courier New]; 
        } [/FONT]
    [FONT=Courier New] $content .= '<ul class="level1"><li> <a href="' . zen_href_link(FILENAME_QUICK_ORDER) . '">' . CATEGORIES_BOX_HEADING_QUICK_ORDER . '</a></li></ul>'; 
      } 
      $content .= '</div>'; [/FONT]
    You can, of course, substitute any other page link to suit your needs.

    Thanks again!

    Matt

  4. #4
    Join Date
    May 2007
    Posts
    6
    Plugin Contributions
    0

    Default Re: adding link to categories sidebox under all products

    Hi,
    I am interested in doing a similar thing - please excuse me if this is a stuipid question but i would like to a link in the cat box to go to a new page e.g. page2 which will host an iframe link to a whitelabel affiliate site. Can I do this in the same way?

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: adding link to categories sidebox under all products

    The two variants of code above (select according to the type of categories box template you are using) will work for any internal link with small tweaks to direct them to the specific page you require. What you're going to do on that page will have no bearing on the method used to link to it.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    May 2007
    Posts
    6
    Plugin Contributions
    0

    Default Re: adding link to categories sidebox under all products

    Thanks for the quick reply - Almost got it working

 

 

Similar Threads

  1. v151 Adding a home link inside the categories sidebox?
    By 34Ford in forum Basic Configuration
    Replies: 2
    Last Post: 15 Apr 2013, 06:53 PM
  2. v139h Adding a simple link to the categories sidebox
    By doooomed in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 22 Oct 2012, 11:53 PM
  3. how to change color of "all product" that is under the categories sidebox?
    By uri1223 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 9 Aug 2011, 06:14 PM
  4. How to add a simle text link under New/All Products links in CAT side box?
    By oavs in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 7 Dec 2008, 03:17 AM

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