20if (!defined(
'NOTOKENRENEWAL')) {
21 define(
'NOTOKENRENEWAL',
'1');
23if (!defined(
'NOREQUIREMENU')) {
24 define(
'NOREQUIREMENU',
'1');
26if (!defined(
'NOREQUIREHTML')) {
27 define(
'NOREQUIREHTML',
'1');
29if (!defined(
'NOREQUIREAJAX')) {
30 define(
'NOREQUIREAJAX',
'1');
32if (!defined(
'NOREQUIRESOC')) {
33 define(
'NOREQUIRESOC',
'1');
37require
'../../main.inc.php';
38require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
39require_once DOL_DOCUMENT_ROOT.
'/variants/class/ProductCombination.class.php';
53if ($user->socid > 0) {
68 print json_encode(array(
69 'error' =>
'ID not set'
76if ($product->fetch($id) < 0) {
77 print json_encode(array(
78 'error' =>
'Product not found'
84echo json_encode($prodcomb->getUniqueAttributesAndValuesByFkProductParent($product->id));
$id
Support class for third parties, contacts, members, users or resources.
Class ProductCombination Used to represent the relation between a product and one of its variants.
Class to manage products or services.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
isModEnabled($module)
Is Dolibarr module enabled.
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.
restrictedArea(User $user, $features, $object=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.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.