-1
producttabslider 모듈에 나타나는 제품을 임의로 선택하고 싶습니다.SlideTabProduct prestashop
public function hookblockPosition3($params) {
$nb = Configuration::get($this->name . '_p_limit');
$newProducts = Product::getNewProducts((int) Context::getContext()->language->id, 0, ($nb ? $nb : 5));
$specialProducts = Product::getPricesDrop((int) Context::getContext()->language->id, 0, ($nb ? $nb : 5),false,'date_add', 'DESC');
shuffle($specialProducts);
ProductSale::fillProductSales();
$bestseller = $this->getBestSales ((int) Context::getContext()->language->id, 0, ($nb ? $nb : 5), null, null);
shuffle($bestseller);
$category = new Category(Context::getContext()->shop->getCategory(), (int) Context::getContext()->language->id);
shuffle($category);
$featureProduct = $category->getProducts((int) Context::getContext()->language->id, 0, ($nb ? $nb : 5),'date_add', 'DESC');
나는 shuffle(); 그러나 전체 카탈로그가 아닌 최신 제품 만 무작위로 추가합니다. 누가 나를 도와 줍니까?
난 당신이 나에게 말한했지만 작동하지 않습니다. "Saldo"및 "I salu"탭에서 볼 수 있습니다 - "specialto"제품 - "베스트셀러"-> 베스트셀러 http://www.sexyshopwebstore.it/new_site/ – user2077311