42 lines
1.0 KiB
PHP
42 lines
1.0 KiB
PHP
|
<?php
|
||
|
class AntadisSimulatorDisplayProductBlocController
|
||
|
{
|
||
|
/**
|
||
|
* @var ModuleAdminController
|
||
|
*/
|
||
|
protected $module;
|
||
|
|
||
|
/**
|
||
|
* @var Context
|
||
|
*/
|
||
|
protected $context;
|
||
|
|
||
|
public function __construct($module, $file, $path)
|
||
|
{
|
||
|
$this->file = $file;
|
||
|
$this->module = $module;
|
||
|
$this->context = Context::getContext();
|
||
|
$this->_path = $path;
|
||
|
}
|
||
|
|
||
|
public function run()
|
||
|
{
|
||
|
$id_product = (int)Tools::getValue('id_product');
|
||
|
|
||
|
$themeName = 'ivoire';
|
||
|
$themeImagePath = _PS_BASE_URL_.'/themes/simulation/doublecube/';
|
||
|
|
||
|
$this->context->smarty->assign(array(
|
||
|
'themeName' => $themeName,
|
||
|
'themeImagePath' => $themeImagePath,
|
||
|
));
|
||
|
|
||
|
/**
|
||
|
* Suivant le simulateur choisi alors on va chercher les assets
|
||
|
*/
|
||
|
return $this->module->display($this->file, 'productbloc/doublecube.tpl');
|
||
|
|
||
|
// Fallback
|
||
|
return $this->module->display($this->file, 'displayProductBloc.tpl');
|
||
|
}
|
||
|
}
|