mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Works on product canvas and templates
!! WARNING : not stable !!
This commit is contained in:
@@ -80,6 +80,9 @@ class ProductService extends Product
|
||||
|
||||
parent::assign_values($action);
|
||||
|
||||
// Duration
|
||||
$this->tpl['duration_value'] = $this->duration_value;
|
||||
|
||||
if ($action == 'create')
|
||||
{
|
||||
// Title
|
||||
|
||||
@@ -220,10 +220,10 @@ if ($_POST["action"] == 'update' && ($user->rights->produit->creer || $user->rig
|
||||
}
|
||||
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);
|
||||
include_once('canvas/'.$product->canvas.'/product.'.$product->canvas.'.class.php');
|
||||
$classname = 'Product'.ucfirst($_POST["canvas"]);
|
||||
include_once('canvas/'.$_POST["canvas"].'/product.'.$_POST["canvas"].'.class.php');
|
||||
$product = new $classname($db);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user