diff --git a/controllers/front/BestSalesController.php b/controllers/front/BestSalesController.php index f21146e04..1d1772905 100644 --- a/controllers/front/BestSalesController.php +++ b/controllers/front/BestSalesController.php @@ -36,8 +36,11 @@ class BestSalesControllerCore extends FrontController $nbProducts = (int)ProductSale::getNbSales(); $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( - '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'), 'nbProducts' => $nbProducts, 'homeSize' => Image::getSize(ImageType::getFormatedName('home')), diff --git a/controllers/front/NewProductsController.php b/controllers/front/NewProductsController.php index a438c4826..21905712a 100644 --- a/controllers/front/NewProductsController.php +++ b/controllers/front/NewProductsController.php @@ -63,8 +63,11 @@ class NewProductsControllerCore extends FrontController $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( - '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'), 'nbProducts' => (int)($nbProducts), 'homeSize' => Image::getSize(ImageType::getFormatedName('home')), diff --git a/controllers/front/PricesDropController.php b/controllers/front/PricesDropController.php index d28715790..2b3493eae 100644 --- a/controllers/front/PricesDropController.php +++ b/controllers/front/PricesDropController.php @@ -49,8 +49,11 @@ class PricesDropControllerCore extends FrontController $nbProducts = Product::getPricesDrop($this->context->language->id, null, null, true); $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( - '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'), 'nbProducts' => $nbProducts, 'homeSize' => Image::getSize(ImageType::getFormatedName('home')),