Random products in Intro/Product Slideshow

ThemeBurn SupportForumsOpenCart ThemesShoppica 2 OpenCart ThemeRandom products in Intro/Product Slideshow

This topic has been marked as resolved.

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

November 6, 2013 at 5:15 pm #28720

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

November 18, 2013 at 9:51 am #28942

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

November 18, 2013 at 4:06 pm #28973

Can you attach your tb_themes/shoppica2/catalog/model/defaultModel.php file ?

November 21, 2013 at 4:15 pm #29057
November 21, 2013 at 5:08 pm #29059

You need to use a zip archive :)

BR,
ThemeBurn team

November 22, 2013 at 5:38 pm #29092

That’s odd, I did submit a .zip – I’ll try reposting…

November 22, 2013 at 5:47 pm #29096

Okay, our bad. We fixed the instruction above to randomize the products properly.

Regards,
ThemeBurn team

November 26, 2013 at 10:37 am #29174

I’ve updated the line of code as shown above, tested & confirmed it does properly shuffle items now – thanks! :)

November 26, 2013 at 5:46 pm #29184

Glad we’ve helped :)

BR,
ThemeBurn team

November 29, 2013 at 5:02 pm #29200
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.