Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Dec 2006
    Posts
    48
    Plugin Contributions
    0

    Default Sidebox to show for particular pricing group

    I've searched all over and cannot find a solution to this so I'm posting in th hope someone can help me!

    I've added an extra sidebox using the 'Blank Sidebox' download but I want that to show only to a certain pricing group.

    The code for the box is:

    PHP Code:
    if ($show_blank_sidebox == true) {
          require(
    $template->get_template_dir('tpl_blank_sidebox.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_blank_sidebox.php');
          
    $title =  BOX_HEADING_BLANK_SIDEBOX;
          
    $title_link false;
          require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
     } 
    so I altered the first line like:

    PHP Code:
    if ($show_blank_sidebox == true) and ($customers_group '1') { 
    I know it's probably not correct as it's not working but hopefully you can see what I am trying to achieve! Just a simple check to see if the logged in person is a member of a particular pricing group and if it is then display the sidebox.

    Any help would be appreciated!


  2. #2
    Join Date
    Dec 2006
    Posts
    48
    Plugin Contributions
    0

    Default Re: Sidebox to show for particular pricing group

    OK, managed to figure this one out!

    I added a new query to check if the currently logged in customer belongs to a particular pricing group and if so, only displays the sidebox to that pricing group:

    PHP Code:
    $show_blank_sidebox true;
      
    $group_query $db->Execute("select customers_group_pricing from " TABLE_CUSTOMERS " where customers_id = '" . (int)$_SESSION['customer_id'] . "'");

      if ((
    $show_blank_sidebox == true) && ($group_query->fields['customers_group_pricing'] == '1')) {
          require(
    $template->get_template_dir('tpl_blank_sidebox.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_blank_sidebox.php');
          
    $title =  BOX_HEADING_BLANK_SIDEBOX;
          
    $title_link false;
          require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
     } 

 

 

Similar Threads

  1. v151 Show payment for only specific group pricing customers
    By dionidis in forum Addon Payment Modules
    Replies: 1
    Last Post: 12 Dec 2012, 02:55 PM
  2. Particular product visible to a particular group only
    By aditya369 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 19 Apr 2012, 07:47 AM
  3. Replies: 0
    Last Post: 24 Jun 2010, 08:58 PM
  4. I need to have a particular sidebox only show on one EZ page.
    By tolefairy in forum General Questions
    Replies: 0
    Last Post: 20 Jan 2008, 07:20 AM
  5. Disable a particular sidebox for a particular page?
    By surabisantosh in forum Basic Configuration
    Replies: 1
    Last Post: 22 Nov 2007, 08:04 PM

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