Jump to content

[已解决]如何让首页的Featured products物品随机变换呢?


Recommended Posts

  • 2 weeks later...

如果版本是1.3.x,修改modules/homefeatured/homefeatured.php里的第72行

$products = $category->getProducts(intval($params['cookie']->id_lang), 1, ($nb ? $nb : 10));



$products = $category->getProducts(intval($params['cookie']->id_lang), 1, ($nb ? $nb : 10), NULL, NULL, false, true, true, 8); 



还没测试1.4的。

Share this post


Link to post
Share on other sites
如果版本是1.3.x,修改modules/homefeatured/homefeatured.php里的第72行
$products = $category->getProducts(intval($params['cookie']->id_lang), 1, ($nb ? $nb : 10));



$products = $category->getProducts(intval($params['cookie']->id_lang), 1, ($nb ? $nb : 10), NULL, NULL, false, true, true, 8); 



还没测试1.4的。



很牛的代码!刚测试了,可以实现。不过在1.4里面是第98行
谢谢!

Share this post


Link to post
Share on other sites
楼上实现,但是有个缺点不能控制多长时间更新随机一次

我已经实现,联系


请问你说的是它自动随机更新?
不刷新的情况下?
如何实现的呢?
谢谢!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More