6

How do you tell if a product page is set up as a bundle in Magento 1.4? I can't find a way to do it.

clockworkgeek
  • 37,650
  • 9
  • 89
  • 127
Duane
  • 260
  • 5
  • 14

2 Answers2

21

this code should work in your product page (catalog/product/view.phtml):

$product = $this->getProduct();
if($product->getTypeId() === 'bundle'){
    // Something…
}
ptz0n
  • 461
  • 3
  • 14
Fabrizio D'Ammassa
  • 4,729
  • 25
  • 32
  • Thanks! While I had to use a different solution this definitely worked for determining if a product is a bundle. – Duane Dec 02 '10 at 15:25
20

if ($_product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) { echo 'Bundled'; }