zencart把边框上的品牌表单改为品牌的图像

1,919 人次阅读
没有评论

共计 2415 个字符,预计需要花费 7 分钟才能阅读完成。

zencart把边框上的品牌表单改为品牌的图像

找到 includesmodulessideboxesmanufacturers.php
复制到 includesmodulessideboxes你的模板manufacturers.php

把如下代码
[php]
if (PRODUCTS_MANUFACTURERS_STATUS == ’1′) {
$manufacturer_sidebox_query = “select distinct m.manufacturers_id, m.manufacturers_name
from ” . TABLE_MANUFACTURERS . ” m
left join ” . TABLE_PRODUCTS . ” p on m.manufacturers_id = p.manufacturers_id
where m.manufacturers_id = p.manufacturers_id and p.products_status= 1
order by manufacturers_name”;
} else {
$manufacturer_sidebox_query = “select m.manufacturers_id, m.manufacturers_name
from ” . TABLE_MANUFACTURERS . ” m
order by manufacturers_name”;
}
[/php]
改为
[php]
if (PRODUCTS_MANUFACTURERS_STATUS == ’1′) {
$manufacturer_sidebox_query = “select distinct m.manufacturers_id, m.manufacturers_name, m.manufacturers_image
from ” . TABLE_MANUFACTURERS . ” m
left join ” . TABLE_PRODUCTS . ” p on m.manufacturers_id = p.manufacturers_id
where m.manufacturers_id = p.manufacturers_id and p.products_status= 1
order by manufacturers_name”;
} else {
$manufacturer_sidebox_query = “select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image
from ” . TABLE_MANUFACTURERS . ” m
order by manufacturers_name”;
}
[/php]
找到以下代码删除
[php]
if (!isset($_GET[‘manufacturers_id’]) || $_GET[‘manufacturers_id’] == ” ) {
$manufacturer_sidebox_array[] = array(‘id’ => ”, ‘text’ => PULL_DOWN_ALL);
} else {
$manufacturer_sidebox_array[] = array(‘id’ => ”, ‘text’ => PULL_DOWN_MANUFACTURERS);
}
[/php]
找到 includestemplatestemplate_defaultsideboxestpl_manufacturers_select.php

把includestemplatestemplate_defaultsideboxes tpl_manufacturers_select.php 复制到includestemplates你的模板sideboxestpl_manufacturers_select.php (作用:使用替换机制)

找到
[php]
$content.= zen_draw_form(‘manufacturers_form’, zen_href_link(FILENAME_DEFAULT, ”, ‘NONSSL’, false), ‘get’);
$content .= zen_draw_hidden_field(‘main_page’, FILENAME_DEFAULT);
$content .= zen_draw_pull_down_menu(‘manufacturers_id’, $manufacturer_sidebox_array, (isset($_GET[‘manufacturers_id’]) ? $_GET[‘manufacturers_id’] : ”), ‘onchange=”this.form.submit();” size=”‘ . MAX_MANUFACTURERS_LIST . ‘” style=”width: 90%; margin: auto;”‘) . zen_hide_session_id();
$content .= ‘

’;[/php]
改为
[php]
$manufacturers_count = count($manufacturer_sidebox_array);
if($manufacturers_count>0) {
for($gk=0;$gk $content .= ‘<a href="”index.php?main_page=index&amp;manufacturers_id=’.$manufacturer_sidebox_array[$gk][‘id’].’”"><img title="”‘.$manufacturer_sidebox_array[$gk][‘name’].’”" src="”‘.DIR_WS_IMAGES.$manufacturer_sidebox_array[$gk][‘image’].’”" alt="”‘.$manufacturer_sidebox_array[$gk][‘name’].’”" border="”0″" /></a>’.”n”;
}
}[/php]

正文完
 0