PHP开发实例大全(提高卷) 中文完整pdf扫描版[244MB]
Zencart更改搜索页面商品排列方式
\includes\modules\pages\advanced_search_result\header_php.php
if(isset($_GET['layout'])){
if(in_array($_GET['layout'],array("rows",'columns'))){
$parameter=$_GET['layout'];
}else{
$parameter= "columns";
}
}else{
if(isset($_COOKIE['layout_style'])){
if(in_array($_COOKIE['layout_style'],array("rows",'columns'))){
$parameter=$_COOKIE['layout_style'];
}else{
$parameter= "columns";
}
}else{
$parameter = PRODUCT_LISTING_LAYOUT_STYLE;
}
}
setcookie('layout_style',$parameter,time()+3600*2400);
\includes\templates\ezppt\templates\tpl_modules_product_listing.php
<?php
}
$style = $parameter;
if($current_page=='advanced_search_result'){
$uu = 'inc_subcat='.$_GET['inc_subcat'].'&search_in_description='.$_GET['search_in_description'].'&keyword='.$_GET['keyword'].'&';
}else{
$uu='';
}
?>
<a href="<?php echo zen_href_link($current_page,$uu."cPath=".implode("_",$cPath_array)."&layout=rows");?>" <?php echo ($style=="rows"?"class='layout_current'":"");?> id="layout_rows">rows</a>
<a href="<?php echo zen_href_link($current_page,$uu."cPath=".implode("_",$cPath_array)."&layout=columns");?>" <?php echo ($style=="columns"?"class='layout_current'":"");?> id="layout_columns">columns</a>
<?php if($current_page!='advanced_search_result'){?>
<a href="<?php echo zen_href_link($current_page,$uu."cPath=".implode("_",$cPath_array)."&show=all");?>" <?php echo ($style=="columns"?"class='layout_current'":"");?> id="show_all">All</a>
<a href="<?php echo zen_href_link($current_page,$uu."cPath=".implode("_",$cPath_array)."&show=wholesale");?>" <?php echo ($style=="columns"?"class='layout_current'":"");?> id="show_wholesale">Wholesale Only</a>
<a href="<?php echo zen_href_link($current_page,$uu."cPath=".implode("_",$cPath_array)."&show=freeshipping");?>" <?php echo ($style=="columns"?"class='layout_current'":"");?> id="show_wholesale">Free Shipping</a>
<?php }?>
\includes\modules\ezppt\product_listing.php
此页面为商品列表显示,不用改。
转载请注明:谷谷点程序 » Zencart更改搜索页面商品排列方式