// add colors on some controllers
This commit is contained in:
@@ -36,8 +36,11 @@ class BestSalesControllerCore extends FrontController
|
|||||||
$nbProducts = (int)ProductSale::getNbSales();
|
$nbProducts = (int)ProductSale::getNbSales();
|
||||||
$this->pagination($nbProducts);
|
$this->pagination($nbProducts);
|
||||||
|
|
||||||
|
$products = ProductSale::getBestSales($this->context->language->id, $this->p - 1, $this->n, $this->orderBy, $this->orderWay);
|
||||||
|
$this->addColorsToProductList($products);
|
||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'products' => ProductSale::getBestSales($this->context->language->id, $this->p - 1, $this->n, $this->orderBy, $this->orderWay),
|
'products' => $products,
|
||||||
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
|
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
|
||||||
'nbProducts' => $nbProducts,
|
'nbProducts' => $nbProducts,
|
||||||
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
|
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
|
||||||
|
|||||||
@@ -63,8 +63,11 @@ class NewProductsControllerCore extends FrontController
|
|||||||
|
|
||||||
$this->pagination($nbProducts);
|
$this->pagination($nbProducts);
|
||||||
|
|
||||||
|
$products = Product::getNewProducts($this->context->language->id, (int)($this->p) - 1, (int)($this->n), false, $this->orderBy, $this->orderWay);
|
||||||
|
$this->addColorsToProductList($products);
|
||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'products' => Product::getNewProducts($this->context->language->id, (int)($this->p) - 1, (int)($this->n), false, $this->orderBy, $this->orderWay),
|
'products' => $products,
|
||||||
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
|
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
|
||||||
'nbProducts' => (int)($nbProducts),
|
'nbProducts' => (int)($nbProducts),
|
||||||
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
|
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
|
||||||
|
|||||||
@@ -49,8 +49,11 @@ class PricesDropControllerCore extends FrontController
|
|||||||
$nbProducts = Product::getPricesDrop($this->context->language->id, null, null, true);
|
$nbProducts = Product::getPricesDrop($this->context->language->id, null, null, true);
|
||||||
$this->pagination($nbProducts);
|
$this->pagination($nbProducts);
|
||||||
|
|
||||||
|
$products = Product::getPricesDrop($this->context->language->id, (int)$this->p - 1, (int)$this->n, false, $this->orderBy, $this->orderWay);
|
||||||
|
$this->addColorsToProductList($products);
|
||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'products' => Product::getPricesDrop($this->context->language->id, (int)$this->p - 1, (int)$this->n, false, $this->orderBy, $this->orderWay),
|
'products' => $products,
|
||||||
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
|
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
|
||||||
'nbProducts' => $nbProducts,
|
'nbProducts' => $nbProducts,
|
||||||
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
|
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
|
||||||
|
|||||||
Reference in New Issue
Block a user