20 if (!defined(
'NOTOKENRENEWAL')) {
21 define(
'NOTOKENRENEWAL',
'1');
23 if (!defined(
'NOREQUIREMENU')) {
24 define(
'NOREQUIREMENU',
'1');
26 if (!defined(
'NOREQUIREHTML')) {
27 define(
'NOREQUIREHTML',
'1');
29 if (!defined(
'NOREQUIREAJAX')) {
30 define(
'NOREQUIREAJAX',
'1');
32 if (!defined(
'NOREQUIRESOC')) {
33 define(
'NOREQUIRESOC',
'1');
36 require
'../../main.inc.php';
37 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
38 require_once DOL_DOCUMENT_ROOT.
'/variants/class/ProductCombination.class.php';
41 if (empty($conf->variants->enabled)) {
44 if ($user->socid > 0) {
59 print json_encode(array(
60 'error' =>
'ID not set'
67 if ($product->fetch($id) < 0) {
68 print json_encode(array(
69 'error' =>
'Product not found'
75 echo json_encode($prodcomb->getUniqueAttributesAndValuesByFkProductParent($product->id));
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Class to manage products or services.
if(!defined('NOREQUIREMENU')) if(!function_exists("llxHeader")) top_httphead($contenttype= 'text/html', $forcenocache=0)
Show HTTP header.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Class ProductCombination Used to represent a product combination.
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.