isBundle() in Magento?
Asked Answered
B

2

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.

Basically answered 15/11, 2010 at 21:57 Comment(0)
B
21

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

$product = $this->getProduct();
if($product->getTypeId() === 'bundle'){
    // Something…
}
Businesslike answered 29/11, 2010 at 22:52 Comment(1)
Thanks! While I had to use a different solution this definitely worked for determining if a product is a bundle.Basically
A
20

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

Alabaster answered 1/1, 2014 at 9:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.