rcuddy Posted February 7, 2012 Share Posted February 7, 2012 Hi all, I'm working on a custom provisioning module which will have several related but different data/information products in it. When the products are added to the cart there's a certain amount of user data entry that needs to be verified before the checkout process. Unfortunately what needs to be verified is different based on which product it is. I'm trying to grab the "add to cart" part and interrupt it with function hook_MYMODULE_ShoppingCartValidateProductUpdate($vars) but unfortunately the $vars it gets don't identify the product itself, only array 'a' => string 'confproduct' (length=11) 'i' => string '0' (length=1) 'configure' => string 'true' (length=4) 'previousbillingcycle' => string 'onetime' (length=7) 'billingcycle' => string 'onetime' (length=7) 'customfield' => array 2 => string 'ThisIsATest3' (length=12) 3 => string '768' (length=3) Now that I'm looking at it again, it looks like 'i' might correspond to $_SESSION['cart']['products' ] ... is this correct? And customfield[num] == the id of the custom field in the data base, so I could look the original product up by the relid... Is this the only way to look this information up, or is there a nicer way to do it? I suppose grabbing it from the session isn't as terrible as I thought at first, but I'm just curious why the $vars doesn't contain the product id itself? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.