Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Members only can view sidebox

    Have tried to follow this archived thread at
    http://www.zen-cart.com/forum/showth...debox+override
    Got this far
    Code:
    <?php
    $show_mp3player = false;
    if ($_SESSION['customer_id'] != '') {
    $show_mp3player = true;
    } else {
    if (STORE_STATUS == '0')
    $show_mp3player= false;
    }
      require($template->get_template_dir('tpl_temps.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_mp3_player.php');
    
      $title =  BOX_HEADING_MP3PLAYER;
      $left_corner = false;
      $right_corner = false;
      $right_arrow = false;
      $title_link = false;
    
      require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
    ?>
    Sidebox I only want logged in members to view is still visible..any help or
    advice gratefully received.. TIA

  2. #2
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Members only can view sidebox

    Noone can help?

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Members only can view sidebox

    Aren't you missing the IF where it decides should I or shouldn't I $show_mp3player ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Members only can view sidebox

    Aren't you missing the IF where it decides should I or shouldn't I $show_mp3player
    Probably Ajeh, could you please put me out of my misery and tell me where
    that IF should be? TIA

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Members only can view sidebox

    You determined when the $show_mp3player is true or false ... but you did not apply the results to running or not running the sidebox ...

    Code:
    if ($show_mp3player == true) {
    
      require($template->get_template_dir('tpl_temps.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_mp3_player.php');
    
      $title =  BOX_HEADING_MP3PLAYER;
      $left_corner = false;
      $right_corner = false;
      $right_arrow = false;
      $title_link = false;
    
      require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
    }
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Members only can view sidebox

    you did not apply the results to running or not running the sidebox

    Stupid me..
    deprivation not good idea when coding!!
    thanks so much, working fine now

 

 

Similar Threads

  1. Sidebox Visible to Logged in Members Only
    By jeskremer in forum Basic Configuration
    Replies: 32
    Last Post: 21 Feb 2011, 01:55 AM
  2. members only: hiding the products from non members
    By poosk in forum General Questions
    Replies: 2
    Last Post: 18 Nov 2009, 04:17 PM
  3. Replies: 1
    Last Post: 25 Feb 2009, 02:33 PM
  4. How can I make products only viewable to registered members or customers?
    By mohinder in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 6 Jun 2007, 08:35 AM
  5. How can I make products only viewable to registered members or customers?
    By mohinder in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 6 Jun 2007, 08:11 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