![]() |
3.5.7 Product Sort Solution
customer/products.php
old; Code:
$products = func_search_products($search_query, !empty($user_account['membership'])?$user_account['membership']:"", $first_page,$current_category["product_count"]); new: Code:
$products = func_search_products($search_query, !empty($user_account['membership'])?$user_account['membership']:"", $first_page,$current_category["product_count"],0,$orderby); old; Code:
$smarty->assign("products",$products); new Code:
$smarty->assign("orderby",$orderby); customer/home.php?cat=105&orderby=price you will see sorting products |
good little mod, how might we go about sorting by price ascending rather than the default descending?
|
please goto admin area and click to general settings
select apperance options find : List products in reversed order check/uncheck <-> asc/dsc ok? |
customer/main/sortProduct.tpl (new page, please add)
Code:
customer/main/products.tpl add new line on top or whereever you want Code:
{if $products} Little but important mod from Turkey! |
I found this in include/func.php:
Code:
# array_multisort($result_p,($orderby=="orderby" && $config["Appearance"]["product_order_reversed"]=="Y"?SORT_DESC:SORT_ASC),SORT_STRING, $productorderbys,($orderby=="orderby" && $config["Appearance"]["product_order_reversed"]=="Y"?SORT_DESC:SORT_ASC),SORT_NUMERIC,$productorderbyname,SORT_STRING); My question is, how can we add a drop down menu so the user can choose to have the product sort displayed as ascending or descending? |
:arrow: http://www.cart-lab.com/lab/customer/product.php?productid=7
Product Sort, with ascending,descending dropdowns as well as configurable field types or fields from the products database dynamically. Demo: http://www.cart-lab.com/lab/customer/search.php?substring= |
thanks for the recommendation boomer but I've already got the product sort down thanks to the mod above, the only thing I need is the Ascending/Descending bit.
nice looking site by the way =) |
mod modification?
cool mod, very handy, but when there are multiple pages (as in a list that goes beyond the users prefered quantity per page) the sorting breaks (ie, returns to alphebetical by title)
Any thoughts on how to remedy this? |
The Max Nav. pages shouldn't ever got past, I don't get what you mean exactly? :?
|
let me rephrase
Hey Boomer.
What I mean is that I sort by lets say price. There are 51 products in my category, 10 are displayed at a time. To view the next 10 you must click the small arrow or the page number. I have been working on getting these links to use the sort code from above, but have been unsuccessful so far. does that clear it up? Thanks for the quick reply!!! |
All times are GMT -8. The time now is 06:47 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.