Questions tagged [qty]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
26 views

Prevent Quantity Decrease on shipment generate

I want to prevent the decrease product QTY after the shipment generation. Actually my client is using NetSuite and he want to update the QTY from there. They are managing all orders from the NetSuite. ...
Sunny Rahevar's user avatar
0 votes
0 answers
11 views

Order qty sometimes going through as 2 instead of 1

I have a script which submits 5 orders to a staging instance of Magento using MSI for the stock. All 5 orders in the script are for the same product and with a Qty of 1 item. I noticed that the ...
Keppotec's user avatar
0 votes
2 answers
44 views

error messages disappear quickly when updating quantities on product detail page

error messages disappear quickly when updating quantities on the product detail page I am using Magento 2.4.5 I have changed the code in the below files but there is no effect /Magento_Ui/web/js/view/...
Ishu Kakria's user avatar
0 votes
0 answers
14 views

How to identify which way the product qty was updated in magento 2

I have 3 ways to update the product quantity. using product edit page in magento admin using magento API Using magento csv import I wanted to know while updating the qty of a product which method (...
shankar boss's user avatar
  • 1,453
1 vote
1 answer
26 views

Update qty of cart item - Magento 2.4

We want to create a input field, that loads the qty of the latest item added to the cart and when changing this input field, it should change the qty of that item in the cart. The first part, to check ...
JGeer's user avatar
  • 1,418
0 votes
0 answers
97 views

Magento 2.4.6-p3 product qty greater than salable quantity - cannot fix

So you've heard this one before I'm sure and I've tried to research how to resolve. This is the issue: For a number of products the Qty is greater than the Salable Quantity in my v2.4.6-p3 install. ...
AtotheK's user avatar
2 votes
1 answer
308 views

How to add QTY Increasing and decreasing input in minicart hyva theme

add QTY Increasing and decreasing input in minicart hyva theme (same as default magento)
Savan Patel's user avatar
  • 2,348
0 votes
2 answers
152 views

Scable qty going to nagative value

In Magento2 Scalable qty going to nagative value. Is there anyone have idea which cases Scalable Qty going to nagative value?
Arti patel's user avatar
1 vote
1 answer
519 views

Magento 2: Add discount based on individual qty and item to cart

I need to set cart discount based on individual qty and individual item for cart. For example if cart have 2 item then lowest price item to give higher percentage discount, like need to add 10% and 20%...
Kirti Nariya's user avatar
  • 3,471
0 votes
2 answers
179 views

How to get product Notify Qty by product id in magento 2?

$productId = $orderItem->getProductId();
Rubel Parvaz's user avatar
0 votes
2 answers
58 views

Stock update Issue

Running into a problem when updating stock on a configurable product. Basically when one of my stock hits 0 and I do a mass stock update the qty will change but the simple product will remain out of ...
James's user avatar
  • 1
1 vote
1 answer
66 views

How to add available when customer add to cart more available qty

How can I add the quantity not available error message to the quantity that can be added to the cart instead? Result I expect "The requested qty is non available, there are XXX qty available&...
yavonz15's user avatar
  • 417
1 vote
0 answers
41 views

Update product stock data Progratically

i have a scenario where i am trying to update product data programatically and setting manage stock to no this works great for the product created in the admin. but i have situation here if the ...
Pramod's user avatar
  • 1,464
0 votes
2 answers
277 views

how to get attribute value to show on error message

I have this code that show error message if QTY requested is smaller than QTY on stock. i have created attributes and assign values into them. how to get those values in those attributes shown in this ...
Bayzel's user avatar
  • 187
0 votes
1 answer
217 views

Whenever a product is added to cart an additional qty of same product should be added to cart using prefrence not plugin? [duplicate]

Should be achieved by preference not using the plugin and observer. can anyone provide code for this ?
Mark's user avatar
  • 63
1 vote
2 answers
2k views

Magento 2.4 get stock qty after the product is saved in plugin

How to get stock qty after the product in saved via plugin? With code bellow I allways get "stock qty" 0 no matter what. di.xml: <type name="Magento\Catalog\Model\ResourceModel\...
Franci Melink's user avatar
1 vote
1 answer
184 views

Magento ver. 2.4.4 Qty is not getting decresed even after completing order

I have upgraded magento with Magento ver. 2.4.4. ISSUE: The quantity of a product does not decrease when the customer places an order. Instead, the salable quantity gets reduced. (WHICH IS FINE) While ...
Hamendra Sunthwal's user avatar
0 votes
1 answer
511 views

How do i create a stock level report in magento?

I need to get a stock report from Magento. what do we have in stock? what SKUs - what Qty. how do I do this?
Ben Hawley's user avatar
0 votes
1 answer
201 views

Do not increment qty for same product in cart?

Magento 2.4.2 Is it possible to only have a qty of 1 in the cart for the same product? Like if I add a qty of 10 to the cart, it only adds 1 because its the same product. Possible?
user4095519's user avatar
0 votes
1 answer
130 views

how to get stock total for all simple products linked to a configurable product in magento2

I want to get all the qty total for all simple products linked to a specific configurable product I have to do the following (check my code below) but it returns "0" on total, can anyone ...
magNif's user avatar
  • 5
0 votes
1 answer
413 views

Magento 2 - Get the original Qty on Qty change

I have a product for which another product needs to be added in the cart. For this I need to check if the quantity of said product is changed in order to change the number of associated products. I ...
Litsher - Nathan's user avatar
0 votes
0 answers
231 views

Product stock quantity

I can't get the correct quantity from my products and i'm not able to see what I'm doing wrong. use Magento\Catalog\Model\ProductRepository; use Magento\CatalogInventory\Model\Stock\...
Claims's user avatar
  • 1,164
1 vote
0 answers
330 views

How to upgrade product price when qty(quantity) change at product view page in magento 2.4.x?

I want to change product price at product view page when qty was upgrade by end user how can I do that, https://prnt.sc/14tzj72
Jay Parmar's user avatar
0 votes
1 answer
36 views

Product Qty instead Salable Qty

How can i call Product Qty instead Salable Qty in if($product->getTypeId() == 'simple') { $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); ...
Pantelis's user avatar
  • 109
0 votes
1 answer
160 views

How to change tire price when qty change event in Magento 2

I want to change tier price on change Qty.If i have change Qty automatically tier price change. Please Help How to achieve this, THANKS.
Mohit Patel's user avatar
  • 3,823
0 votes
1 answer
32 views

Change Magento 1.9 Availability message depends on qty

I would like to change the Availability message in product page depends on qty. So far I tried a couple of methods but no change at all. One of them is : <?php if($product_page_type == '...
George K.'s user avatar
1 vote
2 answers
619 views

How to move Wish List next to Qty input box in product detail page?

I want to move ADD TO WISH LIST next to QTY Input box in product details page. Guide me how to achieve this
Ashok Kannan's user avatar
1 vote
1 answer
2k views

How do we get the total price to change dynamically with quantity?

If I change the Quantity for a product in product view page, the price has to change automatically. How can it be achieved? Please help me to do this. CODE:- <?php /** * Copyright © Magento, Inc. ...
Mohit Patel's user avatar
  • 3,823
0 votes
2 answers
1k views

Magento 2: Prevent add to cart or qty increase if a product already exists in cart

I want a feature where if a customer tries to add a product which already exists in cart then it should prevent it from adding again or qty increase. Instead I want to show a message that 'The product ...
Lokesh Naik's user avatar
1 vote
2 answers
2k views

M2: Can't decrease qty in cart: Attention The requested qty is not available

I have Magento 2.3.5 installed. Let's say we have 3 of Product A in stock and I add 5 of them to cart. It shows a notification at the cart saying: The requested qty is not available. That is fine and ...
Webninja's user avatar
  • 1,593
1 vote
1 answer
904 views

Magento 2 add Dropdown Quantity Box In Checkout Cart Page

I am trying to replace Drop-down instead of text box at Quantity at Checkout cart page. How can i override /Magento_Checkout/templates/cart/item/default.phtml Thank you
niceonelee's user avatar
0 votes
0 answers
508 views

Magento 2 - get Qty of used products of Configurable

I'm trying to take the various quantities of the products associated with the configurable in this way but the code does not work: $simple_collection = $_product->getTypeInstance()->...
Jackom's user avatar
  • 493
3 votes
2 answers
653 views

I have to disable the MSI and enable the usual qty field only in the magento 2.3.5 version

I have to disable the MSI and enable the usual qty field only in the Magento 2.3.5 version https://www.rakeshjesadiya.com/disable-sources-in-multi-source-inventory-magento-2/ I tried to use the ...
Ankit Srivastava's user avatar
0 votes
1 answer
247 views

Add product to quote, if he has zero stock qty

How i can add product (for example with 10 qty) to quote if this product has 0 stock qty.
Mikhaylo HODOVANIUK's user avatar
0 votes
1 answer
732 views

How to add dropdown for product qty in update cart page in magento 2?

I added dropdown for product qty box in addtocart.phtml like below: <div class="field qty"> <label class="label" for="qty"><span><?php /* @escapeNotVerified */ echo __('...
Kowsigan Atsayam's user avatar
1 vote
0 answers
259 views

Magento 2 How to get product qty before added to cart with JS?

I'm trying to get the quantities of a bundle product before added to cart with js, jquery, knockout js or whatever can allow me to do this. I want to validate that user cannot add to cart if the qty ...
Oscar Vazquez's user avatar
0 votes
1 answer
168 views

Change qty input to the counter of the number of products on mini-cart

How to change qty input to the counter of the number of products. Expected Result:
ann karsksya's user avatar
0 votes
1 answer
1k views

Magento2.3 - Add Quantity Increment/Decrement on Category Page

I want to add Quantity Increment/Decrement buttons on Category Page. I am using a theme that already provides this feature on product page. Now I want to add same feature in category pages. Anyone ...
Arsalan Ul Haq's user avatar
1 vote
0 answers
260 views

Magento2.3 - My saleable quantity is reducing twice after placing an order

After creating an order with qty = 5 I see that the saleable quantity of that product reduces by 10. I already checked the table inventory_reservation and two rows where created: Attached the ...
Gonzalo Gutiérrez's user avatar
0 votes
1 answer
114 views

magento , the qty of products goes into minus on backorder

I'm trying to put qty to 0 if qty < 0, but it's not working for me i all time have qty on minus my code don't working for me public function salesOrderSaveAfter($event) { $order = $event->...
Denys Maksiura's user avatar
3 votes
4 answers
9k views

How to get salable qty in magento 2.3.3?

How to get salable qty of each Product and display in Product view page. Can someone help me? Thanks in advance.
Ramalakshmi T's user avatar
0 votes
2 answers
318 views

Export product quantity from Magento 2.3 to CSV file

What is the proper code to export qty attribute from Magento 2.3 to CSV. $product->getQty(); - doesn't work. Thank you!
Esteban Aorta's user avatar
1 vote
1 answer
256 views

Magento 1.9 - CCAvenue Orders Automatically Cancelling

I have received order, if i try to take invoice its not possible to do that because of qty canceled as well as Canceled updated in Comment History, I am using CCAvenue Payment Gateway. How to solve ...
zus's user avatar
  • 165
1 vote
0 answers
501 views

Magento 2 how to update price on quantity change in product detail page using knockout

I am using magento version 2.3.2 I want update price based on Qty change using Knockout js in Product detail page anyone help here, thank in advance
Pradip Garchar's user avatar
1 vote
1 answer
354 views

Set custom default qty when creating new product Magento 2.3

I need Quantity field to be filled with custom value when creating new product in admin. I have already tried modificators (haven't figured out how to set data for new product with modifyData($data) ...
Vadim Shmyrov's user avatar
1 vote
0 answers
38 views

Magento 2: Cart is allowing update more than available qty

I am having very odd issue. I am using Magento 2.3.2. I have migrated data from magento 1.9.3. While I am adding product to cart, It works perfect, however whenever I try to update qty from cart it ...
Sameer Bhayani's user avatar
0 votes
1 answer
231 views

Decimals in Minimum Qty Allowed in Shopping Cart

I have a special setup where we have some products that are sold on exact sizes (like 3.14 sq m). In order to comply with local invoice regulations the base price needs to be provided in 1 sq m, so ...
Andras's user avatar
  • 169
2 votes
0 answers
276 views

Magento 2: How to add product QTY in layered navigation filter?

I need to add qty filter in Layered Navigation so Customer can filter products using qty. I have implemented using product stock status but due to backorders. I need to display products based on ...
Sameer Bhayani's user avatar
1 vote
1 answer
1k views

Magento 2.3.2: How to override a Inventory Deduction API model?

I want to override below Magento core file vendor/magento/module-inventory-source-deduction-api/Model/SourceDeductionService.php to add code $qty=0; inline 83. I tried by my self but getting an ...
irshad's user avatar
  • 171
3 votes
4 answers
8k views

How to update product qty and Stock Status update programmatically by product id : Magento 2

I want to update product qty and change Stock Status as in stock by programmatically by product id. I dont want to insert new product, but I want only update existing product by its id. Any one know ...
Chirag Parmar's user avatar