Update productonoff.php
This commit is contained in:
parent
f5f50045d6
commit
33bb150b44
@ -35,6 +35,7 @@ $id=GETPOST('id', 'int');
|
|||||||
$value=GETPOST('value', 'int');
|
$value=GETPOST('value', 'int');
|
||||||
|
|
||||||
$object = new GenericObject($db);
|
$object = new GenericObject($db);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -43,16 +44,10 @@ top_httphead();
|
|||||||
|
|
||||||
print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
||||||
|
|
||||||
// Registering the location of boxes
|
// Registering new values
|
||||||
if (! empty($action) && ! empty($id))
|
if (! empty($action) && ! empty($id) && $user->rights->produit->creer) {
|
||||||
{
|
if ($action == 'setstatus')
|
||||||
//$entity = GETPOST('entity','int');
|
$object->setValueFrom('tosell', $value, 'product', $id);
|
||||||
|
else if ($action == 'setstatus_buy')
|
||||||
if ($user->rights->produit->creer) {
|
$object->setValueFrom('tobuy', $value, 'product', $id);
|
||||||
if ($action == 'setstatus')
|
|
||||||
$object->setValueFrom('tosell', $value, 'product', $id);
|
|
||||||
else if ($action == 'setstatus_buy')
|
|
||||||
$object->setValueFrom('tobuy', $value, 'product', $id);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user