11 votes
Accepted

Adding bundle items to cart creates recursive dependency error

Modify app/code/core/Mage/Sales/Model/Quote/Item/Abstract.php as stated below – only difference is , true being added to in_array() – and see if the exception disappears: public function ...
pong's user avatar
  • 907
9 votes

Magento2 add new field in bundle item (in option selection)

Here is my solution: app/code/MyVendor/MyModule/etc/adminhtml/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:...
Vitaliy Mashchenko's user avatar
7 votes

Why attributes of bundle items of a bundle product are also saved to the bundle product itself? (database-wise)

Update: how to stop the indexer from including child products Extend and modify Mage_Catalog_Model_Resource_Product_Indexer_Eav_Abstract. Look for the function _prepareRelationIndex(). Modify the SQL ...
d.yuk's user avatar
  • 669
6 votes
Accepted

Magento 2 Bundle product options images

Try this code: First you need to override below file. After that you can get bundle option images from below code. app/design/frontend/Vendor/Theme_Name/Magento_Bundle/templates/catalog/product/...
Emipro Technologies Pvt. Ltd.'s user avatar
5 votes
Accepted

Magento 2.4.3 Bundle Product getting issue on frontend Magento\Catalog\Model\ResourceModel\Product\Flat::getLinkField()

Vendor\Module\etc\di.xml <preference for="Magento\Bundle\Model\Product\SingleChoiceProvider" type="Vendor\Module\Model\Product\SingleChoiceProvider" /> Vendor\Module\Model\...
akashmalik's user avatar
4 votes

How to add bundle product to cart programmatically with custom price and quantity (of all products) in Magento 2?

Create a Controller <?php namespace Company\Module\Controller\Index; use Magento\Catalog\Model\Product; use Magento\Catalog\Model\ProductFactory; use Magento\Framework\App\Action\Action; use ...
Devendra Gupta's user avatar
4 votes
Accepted

Set different price for each additional quantity

To do this you can add tier prices for the product. Go to the product page in the Magento admin area and navigate to the 'Price' tab. There you will have an attribute called 'Tier Price' where you ...
Arunendra's user avatar
  • 7,436
4 votes
Accepted

Magento cart - get the bundle parent and children product

answering self for future seekers: $item->getParentItemId() source: http://davehiren.blogspot.co.il/2014/02/magento-get-cart-items-how-to-get.html
Ronen Ness's user avatar
4 votes

Bundle Product Price Not Updating On Product Page When Selecting Options

I think you are using a custom Magento theme or Custom Bundle product module, right? If yes, you should debug on your browser to detect what the issue is. Steps to debug (Chrome): Inspect element (...
bachlee89's user avatar
  • 1,287
3 votes

How to add bundle product to cart programmatically with custom price and quantity (of all products) in Magento 2?

This worked for me (Magento 2.2.6): $product = $this->_productRepository->getById($id, false, null, true); $this->_cart->addProduct($product, $data); where $data is an array as shown ...
Zankar's user avatar
  • 544
2 votes
Accepted

Magento 2 Log Bundle Product Data in List Page?

You can try something like as well you can use this to pass data in to log. <?php echo "<pre>"; print_r(json_encode($_product->getData())); exit; ?&...
Krishna ijjada's user avatar
2 votes

Magento 2.4.3 Bundle Product getting issue on frontend Magento\Catalog\Model\ResourceModel\Product\Flat::getLinkField()

Since 2.3 Magento recommends to disable Flat catalog, this would fix that problem https://docs.magento.com/user-guide/catalog/catalog-flat.html Use of a flat catalog is no longer recommended as a ...
Raul Sanchez's user avatar
  • 3,276
2 votes
Accepted

Magento2 - issue when importing bundle products

Effectively, it was a bug. It seems last working version was 2.1.12, and it should be fixed back in 2.3.* The workaround posted here https://github.com/magento/magento2/issues/12330#issuecomment-...
Raul Sanchez's user avatar
  • 3,276
1 vote

Getting Sku of bundle-product options in carts/mine/items

Alright, so first things first. We need to find where things are happening. I searched the vendor/magento folder for carts/mine/items and that came up with module-quote/etc/webapi.xml. Which shows ...
Rian's user avatar
  • 841
1 vote
Accepted

How to create an order programmatically with bundle items in Magento 2?

Eventually, I figured it out. I left the script, maybe it will help someone. This works for Magento 2.4.1: public function myMethod() { ....... $product = $this->product->get('...
Attila Naghi's user avatar
  • 3,963
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

How to get list of all selected items of bundle product on detail page magento 2

<ul> <?php $productId = 17; //any bundle product id $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $product = $objectManager->get('Magento\Catalog\Model\Product')-&...
Junaid Ashfaq's user avatar
1 vote

How to get list of all selected items of bundle product on detail page magento 2

Pleas try below code. $product_id = 'your bundle product id'; $_objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $store_id = 1; $options = $_objectManager->...
Sarvesh Patel's user avatar
1 vote
Accepted

Magento2 adding bundle product to existing quote not working

You need to do code like this one. $qty = 1; $quote = $this->quoteFactory->create()->load($quote->getId()); $product = $this->productRepository->getById($product->getId()); $...
Dhiren Vasoya'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
Accepted

How to get product_options for sales_order_item by API Rest?

You can check the quote_item_option table : option_id, code, item_id, product_id, value
DependencyHell's user avatar
1 vote

How to extend Bundle product type in Magento 2

I hope you were both able to Figure out your issue, If not I believe the Following should be the fix. <vendor>/<module>/etc/product_types.xml: <config xmlns:xsi="http://www.w3.org/...
Nathan Day's user avatar
1 vote

How to add bundle product to cart programmatically with custom price and quantity (of all products) in Magento 2?

I'm a bit late to the party, but I was struggling with the same issue myself. There were a few bundle products with required attributes. In order to tackle this in my case, a seperate product ...
m.devrees's user avatar
1 vote
Accepted

New product type based on bundle - price type not saving

Solved by set the price_type in the type model in "afterSave" Method
Khaled Omara's user avatar
1 vote
Accepted

Bundle Product - Add to Cart is not working

Your add to cart button should look like this: <button type="button" title="Add to Cart" class="button btn-cart" onclick="productAddToCartForm.submit(this)"> <span> <span><div ...
Adarsh Khatri's user avatar

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