New answers tagged

1

Posting answer might be helpful for some one. <page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <move element="page.messages" destination="product.info.form....


0

There is a method in \Magento\Quote\Model\Quote\Item class called representProduct. This method compare if item was added before or not. So you need to create plugin which should always return false for adding each item as new. Add a plugin in etc/di.xml file of your module <type name="Magento\Quote\Model\Quote\Item"> <plugin name=&...


0

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 attribute called "is_fixed_bundle" was created, and the below code was used to be able to add the product to cart including its required options from the ...


0

POST /rest/V1/carts/mine/items { "cartItem": { "product_option": { "extension_attributes": { "giftcard_item_option": { "giftcard_amount": 50.0000, "giftcard_sender_name": "test", "giftcard_recipient_name": "...


0

You can check product is isSalable by below code using SKU. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $sku = $orderItem->getSku(); $salable = $objectManager->create('Magento\InventorySalesAdminUi\Model\GetSalableQuantityDataBySku')->execute($sku); foreach ($salable as $key => $value) { ...


Top 50 recent answers are included