Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2006
    Posts
    40
    Plugin Contributions
    0

    Default calling a defined page via centerbox

    Hi all,

    I am trying to convert the editable sidebox into a centerbox which will allow me to read different defined pages according to manufacturer.

    The reason for me to do this is to allow a description for each manufacturer within the listings... I managed to change the following to call the 'centerbox'

    if ($manufacturers_id > 0)
    {$show_manufacturer_info = true;}
    else
    {$show_manufacturer_info = false;}

    so now, if a product listing is sorted by product ID, will allow this centerbox to appear.

    However, what i want to do is to be able to call different defined pages according to manufacturer_id... e.g. if manufacturer_id == '5'; then display define_5.php... basically calling it by using that value and adding it as a part of a file name....

    Sorry i am a bit stuck at this point and any pointers would be Greatly appreciated....

    Thanks guys!

  2. #2
    Join Date
    Jul 2006
    Posts
    40
    Plugin Contributions
    0

    Default [SOLVED] Calling a defined page via centerbox

    Nevermind, resolved it..... i did it like this:

    PHP Code:
    if ($manufacturers_id '0')
    {
    $show_manufacturer true;}
    else
    {
    $show_manufacturer false;}
      
    $manufacturer_filename =  'define_manufacturer_'.$manufacturers_id.'.php';
      
    $define_sidebox zen_get_file_directory(DIR_WS_LANGUAGES $_SESSION['language'] . '/html_includes/'$brand_filename'false');
      if (
    $show_manufacturer true)
          require(
    $template->get_template_dir('tpl_manufacturer.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_manufacturer.php');
          require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default); 
    This way, you can have Manufacturer's Information in the Product listing....

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

    Default Re: calling a defined page via centerbox

    NOTE: sometimes the manufacturers_id is called via the $filter_id so be sure to test this well ...
    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
    Jul 2006
    Posts
    40
    Plugin Contributions
    0

    Default Re: calling a defined page via centerbox

    Thanks for the tip! I did run into a few issues.... so i will use that to try that out.....

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

    Default Re: calling a defined page via centerbox

    If you were to use the Tools ... Developers Tool Kit ... and put in the bottom input box:
    filter_id

    and then searched the Catalog for it ...

    It would help you find all the files where this is used and, most importantly, how to determine is that $filter_id meaning categories_id or manufacturers_id as it changes from one to the other depending on who's who in the zoo ...
    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
    Jul 2006
    Posts
    40
    Plugin Contributions
    0

    Default Re: calling a defined page via centerbox

    Thanks for that.... but as i am only showing this module in the Product listing, so it means that i will need to find out how can i make it only show up according to brand?

    I can manage to get it to source the defines php file to get the information that i need, but the issue that still stands is that when i click on products listed by category rather than manufacturer, it will display sideboxes instead.

    By the look of things, this part does not seem to register...

    PHP Code:
    if ($manufacturers_id '0')
    {
    $show_manufacturer true;}
    else
    {
    $show_manufacturer false;} 

  7. #7
    Join Date
    Jul 2006
    Posts
    40
    Plugin Contributions
    0

    Default Re: calling a defined page via centerbox

    Fixed it.......

    PHP Code:
    if ($show_manufacturer true)
    {require(
    $template->get_template_dir 'tpl_manufacturer.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_manufacturer.php');
    require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);} 

 

 

Similar Threads

  1. Calling a variable on order confirmation page
    By jcojr72 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 10 Jan 2011, 03:15 AM
  2. Centerbox Categories module vs. default Centerbox
    By notageek in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 27 Mar 2010, 08:11 AM
  3. Calling admin defined functions from catalog files?
    By yellow1912 in forum Contribution-Writing Guidelines
    Replies: 3
    Last Post: 21 Aug 2007, 05:26 AM
  4. Creating and calling a custom page
    By tqualizer_man in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 20 Nov 2006, 04:24 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