32 lines
855 B
PHP
Executable File
32 lines
855 B
PHP
Executable File
<?php
|
|
class ProductController extends ProductControllerCore {
|
|
public function preProcess() {
|
|
parent::preProcess();
|
|
|
|
if(Module::isInstalled('privatesales')) {
|
|
$id_category = $this->product->id_category_default;
|
|
$sale = Sale::getSaleFromCategory($id_category);
|
|
|
|
self::$smarty->assign(array(
|
|
'sale' => $sale,
|
|
'HOOK_PRIVATESALES_PRODUCT' => Module::hookExec('privatesales_product', array('sale' => $sale)),
|
|
'is_sale_home' => ($sale? $sale->id_category == $id_category: FALSE),
|
|
));
|
|
}
|
|
|
|
$bestSaleCart = Module::hookExec('bestSaleCart');
|
|
self::$smarty->assign(array(
|
|
'bestSaleCart' => $bestSaleCart,
|
|
'product' => $this->product,
|
|
'coverImage' => Product::getCover($this->product->id),
|
|
));
|
|
}
|
|
|
|
public function setMedia() {
|
|
parent::setMedia();
|
|
|
|
global $css_files;
|
|
$css_files = array_slice($css_files, 0, 1);
|
|
}
|
|
}
|