Results 1 to 9 of 9

Hybrid View

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

    Default Re: sidebox catagory link

    To pop the link into the bottom of the categories list, make a copy of the sidebox/tpl_categories.php file in your template sideboxes directory.

    Then edit the new file to insert a new line before line 93 ($content .= '<div'>;) that says
    $content .= '<a class="category-external" href="http://yourexternalURL">Your external URL description</a>' . "\n";
    and then create a style for .category-external or add it to the definition you already have for .category-links if you want it to match the others at the bottom of the categories box.
    Kuroi Web Design and Development | Twitter

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

  2. #2
    Join Date
    Jun 2006
    Posts
    566
    Plugin Contributions
    0

    Default Re: sidebox catagory link

    now how would you hide a link so only logged in users could veiw

    Code:
    if (!$_SESSION['customer_id']) {
    $content .= '<a class="category-internal" href="http://www.gorillagear.ca/index.php?main_page=index&cPath=38">Clearance Bin</a>' . "\n";
    this doesn't seem to work any ideas
    www.gorillagear.ca = zencart v1.3.9h with 40+ mods

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

    Default Re: sidebox catagory link

    @MB1

    A couple of things leap to mind.

    Firstly you're using a internal link that would be shown normally by the categories sidebox, so have you inhibited that for all customers? If so, how?

    Secondly the code that you have posted is both back to front and incomplete. The "!" in front of the $_SESSION varable means only do what follows when the customer is *not* logged in, which seems to me the opposite of what you are trying to achieve. And the IF statement has an opening bracket but no closing bracket.
    Kuroi Web Design and Development | Twitter

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

  4. #4
    Join Date
    Jun 2006
    Posts
    566
    Plugin Contributions
    0

    Default Re: sidebox catagory link

    i was just playing with the hide side box code and seeing if i could apply it to a link in a side box but i really don't know what i'm doing i must of played with the code a few differant was with no results
    www.gorillagear.ca = zencart v1.3.9h with 40+ mods

  5. #5
    Join Date
    Jun 2006
    Posts
    566
    Plugin Contributions
    0

    Default Re: sidebox catagory link

    ok i got it
    in store/includes/functions/extra_functions/group_check.php which was created for me by swguy i added this piece of code which i'm sure could be cleaned up but it works

    Code:
    // for members: Deny not logged in.
        function verify_customer_group_members() {
           global $db;
           if ( !isset($_SESSION['customer_id']) || ($_SESSION['customer_id'] == '')) {
               return false;
           }
           return true;  // include all others
        }
    then in store/includes/templates/zzz/sideboxes/tpl_categories.php i added the folowing just above $content .= '</div>';

    Code:
    if (verify_customer_group_members()) { 
    $content .= '<a class="category-internal" href="http://www.gorillagear.ca/index.php?main_page=index&cPath=38">Clearance Bin</a>' . "\n"; 
     }
    works fine now
    www.gorillagear.ca = zencart v1.3.9h with 40+ mods

 

 

Similar Threads

  1. Product in Index link to Catagory
    By RFree190 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 19 Mar 2011, 06:38 PM
  2. change the link in a catagory
    By stitchnkitty in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 25 Sep 2009, 03:45 PM
  3. Catagory Link Redirect / Modification
    By dousacu in forum General Questions
    Replies: 15
    Last Post: 30 Sep 2008, 03:54 PM
  4. Catagory Sidebox - delete # of items
    By peppyone in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 31 Dec 2007, 05:15 PM
  5. Link to a catagory?
    By teoti in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 26 Jul 2006, 11:04 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