19 if (!defined(
'NOTOKENRENEWAL')) define(
'NOTOKENRENEWAL',
'1');
20 if (!defined(
'NOREQUIREMENU')) define(
'NOREQUIREMENU',
'1');
21 if (!defined(
'NOREQUIREHTML')) define(
'NOREQUIREHTML',
'1');
22 if (!defined(
'NOREQUIREAJAX')) define(
'NOREQUIREAJAX',
'1');
23 if (!defined(
'NOREQUIRESOC')) define(
'NOREQUIRESOC',
'1');
25 require
'../../main.inc.php';
26 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
27 require_once DOL_DOCUMENT_ROOT.
'/variants/class/ProductCombination.class.php';
29 header(
'Content-Type: application/json');
34 print json_encode(array(
35 'error' =>
'ID not set'
42 if ($product->fetch($id) < 0) {
43 print json_encode(array(
44 'error' =>
'Product not found'
50 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.
Class ProductCombination Used to represent a product combination.
print
Draft customers invoices.