Re: Show random products from a category
You can extend your widget from \XLite\View\ItemsList\Product\Customer\Category\AC ategory class - this will allow you to show products from a particular category.
But the random order is not that easy. Yes, you can use "ORDER BY RAND()" by returning "RAND()" as the "order by" parameter in getSortByModeDefault() method. But MySQL is too slow when doing this on more than 100 products. So, you will have to implement some tricks to speed up random queries.
|