Forums / Templates, Stylesheets, Page Layout / calling a defined page via centerbox

calling a defined page via centerbox

Locked

Views: 929

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
5 Nov 2007, 1:43 AM
#1
hemma avatar

hemma

New Zenner

Join Date:
Jul 2006
Posts:
37
Plugin Contributions:
0

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!

5 Nov 2007, 4:38 AM
#2
hemma avatar

hemma

New Zenner

Join Date:
Jul 2006
Posts:
37
Plugin Contributions:
0

Re: calling a defined page via centerbox

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

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_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);

This way, you can have Manufacturer's Information in the Product listing....

5 Nov 2007, 4:11 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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 ... :smile:

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!

5 Nov 2007, 11:53 PM
#4
hemma avatar

hemma

New Zenner

Join Date:
Jul 2006
Posts:
37
Plugin Contributions:
0

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.....

6 Nov 2007, 4:35 AM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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 ... :eek:

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 Nov 2007, 11:24 AM
#6
hemma avatar

hemma

New Zenner

Join Date:
Jul 2006
Posts:
37
Plugin Contributions:
0

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...

if ($manufacturers_id > '0')
{$show_manufacturer = true;}
else
{$show_manufacturer = false;}
7 Nov 2007, 4:29 AM
#7
hemma avatar

hemma

New Zenner

Join Date:
Jul 2006
Posts:
37
Plugin Contributions:
0

Re: calling a defined page via centerbox

Fixed it.......

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_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);}