I am creating a module in which I've customized a product. When the user adds the item to the shopping cart, I want to override the nid and qty for the $form_values with different values. This I can do successfully in:
function buy_memberships_form_submit($form_id, $form_values) {
global $prod1nid, $prod1qty, $prod2nid, $pro2qty;
$form_values['nid'] = $prod1nid;
$form_values['qty'] = $prod1qty;
}
However, I want to add a second item with a different nid and qty to the cart at the same time. Obviously, I can't re-declare the function, so how do I send two products to the shopping cart within one submit function?
Your help is appreciated!
