Work into multilang into product webservice
This commit is contained in:
parent
03d73bce9c
commit
e6e45862a1
@ -707,16 +707,20 @@ function getListOfProductsOrServices($authentication,$filterproduct)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getProductsForCategory
|
* Get list of products for a category
|
||||||
*
|
*
|
||||||
* @param array $authentication Array of authentication information
|
* @param array $authentication Array of authentication information
|
||||||
* @param array $id Category id
|
* @param array $id Category id
|
||||||
* @param $lang $lang Force lang
|
* @param $lang $lang Force lang
|
||||||
* @return array Array result
|
* @return array Array result
|
||||||
*/function getProductsForCategory($authentication,$id,$lang='')
|
*/
|
||||||
|
function getProductsForCategory($authentication,$id,$lang='')
|
||||||
{
|
{
|
||||||
global $db,$conf,$langs;
|
global $db,$conf,$langs;
|
||||||
|
|
||||||
|
$langcode=($lang?$lang:(empty($conf->global->MAIN_LANG_DEFAULT)?'auto':$conf->global->MAIN_LANG_DEFAULT));
|
||||||
|
$langs->setDefaultLang($langcode);
|
||||||
|
|
||||||
dol_syslog("Function: getProductsForCategory login=".$authentication['login']." id=".$id);
|
dol_syslog("Function: getProductsForCategory login=".$authentication['login']." id=".$id);
|
||||||
|
|
||||||
if ($authentication['entity']) $conf->entity=$authentication['entity'];
|
if ($authentication['entity']) $conf->entity=$authentication['entity'];
|
||||||
@ -773,11 +777,11 @@ function getListOfProductsOrServices($authentication,$filterproduct)
|
|||||||
'id' => $obj->id,
|
'id' => $obj->id,
|
||||||
'ref' => $obj->ref,
|
'ref' => $obj->ref,
|
||||||
'ref_ext' => $obj->ref_ext,
|
'ref_ext' => $obj->ref_ext,
|
||||||
'label' => $obj->label,
|
'label' => $obj->multilangs[$langs->defaultlang]["label"]?$obj->multilangs[$langs->defaultlang]["label"]:$obj->label,
|
||||||
'description' => $obj->description,
|
'description' => $obj->multilangs[$langs->defaultlang]["description"]?$obj->multilangs[$langs->defaultlang]["description"]:$obj->description,
|
||||||
'date_creation' => dol_print_date($obj->date_creation,'dayhourrfc'),
|
'date_creation' => dol_print_date($obj->date_creation,'dayhourrfc'),
|
||||||
'date_modification' => dol_print_date($obj->date_modification,'dayhourrfc'),
|
'date_modification' => dol_print_date($obj->date_modification,'dayhourrfc'),
|
||||||
'note' => $obj->note,
|
'note' => $obj->multilangs[$langs->defaultlang]["note"]?$obj->multilangs[$langs->defaultlang]["note"]:$obj->note,
|
||||||
'status_tosell' => $obj->status,
|
'status_tosell' => $obj->status,
|
||||||
'status_tobuy' => $obj->status_buy,
|
'status_tobuy' => $obj->status_buy,
|
||||||
'type' => $obj->type,
|
'type' => $obj->type,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user