I'm trying to add a simple product to the cart, but addProduct() is failing.
For what it's worth, I'm running the code from inside the
$cart = Mage::getSingleton('checkout/cart'); $cart->init(); //exit('a'); // when uncommented, this does get outputted $cart->addProduct($secondaryProductId, $primaryProductQty); //exit('b'); // when uncommented, this does not get outputted.
$secondaryProductId variable is type integer and is value 103, a simple product with that ID exists and the product is enabled.
$primaryProductQty variable is type integer and is value 1