BLOG

Sometimes nerdy and wordy, but mostly helpful articles on website design and development.

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

    1. It’s funny that we have $_product->isGrouped(), $_product->isConfigurable() and $_product->isVirtual(), but no simple check for Simple.. 😀

Comments are closed.

Get the Latest

  • Get email updates whenever we post new blog articles.
  • This field is for validation purposes and should be left unchanged.

Recent Articles