Page 4 of 4 FirstFirst ... 234
Results 31 to 33 of 33
  1. #31
    Join Date
    Nov 2008
    Posts
    69
    Plugin Contributions
    0

    Default Re: Sidebox Visible to Logged in Members Only

    Ajeh,

    I am trying to put this code into the more_information page now instead of the information page, but it doesn't seem to be working correctly.

    Here is the code that I have been trying to add:

    HTML Code:
    <?php
    /**
     * more_information sidebox - displays list of links to additional pages on the site.  Must separately build those pages' content.
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: more_information.php 3464 2006-04-19 00:07:26Z ajeh $
     */
    
    // test if box should display
    
      unset($more_information);
      
    // test if box should display
      $more_information= false;
    
    // test if box should display based on customer is logged in
      if (!$_SESSION['customer_id']) {
        $more_information= false;
      } else {
        $more_information= true;
      }
      
      if ($more_information == true) {
    
    // test if links should display
      if (DEFINE_PAGE_2_STATUS <= 1) {
        $more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_2) . '">' . BOX_INFORMATION_PAGE_2 . '</a>';
      }
      if (DEFINE_PAGE_3_STATUS <= 1) {
        $more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_3) . '">' . BOX_INFORMATION_PAGE_3 . '</a>';
      }
      if (DEFINE_PAGE_4_STATUS <= 1) {
        $more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_4) . '">' . BOX_INFORMATION_PAGE_4 . '</a>';
      }
    
    // insert additional links below to add to the more_information box
    // Example:
    //    $more_information[] = '<a href="' . zen_href_link(FILENAME_DEFAULT) . '">' . 'TESTING' . '</a>';
    
    
    // only show if links are active
      if (sizeof($more_information) > 0) {
        require($template->get_template_dir('tpl_more_information.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_more_information.php');
    
        $title =  BOX_HEADING_MORE_INFORMATION;
        $title_link = false;
        require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
      }
    ?>

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

    Default Re: Sidebox Visible to Logged in Members Only

    You are missing the closing bracket } of the IF statement before the closing php tag ?> at the bottom of the file ...

    See if adding that helps you out ...

    The bottom of the code should look like:
    Code:
    // only show if links are active
      if (sizeof($more_information) > 0) {
        require($template->get_template_dir('tpl_more_information.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_more_information.php');
    
        $title =  BOX_HEADING_MORE_INFORMATION;
        $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!

  3. #33
    Join Date
    Sep 2010
    Posts
    612
    Plugin Contributions
    0

    Default Re: Sidebox Visible to Logged in Members Only

    Hi everyone, is there a way to create a sidebox(or a popup) based on validated credentials on a customer login? For example, would it be possible to have a sidebox visible for a birthday greeting or a holiday greeting that is specific to that customer?

    The birthday greeting would be dependent of the birthdate and the holiday greeting would be dependent on the customer's country.

    Any ideas? Thank you!

 

 
Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. sidebox module for logged in users only
    By amat78 in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 21 Apr 2011, 08:19 PM
  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. Sidebox visible- but not accessible unless logged in
    By btolly in forum Basic Configuration
    Replies: 17
    Last Post: 22 Sep 2009, 02:16 PM
  4. Adding products that are only visible to 'club' members?
    By ArtsygalDotNet in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 9 Sep 2008, 09:07 PM
  5. Members only can view sidebox
    By misty in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 30 May 2006, 07:45 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