Fix: Fix a lot of broken features when renaming produit to product
This commit is contained in:
parent
cd49e79f60
commit
d2d63bcb81
@ -87,7 +87,7 @@ if ($_GET["action"] == 'create')
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."propal";
|
||||
$sql.= " WHERE ref LIKE '".$numpr."%'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -293,9 +293,9 @@ if ($_GET["action"] == 'create')
|
||||
print '<tr><td>';
|
||||
// multiprix
|
||||
if($conf->global->PRODUIT_MULTIPRICES && $soc->price_level)
|
||||
$html->select_produits('',"idprod".$i,'',$conf->produit->limit_size,$soc->price_level);
|
||||
$html->select_produits('',"idprod".$i,'',$conf->product->limit_size,$soc->price_level);
|
||||
else
|
||||
$html->select_produits('',"idprod".$i,'',$conf->produit->limit_size);
|
||||
$html->select_produits('',"idprod".$i,'',$conf->product->limit_size);
|
||||
print '</td>';
|
||||
print '<td><input type="text" size="2" name="qty'.$i.'" value="1"></td>';
|
||||
print '<td><input type="text" size="2" name="remise'.$i.'" value="'.$soc->remise_client.'">%</td>';
|
||||
|
||||
@ -1780,11 +1780,11 @@ if ($id > 0 || ! empty($ref))
|
||||
// multiprix
|
||||
if($conf->global->PRODUIT_MULTIPRICES)
|
||||
{
|
||||
$html->select_produits('','idprod','',$conf->produit->limit_size,$societe->price_level);
|
||||
$html->select_produits('','idprod','',$conf->product->limit_size,$societe->price_level);
|
||||
}
|
||||
else
|
||||
{
|
||||
$html->select_produits('','idprod','',$conf->produit->limit_size);
|
||||
$html->select_produits('','idprod','',$conf->product->limit_size);
|
||||
}
|
||||
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>';
|
||||
|
||||
|
||||
@ -1174,9 +1174,9 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer)
|
||||
print '<tr><td>';
|
||||
// multiprix
|
||||
if($conf->global->PRODUIT_MULTIPRICES)
|
||||
print $html->select_produits('','idprod'.$i,'',$conf->produit->limit_size,$soc->price_level);
|
||||
print $html->select_produits('','idprod'.$i,'',$conf->product->limit_size,$soc->price_level);
|
||||
else
|
||||
print $html->select_produits('','idprod'.$i,'',$conf->produit->limit_size);
|
||||
print $html->select_produits('','idprod'.$i,'',$conf->product->limit_size);
|
||||
print '</td>';
|
||||
print '<td><input type="text" size="3" name="qty'.$i.'" value="1"></td>';
|
||||
print '<td><input type="text" size="3" name="remise_percent'.$i.'" value="'.$soc->remise_client.'">%</td></tr>';
|
||||
@ -2019,11 +2019,11 @@ else
|
||||
// multiprix
|
||||
if($conf->global->PRODUIT_MULTIPRICES)
|
||||
{
|
||||
$html->select_produits('','idprod','',$conf->produit->limit_size,$soc->price_level);
|
||||
$html->select_produits('','idprod','',$conf->product->limit_size,$soc->price_level);
|
||||
}
|
||||
else
|
||||
{
|
||||
$html->select_produits('','idprod','',$conf->produit->limit_size);
|
||||
$html->select_produits('','idprod','',$conf->product->limit_size);
|
||||
}
|
||||
|
||||
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>';
|
||||
|
||||
@ -1697,9 +1697,9 @@ if ($_GET['action'] == 'create')
|
||||
print '<td>';
|
||||
// multiprix
|
||||
if($conf->global->PRODUIT_MULTIPRICES)
|
||||
$html->select_produits('','idprod'.$i,'',$conf->produit->limit_size,$soc->price_level);
|
||||
$html->select_produits('','idprod'.$i,'',$conf->product->limit_size,$soc->price_level);
|
||||
else
|
||||
$html->select_produits('','idprod'.$i,'',$conf->produit->limit_size);
|
||||
$html->select_produits('','idprod'.$i,'',$conf->product->limit_size);
|
||||
print '</td>';
|
||||
print '<td><input type="text" size="2" name="qty'.$i.'" value="1"></td>';
|
||||
print '<td nowrap="nowrap"><input type="text" size="1" name="remise_percent'.$i.'" value="'.$soc->remise_client.'">%</td>';
|
||||
@ -3065,11 +3065,11 @@ else
|
||||
// multiprix
|
||||
if($conf->global->PRODUIT_MULTIPRICES)
|
||||
{
|
||||
$html->select_produits((! empty($_POST['idprod'])?$_POST['idprod']:''),'idprod','',$conf->produit->limit_size,$soc->price_level);
|
||||
$html->select_produits((! empty($_POST['idprod'])?$_POST['idprod']:''),'idprod','',$conf->product->limit_size,$soc->price_level);
|
||||
}
|
||||
else
|
||||
{
|
||||
$html->select_produits((! empty($_POST['idprod'])?$_POST['idprod']:''),'idprod','',$conf->produit->limit_size);
|
||||
$html->select_produits((! empty($_POST['idprod'])?$_POST['idprod']:''),'idprod','',$conf->product->limit_size);
|
||||
}
|
||||
|
||||
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>';
|
||||
|
||||
@ -1214,9 +1214,9 @@ else
|
||||
print '<td colspan="3">';
|
||||
// multiprix
|
||||
if($conf->global->PRODUIT_MULTIPRICES)
|
||||
$form->select_produits('','p_idprod',1,$conf->produit->limit_size,$contrat->societe->price_level);
|
||||
$form->select_produits('','p_idprod',1,$conf->product->limit_size,$contrat->societe->price_level);
|
||||
else
|
||||
$form->select_produits('','p_idprod',1,$conf->produit->limit_size);
|
||||
$form->select_produits('','p_idprod',1,$conf->product->limit_size);
|
||||
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>';
|
||||
print '<textarea name="desc" cols="70" rows="'.ROWS_2.'"></textarea>';
|
||||
print '</td>';
|
||||
|
||||
@ -341,9 +341,9 @@ class Conf
|
||||
if (empty($this->global->MAIN_SIZE_LISTE_LIMIT)) $this->global->MAIN_SIZE_LISTE_LIMIT=25;
|
||||
$this->liste_limit=$this->global->MAIN_SIZE_LISTE_LIMIT;
|
||||
|
||||
// $this->produit->limit_size = constante de taille maximale des select de produit
|
||||
// $this->product->limit_size = constante de taille maximale des select de produit
|
||||
if (! isset($this->global->PRODUIT_LIMIT_SIZE)) $this->global->PRODUIT_LIMIT_SIZE=100;
|
||||
$this->produit->limit_size=$this->global->PRODUIT_LIMIT_SIZE;
|
||||
$this->product->limit_size=$this->global->PRODUIT_LIMIT_SIZE;
|
||||
|
||||
// $this->theme et $this->css
|
||||
if (empty($this->global->MAIN_THEME)) $this->global->MAIN_THEME="eldy";
|
||||
@ -412,6 +412,9 @@ class Conf
|
||||
$this->adherent->cotisation->warning_delay=$this->global->MAIN_DELAY_MEMBERS*24*60*60;
|
||||
$this->bank->rappro->warning_delay=$this->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE*24*60*60;
|
||||
$this->bank->cheque->warning_delay=(isset($this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT)?$this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT:0)*24*60*60;
|
||||
|
||||
// For backward compatibility
|
||||
$this->produit=$this->product;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -44,7 +44,13 @@ if ($modulepart=='produit|service' && (! $user->rights->produit->lire && ! $user
|
||||
|
||||
if ($_POST["action"] == 'confirm_resize' && (isset($_POST["file"]) != "") && (isset($_POST["sizex"]) != "") && (isset($_POST["sizey"]) != ""))
|
||||
{
|
||||
$fullpath=$conf->produit->dir_output."/".$original_file;
|
||||
$product=new Product($db);
|
||||
$result=$product->fetch($_POST["id"]);
|
||||
$dir=$conf->product->dir_output; // By default
|
||||
if ($product->type == 0) $dir=$conf->product->dir_output;
|
||||
if ($product->type == 1) $dir=$conf->service->dir_output;
|
||||
|
||||
$fullpath=$dir."/".$original_file;
|
||||
$result=dol_imageResizeOrCrop($fullpath,0,$_POST['sizex'],$_POST['sizey']);
|
||||
|
||||
if ($result == $fullpath)
|
||||
@ -63,7 +69,13 @@ if ($_POST["action"] == 'confirm_resize' && (isset($_POST["file"]) != "") && (is
|
||||
// Crop d'une image
|
||||
if ($_POST["action"] == 'confirm_crop')
|
||||
{
|
||||
$fullpath=$conf->produit->dir_output."/".$original_file;
|
||||
$product=new Product($db);
|
||||
$result=$product->fetch($_POST["id"]);
|
||||
$dir=$conf->product->dir_output; // By default
|
||||
if ($product->type == 0) $dir=$conf->product->dir_output;
|
||||
if ($product->type == 1) $dir=$conf->service->dir_output;
|
||||
|
||||
$fullpath=$dir."/".$original_file;
|
||||
$result=dol_imageResizeOrCrop($fullpath,1,$_POST['w'],$_POST['h'],$_POST['x'],$_POST['y']);
|
||||
|
||||
if ($result == $fullpath)
|
||||
@ -91,7 +103,7 @@ print_fiche_titre($langs->trans("Image"));
|
||||
|
||||
if ($mesg) print '<div class="error">'.$mesg.'</div>';
|
||||
|
||||
$infoarray=dol_getImageSize($conf->produit->dir_output."/".urldecode($_GET["file"]));
|
||||
$infoarray=dol_getImageSize($conf->product->dir_output."/".urldecode($_GET["file"]));
|
||||
$height=$infoarray['height'];
|
||||
$width=$infoarray['width'];
|
||||
print $langs->trans("CurrentInformationOnImage").':';
|
||||
@ -129,7 +141,7 @@ print $langs->trans("DefineNewAreaToPick").'...<br>';
|
||||
print '<br>';
|
||||
print '<img style="border: 1px solid #888888;" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.$original_file.'" alt="Taille origine" id="cropbox" />';
|
||||
print '<br>';
|
||||
$infoarray=dol_getImageSize($conf->produit->dir_output."/".urldecode($_GET["file"]));
|
||||
$infoarray=dol_getImageSize($conf->product->dir_output."/".urldecode($_GET["file"]));
|
||||
$height=$infoarray['height'];
|
||||
$width=$infoarray['width'];
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$_GET['id'].'" method="post" onsubmit="return checkCoords();">
|
||||
|
||||
@ -293,7 +293,7 @@ if ($modulepart)
|
||||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
if ($conf->product->enabled) $original_file=$conf->produit->dir_output.'/'.$original_file;
|
||||
if ($conf->product->enabled) $original_file=$conf->product->dir_output.'/'.$original_file;
|
||||
elseif ($conf->service->enabled) $original_file=$conf->service->dir_output.'/'.$original_file;
|
||||
}
|
||||
|
||||
|
||||
@ -105,7 +105,7 @@ if ($_GET["id"])
|
||||
print '<tr><td width="20%">'.$langs->trans("InternalRef").'</td><td width="40%">'.$product->ref.'</td>';
|
||||
|
||||
print '<td class="photo" valign="top" rowspan="6">';
|
||||
$product->show_photos($conf->produit->dir_output,1,1,0);
|
||||
$product->show_photos($conf->product->dir_output,1,1,0);
|
||||
print '</td></tr>';
|
||||
|
||||
print "<tr>";
|
||||
|
||||
@ -42,7 +42,7 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
$product = new Product($db);
|
||||
$result = $product->fetch($_GET["id"]);
|
||||
|
||||
$product->add_photo($conf->produit->dir_output, $_FILES['photofile']);
|
||||
$product->add_photo($conf->product->dir_output, $_FILES['photofile']);
|
||||
}
|
||||
}
|
||||
/*
|
||||
@ -140,7 +140,7 @@ if ($_GET["id"])
|
||||
$nbbyrow=5;
|
||||
|
||||
$pdir = get_exdir($product->id,2) . $product->id ."/photos/";
|
||||
$dir = $conf->produit->dir_output . '/'. $pdir;
|
||||
$dir = $conf->product->dir_output . '/'. $pdir;
|
||||
|
||||
print '<br><table width="100%" valign="top" align="center" border="0" cellpadding="2" cellspacing="2">';
|
||||
|
||||
|
||||
@ -58,7 +58,6 @@ function dol_getImageSize($file)
|
||||
* \param src_x Position of croping image in source image (not use if mode=0)
|
||||
* \param src_y Position of croping image in source image (not use if mode=0)
|
||||
* \return int File name if OK, error message if KO
|
||||
* \remarks With file=myfile.jpg -> myfile_small.jpg
|
||||
*/
|
||||
function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x=0, $src_y=0)
|
||||
{
|
||||
@ -244,7 +243,7 @@ function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x=0, $s
|
||||
// Free memory
|
||||
imagedestroy($imgThumb);
|
||||
|
||||
clearstatcache(); // File was replaced by a modified on, so we clear file caches.
|
||||
clearstatcache(); // File was replaced by a modified one, so we clear file caches.
|
||||
|
||||
return $imgThumbName;
|
||||
}
|
||||
|
||||
@ -577,7 +577,7 @@ if (! defined('NOLOGIN'))
|
||||
}
|
||||
if (isset($user->conf->PRODUIT_LIMIT_SIZE)) // Can be 0
|
||||
{
|
||||
$conf->produit->limit_size = $user->conf->PRODUIT_LIMIT_SIZE;
|
||||
$conf->product->limit_size = $user->conf->PRODUIT_LIMIT_SIZE;
|
||||
}
|
||||
// Replace conf->css by personalized value
|
||||
if (isset($user->conf->MAIN_THEME) && $user->conf->MAIN_THEME)
|
||||
|
||||
@ -33,7 +33,7 @@ class ProductDefault extends Product
|
||||
var $errno = 0;
|
||||
//! Template container
|
||||
var $tpl = array();
|
||||
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
* \param DB Handler acces base de donnees
|
||||
@ -53,14 +53,14 @@ class ProductDefault extends Product
|
||||
|
||||
$this->next_prev_filter = "canvas='default'";
|
||||
}
|
||||
|
||||
|
||||
function getTitle()
|
||||
{
|
||||
global $langs;
|
||||
|
||||
|
||||
return $langs->trans("Products");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Lecture des donnees dans la base
|
||||
* \param id Product id
|
||||
@ -71,7 +71,7 @@ class ProductDefault extends Product
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Assigne les valeurs pour les templates
|
||||
* \param object object
|
||||
@ -81,53 +81,53 @@ class ProductDefault extends Product
|
||||
global $conf,$langs;
|
||||
global $html;
|
||||
global $formproduct;
|
||||
|
||||
|
||||
parent::assign_values($action);
|
||||
|
||||
|
||||
// Stock alert
|
||||
$this->tpl['seuil_stock_alerte'] = $this->seuil_stock_alerte;
|
||||
|
||||
|
||||
if ($action == 'create')
|
||||
{
|
||||
// Title
|
||||
$this->tpl['title'] = load_fiche_titre($langs->trans("NewProduct"));
|
||||
}
|
||||
|
||||
|
||||
if ($action == 'edit')
|
||||
{
|
||||
$this->tpl['title'] = load_fiche_titre($langs->trans('Modify').' '.$langs->trans('Product').' : '.$this->ref, "");
|
||||
}
|
||||
|
||||
|
||||
if ($action == 'create' || $action == 'edit')
|
||||
{
|
||||
// Finished
|
||||
$statutarray=array('1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial"));
|
||||
$this->tpl['finished'] = $html->selectarray('finished',$statutarray,$this->finished);
|
||||
|
||||
|
||||
// Weight
|
||||
$this->tpl['weight'] = $this->weight;
|
||||
$this->tpl['weight_units'] = $formproduct->load_measuring_units("weight_units","weight",$this->weight_units);
|
||||
|
||||
|
||||
// Length
|
||||
$this->tpl['length'] = $this->length;
|
||||
$this->tpl['length_units'] = $formproduct->load_measuring_units("length_units","size",$this->length_units);
|
||||
|
||||
|
||||
// Surface
|
||||
$this->tpl['surface'] = $this->surface;
|
||||
$this->tpl['surface_units'] = $formproduct->load_measuring_units("surface_units","surface",$this->surface_units);
|
||||
|
||||
|
||||
// Volume
|
||||
$this->tpl['volume'] = $this->volume;
|
||||
$this->tpl['volume_units'] = $formproduct->load_measuring_units("volume_units","volume",$this->volume_units);
|
||||
}
|
||||
|
||||
|
||||
if ($action == 'view')
|
||||
{
|
||||
{
|
||||
// Photo
|
||||
$this->tpl['nblignes'] = 4;
|
||||
if ($this->is_photo_available($conf->produit->dir_output))
|
||||
if ($this->is_photo_available($conf->product->dir_output))
|
||||
{
|
||||
$this->tpl['photos'] = $this->show_photos($conf->produit->dir_output,1,1,0,0,0,80);
|
||||
$this->tpl['photos'] = $this->show_photos($conf->product->dir_output,1,1,0,0,0,80);
|
||||
}
|
||||
|
||||
// Nature
|
||||
@ -158,20 +158,20 @@ class ProductDefault extends Product
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Fetch datas list
|
||||
*/
|
||||
function LoadListDatas($limit, $offset, $sortfield, $sortorder)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
|
||||
$this->list_datas = array();
|
||||
|
||||
|
||||
//$_GET["sall"] = 'LL';
|
||||
// Clean parameters
|
||||
$sall=trim(isset($_GET["sall"])?$_GET["sall"]:$_POST["sall"]);
|
||||
|
||||
|
||||
foreach($this->field_list as $field)
|
||||
{
|
||||
if ($field['enabled'])
|
||||
@ -180,12 +180,12 @@ class ProductDefault extends Product
|
||||
$$fieldname = trim(isset($_GET[$fieldname])?$_GET[$fieldname]:$_POST[$fieldname]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$sql = 'SELECT DISTINCT ';
|
||||
|
||||
|
||||
// Fields requiered
|
||||
$sql.= 'p.rowid, p.price_base_type, p.fk_product_type, p.seuil_stock_alerte';
|
||||
|
||||
|
||||
// Fields not requiered
|
||||
foreach($this->field_list as $field)
|
||||
{
|
||||
@ -198,7 +198,7 @@ class ProductDefault extends Product
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'product as p';
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
if (!$user->rights->produit->hidden) $sql.=' AND p.hidden = 0';
|
||||
|
||||
|
||||
if ($sall)
|
||||
{
|
||||
$clause = '';
|
||||
@ -213,7 +213,7 @@ class ProductDefault extends Product
|
||||
}
|
||||
$sql.= ")";
|
||||
}
|
||||
|
||||
|
||||
// Search fields
|
||||
foreach($this->field_list as $field)
|
||||
{
|
||||
@ -223,7 +223,7 @@ class ProductDefault extends Product
|
||||
if (${$fieldname}) $sql.= " AND ".$field['name']." LIKE '%".addslashes(${$fieldname})."%'";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isset($_GET["envente"]) && strlen($_GET["envente"]) > 0)
|
||||
{
|
||||
$sql.= " AND p.envente = ".addslashes($_GET["envente"]);
|
||||
@ -244,17 +244,17 @@ class ProductDefault extends Product
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$datas = array();
|
||||
|
||||
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$datas["id"] = $obj->rowid;
|
||||
|
||||
|
||||
foreach($this->field_list as $field)
|
||||
{
|
||||
if ($field['enabled'])
|
||||
{
|
||||
$alias = $field['alias'];
|
||||
|
||||
|
||||
if ($alias == 'ref')
|
||||
{
|
||||
$this->id = $obj->rowid;
|
||||
@ -287,7 +287,7 @@ class ProductDefault extends Product
|
||||
print $sql;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@ -68,7 +68,7 @@ class Product extends CommonObject
|
||||
// Local taxes
|
||||
var $localtax1_tx;
|
||||
var $localtax2_tx;
|
||||
//! Type 0 for regular product, 1 for service, 2 for assembly kit, 3 for stock kit
|
||||
//! Type 0 for regular product, 1 for service (Advanced feature: 2 for assembly kit, 3 for stock kit)
|
||||
var $type;
|
||||
var $typestring;
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ if ($_GET['id'] || $_GET["ref"])
|
||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||
|
||||
if ($conf->product->enabled) $upload_dir = $conf->produit->dir_output.'/'.dol_sanitizeFileName($product->ref);
|
||||
if ($conf->product->enabled) $upload_dir = $conf->product->dir_output.'/'.dol_sanitizeFileName($product->ref);
|
||||
elseif ($conf->service->enabled) $upload_dir = $conf->service->dir_output.'/'.dol_sanitizeFileName($product->ref);
|
||||
}
|
||||
$modulepart='produit';
|
||||
|
||||
@ -1047,11 +1047,11 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>';
|
||||
|
||||
$nblignes=4;
|
||||
if ($product->is_photo_available($conf->produit->dir_output))
|
||||
if ($product->is_photo_available($conf->product->dir_output))
|
||||
{
|
||||
// Photo
|
||||
print '<td valign="middle" align="center" width="30%" rowspan="'.$nblignes.'">';
|
||||
print $product->show_photos($conf->produit->dir_output,1,1,0,0,0,80);
|
||||
print $product->show_photos($conf->product->dir_output,1,1,0,0,0,80);
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user,'produit|service',$id,'product','','',$fieldid);
|
||||
|
||||
$mesg = '';
|
||||
$dir = (!empty($conf->produit->dir_output)?$conf->produit->dir_output:$conf->service->dir_output);
|
||||
$dir = (!empty($conf->product->dir_output)?$conf->product->dir_output:$conf->service->dir_output);
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -137,11 +137,11 @@ print '</tr>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>';
|
||||
|
||||
$nblignes=4;
|
||||
if ($product->is_photo_available($conf->produit->dir_output))
|
||||
if ($product->is_photo_available($conf->product->dir_output))
|
||||
{
|
||||
// Photo
|
||||
print '<td valign="middle" align="center" width="30%" rowspan="'.$nblignes.'">';
|
||||
print $product->show_photos($conf->produit->dir_output,1,1,0,0,0,80);
|
||||
print $product->show_photos($conf->product->dir_output,1,1,0,0,0,80);
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
||||
@ -127,7 +127,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
// Generation des graphs
|
||||
$WIDTH=380;
|
||||
$HEIGHT=160;
|
||||
$dir = (!empty($conf->produit->dir_temp)?$conf->produit->dir_temp:$conf->service->dir_temp);
|
||||
$dir = (!empty($conf->product->dir_temp)?$conf->product->dir_temp:$conf->service->dir_temp);
|
||||
if (! file_exists($dir.'/'.$product->id))
|
||||
{
|
||||
if (create_exdir($dir.'/'.$product->id) < 0)
|
||||
|
||||
@ -199,7 +199,7 @@ if ($modulepart)
|
||||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
$original_file=(!empty($conf->produit->dir_temp)?$conf->produit->dir_temp:$conf->service->dir_temp).'/'.$original_file;
|
||||
$original_file=(!empty($conf->product->dir_temp)?$conf->product->dir_temp:$conf->service->dir_temp).'/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping for products or services
|
||||
@ -209,7 +209,7 @@ if ($modulepart)
|
||||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
$original_file=(!empty($conf->produit->dir_output)?$conf->produit->dir_output:$conf->service->dir_output).'/'.$original_file;
|
||||
$original_file=(!empty($conf->product->dir_output)?$conf->product->dir_output:$conf->service->dir_output).'/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping for categories
|
||||
@ -269,7 +269,7 @@ if ($modulepart)
|
||||
elseif ($modulepart == 'graph_product')
|
||||
{
|
||||
$accessallowed=1;
|
||||
$original_file=$conf->produit->dir_temp.'/'.$original_file;
|
||||
$original_file=$conf->product->dir_temp.'/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping pour les code barre
|
||||
|
||||
Loading…
Reference in New Issue
Block a user