I'm writing a module to change a user's shopping cart order ID based on a stored value from their profile, which cannot be edited from the users.
In the hook call to
commerce_cart_order_id I tried the following code, but it doesn't change the order ID. Printing
1; if I change
return $orderidentifier; with
return 1; my cart changes just as I'd expect it to.
global $user; $user_full = user_load($user->uid); $orderidentifier = $user_full->field_currentcartorder['und']['value']; return $orderidentifier;
Can anyone tell me what I'm missing?