Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1

    Default Can I add alink in the Categories Sidebox?

    I am affilliating with a T Shirt company who are building a site based on my store. What I want to do is add a link to this page/pages in the Categories Sidebox.

    Is this possible and if so how do I do it?

    Many thanks in advance.
    Wild Fashions (Alternative)
    Using Zen Cart 1.38 and Purple Lily Template

  2. #2
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: Can I add alink in the Categories Sidebox?

    What are you trying to accomplish with the link(s)?
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Can I add alink in the Categories Sidebox?

    Quite possible. There are several ways you could do it; probably the easiest is to add the link directly to your tpl_categories.php with code like this: How do I add additional links to the Header and Footer?
    To put the link near the all/featured/new links, add it here:
    PHP Code:
    // display a separator between categories and links
        
    if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') {
          
    $content .= '<hr id="catBoxDivider" />' "\n";
        }
        if (
    SHOW_CATEGORIES_BOX_SPECIALS == 'true') { 
    PHP Code:
    // display a separator between categories and links
        
    if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') {
          
    $content .= '<hr id="catBoxDivider" />' "\n";
        }
        echo 
    '<a href="http://your_external_link.com">Your Link Text</a><br />'"\n";
        if (
    SHOW_CATEGORIES_BOX_SPECIALS == 'true') { 

  4. #4
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: Can I add alink in the Categories Sidebox?

    Depending on the goal or use, I was going to suggest either EZ-Pages or the "about us" mod to put the link(s) in a separate box because I'm not sure the info belongs with the categories.
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Can I add alink in the Categories Sidebox?

    True ... there are any number of ways the OP's intention could be organized, and knowing the best would require more info than we have.

  6. #6

    Default Re: Can I add alink in the Categories Sidebox?

    OK and thanks for the replies, seems a bit heavy

    No time at the mo but will try the above options later on.

    Its giving me a headache just thinking about it!
    Wild Fashions (Alternative)
    Using Zen Cart 1.38 and Purple Lily Template

  7. #7

    Default Re: Can I add alink in the Categories Sidebox?

    Sorry should have added:

    The only goal I require is that I can place a link in the Categories sidebox to an external web page.
    Wild Fashions (Alternative)
    Using Zen Cart 1.38 and Purple Lily Template

  8. #8

    Default Re: Can I add alink in the Categories Sidebox?

    OK and again thanks for your quick replies.

    Decided to use ezpages to acomplish this. I would have preferred the link in the categories sidebox but this is just as good. Renamed the sidebox to T Shirts and set the order for it to be just below the categories sidebox.

    Thanks
    Wild Fashions (Alternative)
    Using Zen Cart 1.38 and Purple Lily Template

  9. #9
    Join Date
    Feb 2007
    Posts
    76
    Plugin Contributions
    0

    Default Re: Can I add alink in the Categories Sidebox?

    Hello,

    I wanted to do the same thing and came up with the following, perhaps it works for you too:

    first of all, find tpl_header.php from the includes/templates/template_default/sideboxes folder

    open it and add the following code

    PHP Code:
     
    $content 
    .= '<a class="category-external" href="http://URL">EXTERNAL</a>' "\n"
    after line 14 for a link above the menu (like this:)
    PHP Code:
     
    $content 
    .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent">' "\n";
      
    $content .= '<a class="category-external" href="http://yourexternalURL">EXTERNALTOP</a>' "\n";
      for (
    $i=0;$i<sizeof($box_categories_array);$i++) { 
    and the same after line 61 for one on the bottom (like this:)
    PHP Code:
     
     $content 
    .= '<br />' "\n";
        }
      }
    $content .= '<a class="category-external" href="http://yourexternalURL">EXTERNALBOTTOM</a>' "\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 
    Hope this helps, let us know!

    DMR

  10. #10
    Join Date
    Jan 2010
    Posts
    16
    Plugin Contributions
    0

    Default Re: Can I add alink in the Categories Sidebox?

    Hi, I hope this thread is still running.

    I want to do something similiar, but if I change the code using one of the ways suggested, will it affect the way the rest of my store functions?

    I want all my categories to act as normal but then have 1 or 2 link to an affiliate site when clicked on, such amazon.

    Is this possible?

    I've seen that i can do it for products by changing them to general-document, but want to be able to link straight fromt eh categorie title.

    Thanks

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 23 May 2008, 07:45 AM
  2. How can I hardcode the categories sidebox?
    By member in forum Basic Configuration
    Replies: 4
    Last Post: 19 Feb 2008, 07:27 PM
  3. How can I add a link into the categories sidebox?
    By PaulRiedel in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 1 Jan 2008, 10:09 AM
  4. Can I add the Categories in confirmation e-mail?
    By wooly_sammoth in forum General Questions
    Replies: 2
    Last Post: 2 Dec 2007, 11:54 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR