But try as hard as I could I couldn't find that functionality anywahere - not hidden in the code of Zen Cart or in the forums.
So I thought I'd have a bash at it myself.
Warning the code is very basic - probably lots of room for improvement but for now it seems to be working.
1) Make sure that one or more of the Manufacturers in the Zen Cart Admin has an image associated with it (in my case the image needs to be no wider than 590px or it breaks the design)
2) We are going to be using the Manufacturer URL as the Description field - hey I don't want to be messing round with the databaase and the 255 chars we can add here will be good as a brief description for the Manufacturer
3) Edit the tpl_index_product_list.php (in templates) and at around line 18 add the following (inside php braces)
if (isset($_GET['manufacturers_id'])) {
$manufacturer_info_sidebox_query = "select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url
from " . TABLE_MANUFACTURERS . " m
left join " . TABLE_MANUFACTURERS_INFO . " mi
on (m.manufacturers_id = mi.manufacturers_id
and mi.languages_id = '" . (int)$_SESSION['languages_id'] . "')
where m.manufacturers_id = " . (int)$_GET['manufacturers_id'] ;
$manufacturer_info_sidebox = $db->Execute($manufacturer_info_sidebox_query);
if ($manufacturer_info_sidebox->RecordCount() > 0) {
$content = "";
if (zen_not_null($manufacturer_info_sidebox->fields['manufacturers_image']))
$content .= '<div class="centeredContent manufacturerHead">' . zen_image(DIR_WS_IMAGES . $manufacturer_info_sidebox->fields['manufacturers_image'], $manufacturer_info_sidebox->fields['manufacturers_name']) . '</div>';
;
if (zen_not_null($manufacturer_info_sidebox->fields['manufacturers_url']))
//$content .= '<li><a href="' . zen_href_link(FILENAME_REDIRECT, 'action=manufacturer&manufacturers_id=' . $manufacturer_info_sidebox->fields['manufacturers_id']) . '" target="_blank">' . sprintf(BOX_MANUFACTURER_INFO_HOMEPAGE, $manufacturer_info_sidebox->fields['manufacturers_name']) . '</a></li>' . "\n" ;
$content .= '<p class="manufacturersLanding">'.$manufacturer_info_sidebox->fields['manufacturers_url'].'</p>' . "\n" ;
echo $content;
}
}
Save & Upload this.
What you should find now is that when you go to a page with a manufacturers_id query string it will look in the db to see if there is an associated image and or url (in this case description) and display that
As a final touch you may want to update the Manufacturers page in the Admin section so that the label Manufacturers Url is changed to Description - and that a textarea box is shown rather than the small input field
1) Edit the file admin/manufacturers.php
2) At about line 255 replace this line
$manufacturer_inputs_string .= 'with this line
' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . zen_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']', '', zen_set_field_length(TABLE_MANUFACTURERS_INFO, 'manufacturers_url') );
$manufacturer_inputs_string .= '
' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . zen_draw_textarea_field('manufacturers_url[' . $languages[$i]['id'] . ']', 'soft', '50', '6','');
3) Just below that replace
$contents[] = array('text' => '
' . TEXT_MANUFACTURERS_URL . $manufacturer_inputs_string);
with
$contents[] = array('text' => '
Manufacturers Description (max 255 chars)'. $manufacturer_inputs_string);
}
4)A bit further down (line 290 ish) replace
$manufacturer_inputs_string .= '
' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . zen_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']', zen_get_manufacturer_url($mInfo->manufacturers_id, $languages[$i]['id']), zen_set_field_length(TABLE_MANUFACTURERS_INFO, 'manufacturers_url'));
with
$manufacturer_inputs_string .= '
' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . zen_draw_textarea_field('manufacturers_url[' . $languages[$i]['id'] . ']', 'soft', '50', '6', zen_get_manufacturer_url($mInfo->manufacturers_id, $languages[$i]['id']));
}
5) And just below that replace
$contents[] = array('text' => '
' . TEXT_MANUFACTURERS_URL . $manufacturer_inputs_string);
with this
$contents[] = array('text' => '
Manufacturers Description (max 255 chars)'. $manufacturer_inputs_string);
There you have it a simple way of creating a Manufacturer's Landing Page in Zen Cart!
See it in action here:
Billabong Landing Page on SurfsideOnline
Comments, suggestions, improvements always welcome though!