hook_productapi(&$node, $op, $arg3 = NULL, $arg4 = NULL)
ecommerce-4-7/docs/developer/hooks/core.php, line 210
Add a product
The
&$node The node object for the product.
$op What kind of action is being performed. Possible values:
This value varies depending on the operation.
<?php
function hook_productapi(&$node, $op, $arg3 = NULL, $arg4 = NULL) {
switch($op) {
case 'wizard_select':
return array('coupon' => t('Gift Certificate'));
case 'cart add item':
break;
case 'attributes':
return array('in_stock', 'no_quantity', 'no_discounts');
case 'transaction':
break;
case 'adjust_prices':
if (!((float)$node->price)) {
return $node->gc_price;
}
break;
case 'subproduct_types':
return array('sandwich');
case 'fields':
break;
case 'validate':
break;
case 'load':
break;
case 'insert':
break;
case 'update':
break;
case 'delete':
break;
}
}
?>