在商品详细页,随机显示一定数量的同类产品 有利于SEO
1, 创建一个新文件 随意命名 没重复就行
复制该文件到includestemplates你的模板templates目录下
打开该文件,把以下代码复制进去并保存
<div id=”similar_product”>
<h2>Related Products</h2>
<ul>
<?php
$products_id = (int)$_GET['products_id'];
$flash_page_id_con = array();
$flash_page_images_con = array();
$flash_page_price_con = array();
$flash_page_name_con = array();
$flash_page_query = “select p.products_id,p.products_image,pd.products_name from ” . TABLE_PRODUCTS .” p, “. TABLE_PRODUCTS_DESCRIPTION . ” pd where p.`products_id`=pd.`products_id` AND pd.`language_id` = ‘” . (int)$_SESSION['languages_id'] . “‘ AND p.`master_categories_id` = ” . zen_get_products_category_id($products_id) . ” ORDER BY rand() limit 12″;
$flash_page = $db->Execute($flash_page_query);
while(!$flash_page->EOF){
$flash_page_items[] = $flash_page->fields;
$flash_page_id_con[] = $flash_page->fields['products_id'];
$flash_page_images_src = is_int(strpos($flash_page->fields['products_image'],’,'))? substr($flash_page->fields['products_image'],0,strpos($flash_page->fields['products_image'],’,')):$flash_page->fields['products_image'];
$flash_page_images_con[] = ‘”‘.(zen_not_null($flash_page->fields['products_image']) ? $flash_page_images_src : PRODUCTS_IMAGE_NO_IMAGE ).’”‘;
$flash_page_price_con[] = ‘”‘.$currencies->display_price(zen_get_products_base_price($flash_page->fields['products_id']),zen_get_tax_rate($product_check->fields['products_tax_class_id'])).’”‘;
$flash_page_name_con[] = ‘”‘.zen_output_string(zen_get_products_name($flash_page->fields['products_id'])).’”‘;
$flash_page->MoveNext();
}
$flash_page_id = implode(“,”, $flash_page_id_con);
$flash_page_images = implode(“,”, $flash_page_images_con);
$flash_page_price = implode(“,”, $flash_page_price_con);
$flash_page_name = implode(“,”, $flash_page_name_con);
$flash_page_display_num = $flash_page->RecordCount();
?>
<?php for($i = 0; $i< $flash_page_display_num ; $i++){?>
<li id=”li<?php echo $i;?>” style=”display:block;float:left;padding-left:10px;width:22%;”>
<a href=”<?php echo zen_href_link(zen_get_info_page($flash_page_items[$i]['products_id']), ‘products_id=’ . $flash_page_items[$i]['products_id']);?>”><?php echo zen_image(DIR_WS_IMAGES . $flash_page_items[$i]['products_image'], $flash_page_items[$i]['products_name'], IMAGE_FEATURED_PRODUCTS_LISTING_WIDTH, IMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT); ?></a><p style=”text-align:center;”><a href=”<?php echo zen_href_link(zen_get_info_page($flash_page_items[$i]['products_id']), ‘products_id=’ . $flash_page_items[$i]['products_id']);?>”><?php echo $flash_page_items[$i]['products_name']; ?></a><br /><strong id=”cell_price<?php echo $i?>” class=”red”><?php echo $currencies->display_price((zen_get_products_base_price($flash_page_items[$i]['products_id']) == 0 ? zen_get_products_sample_price($flash_page_items[$i]['products_id']): zen_get_products_base_price($flash_page_items[$i]['products_id'])),zen_get_tax_rate($product_check->fields['products_tax_class_id'])); ?></strong></p>
</li>
<?php
//print_r($flash_page_items[$i]);
}
?>
</ul>
</div>
2,找到includestemplates你的模板templatestpl_product_info_display.php文件
在相应的位置加上以下代码:
<?php require($template->get_template_dir(‘你创建的文件tpl_product_info_similar.php’,DIR_WS_TEMPLATE, $current_page_base,’templates’). ‘/你创建的文件tpl_product_info_similar.php’); ?>
一 般可以加到<?php require($template->get_template_dir(‘tpl_modules_also_purchased_products.php’, DIR_WS_TEMPLATE, $current_page_base,’templates’). ‘/’ . ‘tpl_modules_also_purchased_products.php’);?>的上面或下面
Popularity: 61% [?]
ligtinthebox模板 当产品有批量优惠的属性的时候,计价不正确的问题
找到includes\templates\lightinthebox\templates\ tpl_modules_products_quantity_discounts.php
大概50行
修改为
<?php
$pppp_i = $pppp_i+1;
$newquanticount=explode(“-”,$quantityDiscount['show_qty']);
if(preg_match(“/[^d-., ]/”,$newquanticount[0]))
{
$newquanticount=explode(“+”,$newquanticount[0]);
}
$ajax_prices = trim(eregi_replace(“[^0-9.]“,”",$currencies->display_price($quantityDiscount['discounted_price'], zen_get_tax_rate($products_tax_class_id))));
?>
<script type=”text/javascript”>
discount[<?php echo $pppp_i;?>] = “<?php echo $newquanticount[0];?>-<?php echo $ajax_prices; ?>-<?php echo zen_get_product_is_always_free_shipping((int)$_GET['products_id'])?1:0;?>-0″;
</script>
<tr>
<td align=”center” style=”border: 1px solid #ddd;”><?php echo $quantityDiscount['show_qty'];?> </td>
<td style=”border: 1px solid #ddd;”>
<?php
echo $currencies->display_price($quantityDiscount['discounted_price'], zen_get_tax_rate($products_tax_class_id));
?>
</td>
</tr>
<?php
$disc_cnt++;
if ($discount_col_cnt == $disc_cnt && !($key == sizeof($quantityDiscount))) {
$disc_cnt=0;
?>
<?php
}
}
?>
这样就会自动按批量优惠的价格计费
Popularity: 8% [?]
ZEN CART修改头部搜索为只搜索商品名
找到 includes\templates\template_default\sideboxes\tpl_search_header.php
或者includes\templates你的模板sideboxes\tpl_search_header.php
修改 zen_draw_hidden_field(‘search_in_description’, ’1′)
为zen_draw_hidden_field(‘search_in_description’, ’0′)
Popularity: 34% [?]
zencart把边框上的品牌表单选择改为品牌的图像
找到 includesmodulessideboxesmanufacturers.php 复制到 includesmodulessideboxes你的模板manufacturers.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”;
}
改为
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”;
}
找到以下代码删除
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);
}
找到 includestemplatestemplate_defaultsideboxestpl_manufacturers_select.php
把includestemplatestemplate_defaultsideboxes tpl_manufacturers_select.php 复制到includestemplates你的模板sideboxestpl_manufacturers_select.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 .= ‘</form>’;
改为
$manufacturers_count = count($manufacturer_sidebox_array);
if($manufacturers_count>0) {
for($gk=0;$gk<$manufacturers_count;$gk++) {
$content .= ‘<a href=”index.php?main_page=index&manufacturers_id=’.$manufacturer_sidebox_array[$gk]['id'].’”><img src=”‘.DIR_WS_IMAGES.$manufacturer_sidebox_array[$gk]['image'].’” title=”‘.$manufacturer_sidebox_array[$gk]['name'].’” alt=”‘.$manufacturer_sidebox_array[$gk]['name'].’” border=”0″></a>’.”n”;
}
}
OK搞定 可以显示品牌的图片和链接了
Popularity: 52% [?]
zen cart 简单加友情链接的方法
首先在以下目录下建个文件define_bottom_links.php
includeslanguagesenglishhtml_includes你的模板define_bottom_links.php (英文)
includeslanguagesschinesehtml_includes你的模板define_bottom_links.php (中文)
再找到includestemplates你的模板commontpl_footer.php
<div style=”text-align: center; border: 1px solid rgb(13, 13, 13);”>
<?php
require(DIR_WS_LANGUAGES . $_SESSION['language'] . ‘/html_includes/define_bottom_link.php’);
?>
</div>
修改的话 就可以进后台修改了
进后台 tools (工具) EZ-Pages 简易页面
选择define_bottom_link.php 就可以随便怎么修改了
Popularity: 40% [?]
NS0-154 Data ONTAP 8.0 7-MODE Administrator
1. We offer free update service for one year.
After you purchase NS0-154 practice exam, we will offer free update for ONE Year!
2. Guarantee to Pass Your NACP exam and get your NACP Certification.
Takeitexam Practice Exams for NS0-154 are Verified Answers Researched by Industry Experts and almost 100% correct.
If you do not pass the NS0-154 Data ONTAP 8.0 7-MODE Administrator on your first attempt using our takeitexam testing matrial, we will give you a FULL REFUND of your purchasing fee or give you free another exam matrial.
3.takeitexam NACP NS0-154 Exam
Comprehensive questions with complete details
-Questions accompanied by exhibits
-Verified Answers Researched by Industry Experts
-Drag and Drop questions as experienced in the Actual Exams
-Questions updated on regular basis
-These questions and answers are backed by our GUARANTEE
-Like actual certification exams our product is in multiple-choice questions (MCQs)
High quality and Valued for the NS0-154 Exam: 100% Guarantee to Pass Your exam and get your NACP Certification. Come to http://www.takeitexam.com The easiest and quickest way to get your NACP Certification.
Commitment to Your Success:
At takeitexam.com we are committed to you ongoing success. Our exams and questions are constantly being updated and compared to industry standards.
Related Exams
- NS0-502 NetApp Certified Implementation Engineer
- NS0-153 Network Appliance Storage Networking
- NS0-154 Data ONTAP 8.0 7-MODE Administrator
- NS0-501 Network Appliance Implementation Engineer-SAN
- NS0-510 NCIE-Backup & Recovery Implementation Engineer Exam
- NS0-163 Network Appliance Data Protection Solutions
- NS0-210 Network Appliance FAS900 Pre-Sales Engineer Exam
- NS0-910 Network Appliance NetCache Internet Access and Security Exam
Popularity: 2% [?]
ns0-163 Network Appliance Data Protection Solutions
1. We offer free update service for one year.
After you purchase NS0-163 practice exam, we will offer free update for ONE Year!
2. Guarantee to Pass Your NACP exam and get your NACP Certification.
Takeitexam Practice Exams for NS0-163 are Verified Answers Researched by Industry Experts and almost 100% correct.
If you do not pass the NS0-163 Network Appliance Data Protection Solutions on your first attempt using our takeitexam testing matrial, we will give you a FULL REFUND of your purchasing fee or give you free another exam matrial.
3.takeitexam NACP NS0-163 Exam
Comprehensive questions with complete details
-Questions accompanied by exhibits
-Verified Answers Researched by Industry Experts
-Drag and Drop questions as experienced in the Actual Exams
-Questions updated on regular basis
-These questions and answers are backed by our GUARANTEE
-Like actual certification exams our product is in multiple-choice questions (MCQs)
High quality and Valued for the NS0-163 Exam: 100% Guarantee to Pass Your exam and get your NACP Certification. Come to http://www.takeitexam.com The easiest and quickest way to get your NACP Certification.
Commitment to Your Success:
At takeitexam.com we are committed to you ongoing success. Our exams and questions are constantly being updated and compared to industry standards.
Related Exams
- NS0-210 Network Appliance FAS900 Pre-Sales Engineer Exam
- NS0-510 NCIE-Backup & Recovery Implementation Engineer Exam
- NS0-163 Network Appliance Data Protection Solutions
- NS0-153 Network Appliance Storage Networking
- NS0-154 Data ONTAP 8.0 7-MODE Administrator
- NS0-501 Network Appliance Implementation Engineer-SAN
- NS0-910 Network Appliance NetCache Internet Access and Security Exam
- NS0-502 NetApp Certified Implementation Engineer
Popularity: 35% [?]
NS0-102 NetApp(ASAP) Accredited Storage Architect Professional
1. We offer free update service for one year.
After you purchase NS0-102 practice exam, we will offer free update for ONE Year!
2. Guarantee to Pass Your NACA exam and get your NACA Certification.
Takeitexam Practice Exams for NS0-102 are Verified Answers Researched by Industry Experts and almost 100% correct.
If you do not pass the NS0-102 NetApp(ASAP) Accredited Storage Architect Professional on your first attempt using our takeitexam testing matrial, we will give you a FULL REFUND of your purchasing fee or give you free another exam matrial.
3.takeitexam NACA NS0-102 Exam
Comprehensive questions with complete details
-Questions accompanied by exhibits
-Verified Answers Researched by Industry Experts
-Drag and Drop questions as experienced in the Actual Exams
-Questions updated on regular basis
-These questions and answers are backed by our GUARANTEE
-Like actual certification exams our product is in multiple-choice questions (MCQs)
High quality and Valued for the NS0-102 Exam: 100% Guarantee to Pass Your exam and get your NACA Certification. Come to http://www.takeitexam.com The easiest and quickest way to get your NACA Certification.
Commitment to Your Success:
At takeitexam.com we are committed to you ongoing success. Our exams and questions are constantly being updated and compared to industry standards.
Related Exams
Popularity: 26% [?]
NS0-501 Network Appliance Implementation Engineer-SAN
1. We offer free update service for one year.
After you purchase NS0-501 practice exam, we will offer free update for ONE Year!
2. Guarantee to Pass Your NACP exam and get your NACP Certification.
Takeitexam Practice Exams for NS0-501 are Verified Answers Researched by Industry Experts and almost 100% correct.
If you do not pass the NS0-501 Network Appliance Implementation Engineer-SAN on your first attempt using our takeitexam testing matrial, we will give you a FULL REFUND of your purchasing fee or give you free another exam matrial.
3.takeitexam NACP NS0-501 Exam
Comprehensive questions with complete details
-Questions accompanied by exhibits
-Verified Answers Researched by Industry Experts
-Drag and Drop questions as experienced in the Actual Exams
-Questions updated on regular basis
-These questions and answers are backed by our GUARANTEE
-Like actual certification exams our product is in multiple-choice questions (MCQs)
High quality and Valued for the NS0-501 Exam: 100% Guarantee to Pass Your exam and get your NACP Certification. Come to http://www.takeitexam.com The easiest and quickest way to get your NACP Certification.
Commitment to Your Success:
At takeitexam.com we are committed to you ongoing success. Our exams and questions are constantly being updated and compared to industry standards.
Related Exams
- NS0-153 Network Appliance Storage Networking
- NS0-163 Network Appliance Data Protection Solutions
- NS0-510 NCIE-Backup & Recovery Implementation Engineer Exam
- NS0-154 Data ONTAP 8.0 7-MODE Administrator
- NS0-910 Network Appliance NetCache Internet Access and Security Exam
- NS0-501 Network Appliance Implementation Engineer-SAN
- NS0-502 NetApp Certified Implementation Engineer
- NS0-210 Network Appliance FAS900 Pre-Sales Engineer Exam
Popularity: 2% [?]
NS0-201 Network Appliance FAS900 Pre-Sales Engineer Exam
1. We offer free update service for one year.
After you purchase NS0-201 practice exam, we will offer free update for ONE Year!
2. Guarantee to Pass Your Network Appliance Certifications exam and get your Network Appliance Certifications Certification.
Takeitexam Practice Exams for NS0-201 are Verified Answers Researched by Industry Experts and almost 100% correct.
If you do not pass the NS0-201 Network Appliance FAS900 Pre-Sales Engineer Exam on your first attempt using our takeitexam testing matrial, we will give you a FULL REFUND of your purchasing fee or give you free another exam matrial.
3.takeitexam Network Appliance Certifications NS0-201 Exam
Comprehensive questions with complete details
-Questions accompanied by exhibits
-Verified Answers Researched by Industry Experts
-Drag and Drop questions as experienced in the Actual Exams
-Questions updated on regular basis
-These questions and answers are backed by our GUARANTEE
-Like actual certification exams our product is in multiple-choice questions (MCQs)
High quality and Valued for the NS0-201 Exam: 100% Guarantee to Pass Your exam and get your Network Appliance Certifications Certification. Come to http://www.takeitexam.com The easiest and quickest way to get your Network Appliance Certifications Certification.
Commitment to Your Success:
At takeitexam.com we are committed to you ongoing success. Our exams and questions are constantly being updated and compared to industry standards.
Related Exams
Popularity: 35% [?]







