Jump to content

Archived

This topic is now archived and is closed to further replies.

khoking

IMPROVE Sort Advanced Search Result by Product Viewed

Recommended Posts

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

Share this post


Link to post
Share on other sites

In advanced_search_result.php

 

change:

 

 $order_str = " order by pd.products_name";

 

to

 

 $order_str = " order by pd.products_viewed";

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Thank you toyicebear!!! :thumbsup:

 

Thanks MrPhil for the advice too! I will keep monitoring the conversation. :thumbsup:


Best regards,

Koh Kho King

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

×