Zencart 之lightinthebox模板,产品排序修改
Posted in Zen-cart on 02/23/2010 06:33 下午 by Marts此模板默认目录列表页的排序是按products_id,现在想改为按更新时间排。
感谢Radnows,感谢Jack,感谢MTV,CCTV ^_^ 问题圆满解决!
附完整步聚:
1.默认default:的 sql改为order by p.products_date_added DESC ,原来case5改为$product_sort = ” order by p.products_ordered DESC”; {文件地址:\includes\index_filters\default_filter.php}
2.修改product_listing.php的array(‘Bestselling’,'Item Name’,'Price(Low to high)’,'Price(High to low)’,'New Arrival’); 为
$nsort = array(‘New Arrival’,'Item Name’,'Price(Low to high)’,'Price(High to low)’,'Bestselling’); {文件地址:\includes\modules\product_listing.php}
3.改代码:{文件地址:\includes\index_filters\default_filter.php}
// We show them all
$listing_sql = “select ” . $select_column_list . ” p.products_id, p.products_type,p.products_status,p.products_price,p.products_price_retail,p.products_price_sample,p.product_is_wholesale,p.product_wholesale_min,p.products_quantity, p.products_quantity_order_min, p.master_categories_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
from ” . TABLE_PRODUCTS_DESCRIPTION . ” pd, ” .
TABLE_PRODUCTS . ” p left join ” . TABLE_MANUFACTURERS . ” m on p.manufacturers_id = m.manufacturers_id, ” .
TABLE_PRODUCTS_TO_CATEGORIES . ” p2c left join ” . TABLE_SPECIALS . ” s on p2c.products_id = s.products_id
where p.products_status = 1
and p.products_id = p2c.products_id
and pd.products_id = p2c.products_id
and pd.language_id = ‘” . (int)$_SESSION['languages_id'].”‘”. $displayOrder. $priceOrder.”
and ” . $product_in_categories_sql;
}
}
————————————–>
// We show them all
if ($_GET['productsort'] ==”) {
$sort = ‘ order by p.products_date_added DESC’;
}else{
$sort = ”;
}
$listing_sql = “select ” . $select_column_list . ” p.products_id, p.products_type,p.products_status,p.products_price,p.products_price_retail,p.products_price_sample,p.product_is_wholesale,p.product_wholesale_min,p.products_quantity, p.products_quantity_order_min, p.master_categories_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
from ” . TABLE_PRODUCTS_DESCRIPTION . ” pd, ” .
TABLE_PRODUCTS . ” p left join ” . TABLE_MANUFACTURERS . ” m on p.manufacturers_id = m.manufacturers_id, ” .
TABLE_PRODUCTS_TO_CATEGORIES . ” p2c left join ” . TABLE_SPECIALS . ” s on p2c.products_id = s.products_id
where p.products_status = 1
and p.products_id = p2c.products_id
and pd.products_id = p2c.products_id
and pd.language_id = ‘” . (int)$_SESSION['languages_id'].”‘”. $displayOrder. $priceOrder.”
and ” . $product_in_categories_sql . $sort;
}
}
Incoming search terms:
- Zen Cart lightinthebox
- zencart 产品排序
- zen cart 产品按更新日期排列
- zen cart 产品排序
- lightinthebox Sorted By: new arrival
- zencart 排序功能
- ZENCART 排序
- ZenCart 产品列表排序
- zen cart 目录产品按时间排序
- lightinthebox产品评论修改
Related posts:
02/26/2010 at 8:17 上午
按你这个,改来改去都不行,有现成的文件给我替换一下吗?谢谢发到我邮箱454582823#qq.com
05/06/2010 at 6:49 下午
改好了,但打开商品详细页面后上面那些商品索引(一行可以左右移动)的顺序比较乱,那个如何改?
06/23/2010 at 6:52 上午
这个看了不是很明白,能够明白点吗?改了还是不行。
08/25/2010 at 7:06 上午
I had got a dream to begin my own business, however I did not earn enough amount of cash to do that. Thank heaven my colleague recommended to take the loan. Hence I received the short term loan and realized my desire.
08/27/2010 at 3:16 下午
You ought not to give up striving to get high grades and we can support you with that offering you to order A level coursework. With our help you your progress will be amazing. Thus, do not doubt to contact us.
08/29/2010 at 7:30 下午
I get know that it is more simple to purchase the essay thesis or buy dissertation just about this topic, than to complete by own efforts.
08/30/2010 at 9:30 上午
Following along is a beginning. Keeping together is progress. Working along is luck. Don’t ravage your existence, call to us and with you, we’ll grow a fresh crew for writing essays online
09/01/2010 at 2:10 下午
If you are willing to be assisted by experts, you should buy essays cheap and be satisfied with positive marks.
09/26/2010 at 11:08 上午
Numbers of students have never utilized custom academic papers writing corporations to buy essays at. Therefore, they opined that all custom papers writing firms supposed to be scam. Nonetheless, those statements are not close to real situations.
10/02/2010 at 2:55 下午
The hard working scholars can read your issue just about this post and purchase the dissertation form in the thesis service.
10/07/2010 at 6:29 下午
Wow, this categorically cleared some things up. One essay i am having point with is a definition for an “who we are” The teacher says that we will have to jab deep into ourselves and detect what we really are. But I think it would be more selectto use buy thesis.
10/09/2010 at 12:50 下午
To find the famous written essays service should be a right way out for high school students, who are embarrassed because of the research papers performing.