Customers have to be able to buy from the category page configurable products. The issue is that the configurable block is created just once for the first product. So no matter what product I add to cart, it is always the first product of the category that ends in cart.
I tried the solution here with no success: Mage::registry not updating
I am following the tutorial here: http://inchoo.net/magento/display-multiple-configurable-products-with-options-on-one-page-in-magento/
I tried something like this:
//foreach loop <?php Mage::unregister('product') ?> <?php Mage::register('product', $_product); ?> <?php echo $this->getLayout()->createBlock('catalog/product_view_type_configurable') ->setTemplate('catalog/product/view/type/options/configurable_category.phtml') ->setProduct($_product) ->toHtml();
with no success.
If I try
getBlock() method I get false and an error (setTemplate called on a non-object).
How can I create that block for each configurable product? Or is there a better way? This solution with
Mage::unregister('product') looks hacky.