Magento: Checking if Product is Simple Type| 4 Comments | Magento
An easy way to check whether the product being viewed is a simple product is by checking the product type. There is a simple function call for it as well.
<?php if( $_product->getTypeId() == 'simple' ): ?> //your code for simple products only <?php endif; ?>
4 responses to “Magento: Checking if Product is Simple Type”
Looks good and sounds like working.
What about $_product->isSimple() ?
I’m not aware of that working. Are you just asking or have you tried it?
Sadly, Magento is not Ruby. If a method makes sense, it does not exists.
It’s funny that we have $_product->isGrouped(), $_product->isConfigurable() and $_product->isVirtual(), but no simple check for Simple.. 😀