Zen Follower
- Join Date:
- Sep 2005
- Location:
- Hong Kong
- Posts:
- 301
- Plugin Contributions:
- 0
Post #1 by shirster
Hello everyone,
I installed the "Sidebox for list Manufacturers logos" addon on one of my 1.3.8a stores. Besides some typos and wrong instruction in the readme file everything works fine. The only problem is that the logos appear in a random order. I would like them to display by alphabetic order instead. Since it's only a few lines of codes I'm hoping it would be an easy task? :)
Thank you in advance ! :)
Link to the addon : http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_52&products_id=941
<?php
/**
* Side Box Template
*
* @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: modification of tpl_manufacturers_select.php 4771 2006-10-17 05:32:42Z ajeh $
* @modify by Alejandro Hurtado <ahurt2000######################>
*/
if (!defined(BOX_HEADING_MANUFACTURERS_IMG)) define(BOX_HEADING_MANUFACTURERS_IMG,'Manufacturers'); // define sidebox header
if (!defined(BOX_MANUFACTURER_HOMEPAGE_IMG)) define(BOX_MANUFACTURER_HOMEPAGE_IMG,'web'); // define link to manufacturers URL
$title = '<label>' . BOX_HEADING_MANUFACTURERS_IMG . '</label>';
$title_link = false;
$content = "";
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
while (!$manufacturer_sidebox_img -> EOF){
$content.='<div >';
$content.='<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer_sidebox_img->fields['manufacturers_id']) . '">';
$content.=zen_image(DIR_WS_IMAGES . $manufacturer_sidebox_img->fields['manufacturers_image'], $manufacturer_sidebox_img->fields['manufacturers_name']);
$content.= '</a></div>';
if (zen_not_null($manufacturer_sidebox_img->fields['manufacturers_url']))
$content.='<a href="' . zen_href_link(FILENAME_REDIRECT, 'action=manufacturer&manufacturers_id=' . $manufacturer_sidebox_img->fields['manufacturers_id']) . '" target="_blank">' . sprintf(BOX_MANUFACTURER_HOMEPAGE_IMG, $manufacturer_sidebox_img->fields['manufacturers_name']) . '</a>';
$manufacturer_sidebox_img->MoveNext();
}
$content .= '</div>';
?>