I'm not proficient in PHP or Hikashop, and simply need a few lines of code to link Hikashop to some existing code. I can get my callback to fire after an order has been processed in the shop but I'm at a loss how to actually get at the data in the order. I seem to be going round in circles with the doco and searching.
So can somebody fill in the blanks please? Given the $order parameter, I want my function to be called once for each product ID in the order.
function onAfterOrderCreate(&$order,&$send_email){
if(!empty($order->order_id)){
<foreach product in $order>
my_function(productID, userID);
</foreach>
}
return true;
}
The User ID has to be the Joomla one, not anything Hikashop creates. There might be some configuration item I need to set to force Hikashop to only allow checkout with a logged-in user. Thanks.