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
Accepted

Bundle Products - how to use 2 different renderers for bundled product options? (to show in tab)

I would go with a separate module that creates a new renderer block. you don't need anything fancy. If you want to keep the functionality of the select and just want to change the template, you can ...
Marius's user avatar
  • 198k
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
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

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

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
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,108
2 votes

how to add bundle products in cart without specify options

You may only add a bundle product to the cart under the following conditions: The options are marked as "not required" Required options have defaults User defined quantities start with a default ...
philwinkle's user avatar
  • 35.7k
2 votes

Get attribute of bundle items

I finally found out myself. I needed to change the select.phtml (and also checkbox.phtml, because i am using dropdowns AND checkboxes) The files are located in: /app/design/frontend/base/default/...
Reinsch's user avatar
  • 482
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

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

Make custom option price to be added to bundle product price in cart

In answer to your question of: 'where is the sum of custom option price and simple product price first time calculated or/and stored in quote item.' Static Code Trace for the locations where it is ...
SH-'s user avatar
  • 158
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,130
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.5k
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
1 vote
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
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,451
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
  • 7,890
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

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,395
1 vote

Multiple SKU to share one inventory?

If you are using Magento then I can suggest you a solution where you can link inventories of multiple products. The linked products will share the same inventory so when one product is purchased the ...
Prashant Singh's user avatar
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.1k
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,476
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

Bundle, only Required Options

class ????_Bundle_Helper_Promo extends Mage_Core_Helper_Abstract { /** * return the price of required option on bundle, before the promo * * @param $product * @return int ...
sunwell's user avatar
  • 29

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