7
votes
How to get the price range of bundle products in Magento 2?
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->get('Magento\Catalog\Model\Product')->load(YOUR_ID);
$bundleObj=$product->getPriceInfo()->...
7
votes
which observer to call while removing item from cart and empty cart?
Besides the controller pre|post dispatch events that don't do you much good, though you can still use them controller_action_predispatch_checkout_cart_delete and ...
6
votes
Accepted
How to override a block without name?
You can use setChild() to replace a block by its alias. First create the new block with a name, then call setChild() via <action>:
<referenceBlock name="order_items">
<block class="...
5
votes
Accepted
Magento 2.1: <preference> doesn't work with block
Thanks fschmengler ,
I managed to solve this by using Plugin.
Override/replace single method in block class:
app/code/MySpace/MyModule/etc/di.xml
<config xmlns:xsi="http://www.w3.org/2001/...
5
votes
Magento 2.1: <preference> doesn't work with block
To replace a single method, use the around plugin and don't call the original method with $proceed()
5
votes
Disallow sell of a simple product but allow that product to be sell in bundled product
Just simple solution for that Just Set that simple Product visibility to Not Visible Individually
Hope this will help you and let me know if its not working
4
votes
How to get the price range of bundle products in Magento 2?
Just to add to this answer for getting the min/max price, if you want it to display with currency formatted you need the raw number value. The accepted answer returns an object rather than a flat ...
4
votes
Accepted
Display old price in dynamic bundle product price
Sorry for the late response but I just faced this myself and solved it as follows...
In bundle/catalog/product/price.phtml (Not bundle/catalog/product/view/price.phtml) find the block of code that ...
4
votes
Accepted
Magento 2 - Losing data with extension attributes in bundle options collection
The documentation for extension attributes is not quite clear on what's the right way to use them and it seems like each entity type does it in a slightly different way.
That being said, from my ...
4
votes
Accepted
How to get object value?
If $amount is this object, use:
$amount->getValue();
How to find out by yourself:
Look at the source code of Magento\Framework\Pricing\Amount\Base and search for $this->amount. If you find a ...
4
votes
Accepted
Magento 1.9 Get only default items from options of a bundle product
You can do this:
$product = Mage::getModel('catalog/product')->load(bundle_pruduct_id);
$selectionCollection = $product->getTypeInstance(true)->getSelectionsCollection(
$product->...
3
votes
Accepted
Magento 2 - How to remove the price of each bundle product option in the shopping cart, order confirmation, review your cart page, etc
In alignment with what @tjons pointed out, in my di.xml for the module I created I needed to add a new entry to list the preference to pick up my Configuration.php file over the core one. After that I ...
3
votes
Accepted
How to get selected bundle items price
You will find selected bundle items data at the time of add to cart, like below :
$options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
:)
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 ...
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($...
3
votes
How to get bundle product items options html in magento 2.3 programmatically?
Please check with below code :
$store_id = $_storeManager->getStore()->getId();
$options = $_objectManager->get('Magento\Bundle\Model\Option')
->...
3
votes
Accepted
How to get bundle product price by product id ? Magento2
Please try this:
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->create('Magento\Catalog\Model\Product')->load($product_id);
if ($product->...
3
votes
Accepted
How to add a label to simple & Bundle product price?
For Simple
/vendor/magento/module-catalog/view/base/templates/product/price/final_price.phtml
override on below path
/app/design/frontend/theme/Magento_Catalog/templates/product/price/final_price....
2
votes
What is the suggested value of max_execution_time and memory_limit for 20,000 products site for Bulk export
It depends on so many factors. A production server setting of 300 seconds is ideal, but that depends on the setup. In any case, PHP execution should not exceed 600 (seconds), in general (as mentioned ...
2
votes
Accepted
Bundle Products not adding to the cart in magento1.9.1.0
I solved this error finally. I just enabled the error_display and got this error:
Fatal error: Call to a member function getPosition() on a non-object in htdocs/app/code/core/Mage/Bundle/Model/...
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, ...
2
votes
Can bundled products be put in an order through the admin
Personally I don't have a Magento 1.4 instance running anymore, since this version is very outdated. So I checked your question on a Magento 1.9.3.1 instance, which is the latest version.
When ...
2
votes
Magento2: How to add Bundle Product in cart via REST API?
In case you still need it.
Let's assume that our bundle is identified by the SKU "bundle01" and ID 123.
First of all, let's take some information from the product:
GET /products/bundle01?...
2
votes
Accepted
How to get Default Quantity of child product of Bundle Product in Magento 2
Finally, I achieved this by fallowing method.
public function getBundleOptions($product){
/* $bundleOptions = $this->_options->getProduct();
return $bundleOptions;*/
$...
2
votes
bundle product keep out of stock
I solved it like this:
Edit the bundle product -> Advanced inventory -> manage stock "no"
2
votes
Accepted
How are values for bundle product stored in the database?
I will try to explain brief about Bundle product. the below 3 tables important for bundle product
catalog_product_bundle_option
catalog_product_bundle_option_value
...
2
votes
Product type to use when simple product can be sold either as a unit or in a case
Even if this was possible if someone orders 465 from a pulldown how are you going to know which 456 they ordered?
If this were me, I would have product case SKU set to 456-CASE.
I would look at the ...
2
votes
Magento 2 Bundle Products on the Fly
Not Sure if I understood your requirement correctly, but it seems like you can use Configurable products for your requirement.
You can create configurable products. The configurable products have ...
2
votes
Magento2 : Can't Override Model File
drop your __construct method because you are not adding anything new to it compared to the original class. Also you may need to copy all of the private methods from the original class into yours.
...
2
votes
Magento 2 : How to set Price in bundle Products
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<!-- Event for add to ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
bundled-product × 428magento2 × 118
magento-1.9 × 93
product × 53
price × 43
bundle × 37
magento-1.7 × 34
cart × 32
configurable-product × 32
grouped-products × 25
addtocart × 19
magento-1.8 × 15
magento-1 × 15
custom-options × 14
magento-2.1 × 12
orders × 12
bundle-product × 12
magento2.3 × 11
php × 10
simple-product × 10
magento2.2 × 9
shopping-cart × 9
quantity × 9
products-management × 9
admin × 8