Hello,
I know it was mentioned in a previous topic, but I’m posting a request to see this feature added. I am sure I’m not the only one looking for this sort of feature; is this still being researched, or could it be researched? I’m not sure where the file/reference point is that calls the products, but from what I’ve read, there is a “shuffle” function which might work? Here’s the info I had read: http://www.opencart60s.com/opencart/show-random-products-in-category-34005.html
|
|
You could try to open tb_themes/shoppica2/catalog/model/defaultModel.php and replace $data['products'] = $products;
with
shuffle($products); $data['products'] = $products;
Regards,
ThemeBurn team
|
|
I tried changing the code as indicated, and get error messages as follows (see attachment screenshot)
Warning: Invalid Argument supplied for foreach() in /home/content/16/11851016/html/store/catalog/view/theme/shoppica2/template/tb/intro/products.tpl on line 5
Warning: Invalid argument supplied for foreach() in /home/content/16/11851016/html/store on line 34
|
|
Can you attach your tb_themes/shoppica2/catalog/model/defaultModel.php file ?
|
|
|
|
You need to use a zip archive
BR,
ThemeBurn team
|
|
That’s odd, I did submit a .zip – I’ll try reposting…
|
|
Okay, our bad. We fixed the instruction above to randomize the products properly.
Regards,
ThemeBurn team
|
|
I’ve updated the line of code as shown above, tested & confirmed it does properly shuffle items now – thanks!
|
|
Glad we’ve helped
BR,
ThemeBurn team
|
|