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.
Asked
Active
Viewed 8,123 times
2 Answers
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';
}

gaurangkathiriya
- 741
- 8
- 9