I need to alter Ubercart product price on Ubercart 3, Drupal 7, when product is added to cart. I need to check some conditions, and if met, change the price. I thought i can go with
function MYMODULE_uc_cart_item($op, &$item) {
switch ($op) {
case 'load':
drupal_set_message(t('It works!'), 'status');
break;
}
}
but not sure am i targeting right hook.
It seems that it does not work (it is not invoked).
Thanks for clues
hooks
are the right way to programmatically interact with modules. May be you can set it with rules module, i am not sure. – niksmac Jan 21 '13 at 13:19function hook_uc_cart_item($op, &$item) {
the work hook should be replaced with your modules name likefunction YOURMODULENAME_uc_cart_item($op, &$item)
– niksmac Jan 21 '13 at 14:04