Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

isBundle() in Magento?

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.

like image 840
Duane Avatar asked Nov 15 '10 21:11

Duane


People also ask

What is bundle product in Magento?

A Bundle product is also known as a 'kit' in other eCommerce platforms. This is a composite product type that consists of a number of simple or virtual products. Shoppers can add and configure products in a bundle according to their needs and build a 'product of their own'.

How do I get bundle product options in Magento 2?

The bundle will be generated using dropdown, radio and checkbox options. You can see all the options from the admin panel, edit bundle product, Bundle item section of the product. You can use getList() method from the interface Magento\Bundle\Api\ProductOptionRepositoryInterface to fetch detail of options.

What is the difference between grouped and bundled product in Magento?

The notable differences between grouped and bundled products are customization options and their respective uses. Grouped products are limited to purchase quantities of each individual item, whereas bundled products let customers choose the variety of options and quantities for each item in the bundle.

Which is an example of product bundling?

Product bundling is a technique in which several products are grouped together and sold as a single unit for one price. This strategy is used to encourage customers to buy more products. McDonald's Happy Meals are an example of product bundles.


2 Answers

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

$product = $this->getProduct();
if($product->getTypeId() === 'bundle'){
    // Something…
}
like image 162
Fabrizio D'Ammassa Avatar answered Nov 15 '22 07:11

Fabrizio D'Ammassa


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

like image 38
gaurangkathiriya Avatar answered Nov 15 '22 08:11

gaurangkathiriya