Hot answers tagged

7 votes

Making non-customisable bundles in Magento 2

When I saw this page come up in Google I was cautiously optimistic. Several hours of bashing my keyboard into the wall later, here is what worked for me: Magento_Bundle/layout/...
Dominic Ferrantelli's user avatar
4 votes

Making non-customisable bundles in Magento 2

OK as a complete solution to this using @Dominic Ferrantelli initial answer and also the logic required to add the bundle product to the cart straight from the category page as well please see below: ...
Tony Brown's user avatar
3 votes

How to load bundle child product by parent product ID?

You can get the type instance in your bundle product, then get the children IDs, as below. $typeInstance = $product->getTypeInstance(); $requiredChildrenIds = $typeInstance->getChildrenIds($...
Ajeet Singh's user avatar
3 votes
Accepted

Magento 2 Bundle Product Page - Remove Slide Down

To disable the slide down when clicking the Customize and Add to Cart button on the bundle product page, create a new JS mixin to override the default slideDown option in mage.slide JS widget to set ...
Tu Van's user avatar
  • 6,763
3 votes
Accepted

Advanced js bundling

Found the issue, main problem was that the guide in the devdocs has some mistakes in it. To fix this I had to find in my build.js "jquery/jquery-migrate": ["jquery" in the shim section and replace it ...
Vlad Patru's user avatar
  • 1,200
3 votes

Magento 2 Add Bundled Product to Cart Programmatically

Below you can find my code to how i resolve it, you have to use field selection_id and not sub product id (in this case i use only one multiselect option): // get selection option in a bundle ...
elachino's user avatar
3 votes
Accepted

Magento 2 Add Bundled Product to Cart Programmatically

I reckon the right way of doing it would be the following: First you need to inject the following classes to your class constructor: protected $_cart; protected $_productRepository; public ...
Raphael at Digital Pianism's user avatar
2 votes

In Magento How to Show the Bundle Products Option in Front end Tab (Product View Page)

Not sure about your case, but let's imagine a common situation when you need to have a bundle product options selection in a custom tab. In the latest Magento versions product view tabs is handled by ...
Yaroslav Rogoza's user avatar
2 votes

Convert fixed price bundles to dynamic priced bundles

Another slightly bodgey, but very quick and simple way to do this is to open the product page in the admin where the price dropdown to change between 'fixed' and 'dynamic' is greyed out and disabled, ...
DWJames's user avatar
  • 81
2 votes
Accepted

Change every bundle item price on addtocart

You can do below code while adding product to the cart. $cart = Mage::helper('checkout/cart')->getCart()->getQuote()->getAllItems(); $price = ''; foreach ($cart as $i) { if ($i->getId() ...
Krupali's user avatar
  • 1,140
2 votes
Accepted

Magento2 - include possible tier price in getProductPrice() product list

'display_minimal_price' => true Already forces the lowest price to be displayed in your list (as a link), you don't have to change the price code, if tierprice is the lowest possible price. ...
paddz's user avatar
  • 131
2 votes
Accepted

Magento 2: Override radio.phtml for bundle

Remove templates from template path from xml <block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Radio" name="product.info.bundle.options.radio" as="radio" template="...
Prince Patel's user avatar
  • 22.7k
2 votes

Magento 2: Override radio.phtml for bundle

Replace <block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Radio" name="product.info.bundle.options.radio" as="radio" template="Magento_Bundle::templates/catalog/product/...
Mukesh Prajapati's user avatar
2 votes
Accepted

Why my bundle products return a different SKU?

It's happening because the product was created using the Dynamic SKU option. You just need to disable it and refresh the page. So, it's going to return: Bundle Product SKU: BundleQA Simple Product ...
Rafael Corrêa Gomes's user avatar
1 vote

Bundle product to look as Single product

We are looking for a similar solution. Did you ever find one? I did find a third party extension that appears to do what you are looking for. I have not tried it as it does not seem to work with our ...
JGP's user avatar
  • 11
1 vote
Accepted

Getting undefined on Mage_Catalog_Model_Product_Type_Simple:getSelectionsCollection() from bundle product

This error came from a wrong value in $product_id. Don't know why, but I put the SKU in there, while the product ID was needed. Without getting any error I did not suspect this to be a problem. When ...
JoZeff's user avatar
  • 33
1 vote
Accepted

Magento2 bundle product retail price would like to display

Try this code $productId = 46; //any bundle product id $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $product = $objectManager->get('Magento\Catalog\Model\Product')->...
Msquare's user avatar
  • 9,043
1 vote

Enable Dynamic price in bundle product

Sometimes the documentation could be more specific. Only when creating a new product can you determine if it is dynamic pricing or not. Once the product is created, it cannot be modified.
Miguel Angel Espinosa García's user avatar
1 vote
Accepted

Magento 2: Move add to cart in Your Customisation (bundle product page) before Go back to product details

add the below code in app/design/frontend/[Vendor_Theme]/[Theme]/Magento_Bundle/layout/catalog_product_view_type_bundle.xml <?xml version="1.0"?> <!-- /** * Copyright © Magento, Inc. ...
Kishor Thummar's user avatar
1 vote
Accepted

Create Magento 2 Bundles with different quantities of the same product

If I understand the situation correctly, I think that the way to accomplish this in Magento 2 is to set tier prices on the products that are bundle items: https://docs.magento.com/m2/ce/user_guide/...
jiheison's user avatar
  • 622
1 vote

How to override the bundle product special price in magento2

This section is coming from customizeAdvancedPricing function which is in vendor/magento/module-catalog/Ui/DataProvider/Product/Form/Modifier/AdvancedPricing.php And if you want to change special ...
poojan sharma's user avatar
1 vote

How can I filter all bundle child products in magento 2?

You can't get child products and parent products i have tried all and finally use this custom query to get all products parent, child. $connection= $this->_resources->getConnection(); ...
Asad Ullah's user avatar
  • 1,461
1 vote

How to load bundle child product by parent product ID?

Try this code protected $productdata; public function __construct( ............................................ \Magento\Catalog\Model\ProductFactory $productdata, ...
Msquare's user avatar
  • 9,043
1 vote

Bundle Products Not Showing Summary

I had used a script found on Stack Exchange similar to below to defer javascript similar to below: preg_match_all('#(<script.*?</script>)#is', $html, $matches); $js = ''; foreach ($matches[0]...
harri's user avatar
  • 5,455
1 vote

Magento 2.1.0 How to edit admin template of subitem grid of bundle product

Take a look at Magento\Bundle\Ui\DataProvider\Product\Form\Modifier\BundlePanel::getBundleSelections(). This is the class where the various columns are created ('Is Default', 'Name', 'SKU', etc.). If ...
Giel Berkers's user avatar
  • 12.2k
1 vote

Detect and convert Simple Products to Bundle if equivalent (CE 1.7.0.2)

I ended up using Shopping Cart Price Rules. However, amasty.com/special-promotions-pro.html claims to do a similar thing, where two products existing in the cart cause a discount to be applied.
neilctm's user avatar
  • 11
1 vote

Smarter way to continuously update the cart in Magento 2

Standard way of making UI more responsive while not adding load on server is to do operations in javascript and later do one bulk update to server. You can use smth. like Unit Of Work in your ...
Anton Kril's user avatar
  • 4,486
1 vote

Duplicate "Price as configured" block on bundle products

You can find layout definition of the block in question in app/design/frontend/{package}/{theme}/layout/bundle.xml. <layout> <PRODUCT_TYPE_bundle translate="label" module="bundle"> ...
Rajeev K Tomy's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible