Works on product canvas and templates
!! WARNING : not stable !!
This commit is contained in:
parent
2ff8f376f3
commit
5ad77d4f31
@ -80,6 +80,9 @@ class ProductService extends Product
|
|||||||
|
|
||||||
parent::assign_values($action);
|
parent::assign_values($action);
|
||||||
|
|
||||||
|
// Duration
|
||||||
|
$this->tpl['duration_value'] = $this->duration_value;
|
||||||
|
|
||||||
if ($action == 'create')
|
if ($action == 'create')
|
||||||
{
|
{
|
||||||
// Title
|
// Title
|
||||||
|
|||||||
@ -220,10 +220,10 @@ if ($_POST["action"] == 'update' && ($user->rights->produit->creer || $user->rig
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!empty($_POST["canvas"]) && file_exists('canvas/'.$product->canvas.'/product.'.$product->canvas.'.class.php'))
|
if (!empty($_POST["canvas"]) && file_exists('canvas/'.$_POST["canvas"].'/product.'.$_POST["canvas"].'.class.php'))
|
||||||
{
|
{
|
||||||
$classname = 'Product'.ucfirst($product->canvas);
|
$classname = 'Product'.ucfirst($_POST["canvas"]);
|
||||||
include_once('canvas/'.$product->canvas.'/product.'.$product->canvas.'.class.php');
|
include_once('canvas/'.$_POST["canvas"].'/product.'.$_POST["canvas"].'.class.php');
|
||||||
$product = new $classname($db);
|
$product = new $classname($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user