khoking Posted January 8, 2015 Share Posted January 8, 2015 Hi, I noticed that there is "Product_Viewed" table under "Product Descriptions". I think this shows the popularity of a product. The current Advanced Search Result is sorted by name, which is not suitable for store with thousands of products (many accessories are shown first instead of the actual product). Eg. When someone searched Xbox, those brand with A, B, C name will come up first instead of the real Microsoft XBOX console. I hope to be able to sort the Advanced Search Result by using Product_Viewed from Product_descriptions table. Is it possible? Best regards, Koh Kho King Link to comment Share on other sites More sharing options...
♥toyicebear Posted January 8, 2015 Share Posted January 8, 2015 In advanced_search_result.php change: $order_str = " order by pd.products_name"; to $order_str = " order by pd.products_viewed"; Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
MrPhil Posted January 8, 2015 Share Posted January 8, 2015 Be aware that changing the sort order by view count may not have always desirable results. Customers will see only better-known products, and may overlook lesser-known products. As you may well face more competition selling better-known products, this might result in lower overall sales. Keep an eye out for such problems. Link to comment Share on other sites More sharing options...
khoking Posted January 9, 2015 Author Share Posted January 9, 2015 Thank you toyicebear!!! :thumbsup: Thanks MrPhil for the advice too! I will keep monitoring the conversation. :thumbsup: Best regards, Koh Kho King Link to comment Share on other sites More sharing options...
khoking Posted February 2, 2015 Author Share Posted February 2, 2015 Sorry to ask again. How do I change the sort order of products_viewed in descending or ascending order? The current default sort results seems to be putting the highest viewed to the bottom. Best regards, Koh Kho King Link to comment Share on other sites More sharing options...
MrPhil Posted February 3, 2015 Share Posted February 3, 2015 Sorting is by default ASCending order. Add the DESC keyword to the "order by" phrase to sort in descending order. Link to comment Share on other sites More sharing options...
khoking Posted February 4, 2015 Author Share Posted February 4, 2015 Thank you MrPhil! Best regards, Koh Kho King Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.