Questions tagged [qty]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
1answer
10k views

Magento 2.3 Saleable stock qty does not equal Global Attribute Qty

I have a simple product,(one of many), that is linked to a configurable product. I'm trying to get the salable quantity and attribute quantity to match. The site is in a dev env, so I don't think ...
4
votes
3answers
5k views

Magento 2.3 : How to set qty for multiple sources (Multi source inventory) programmatically

I have a site with 3 inventory sources. I want to add and update product inventory to each source by product sku. Please help me
4
votes
4answers
952 views

Magento 2 Product quantity showing empty on Update Product details page

Step to reproduce Add product to cart Go to cart page Click on Edit item parameter. Qty box value empty. Any help would be appreciated!Thanks.
4
votes
1answer
129 views

Magento 1 : How to disable product price update on the front-end when changing a product Qty

I want to disable the price update with qty. In default magento price calculation is "Product PriceXQty". I want to disable it and total price in the cart is product price only.
3
votes
3answers
4k 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.
3
votes
2answers
6k views

Magento 2.3 : Getting qty from all assigned sources (Multi warehouse inventory) programmatically

How to get qty from all assigned sources (Multi warehouse inventory) programmatically i.e sources and corresponding quantities.
3
votes
2answers
1k views

Magento : Show same product as separate in cart

I have products with different custom options. When a same product with same custom options is added to cart twice, it appears in the cart as 2 X qty Please refer the image I want to display it as ...
3
votes
2answers
399 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 ...
3
votes
1answer
587 views

Magento : Get Quantity of Added Product in cart_product_add_after Event

I need to get quantity of product being added NOT quantity of that product in cart. E.g. I am on product view page and set quantity to 5 and click on "Add to Cart". I need to get that quantity in ...
3
votes
4answers
5k 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 ...
3
votes
2answers
3k views

Magento 2 Rest Api get Products List including qty field

I am trying to make an api call to get a list of products. I am using searchCriteria to filter the products collection. The following information of the product is needed: -sku, name, id, price, ...
3
votes
0answers
1k views

Magento 2 : How to Update Price After Changing Qty On Cart

How to update price after qty changed by dropdown in magento 2. I changed qty input type to dropdown like below code in default.phtml: <td class="col qty" data-th="<?php echo $block->...
2
votes
3answers
8k views

How to get product QTY on product view page?

I'm trying to get the quantity of the products in this file below, using $_product->getQty() but doesn't get, is returned NULL. design/frontend/MyCompany/MyTheme/Magento_Catalog/templates/product/...
2
votes
1answer
3k views

How to extend sidebar.js to perform action on Qty change in Minicart Magento 2

I added a text field Box in minicart that need to perform some calculation on keyup to update Qty. I Added box field by modifying module-checkout/view/frontend/web/template/minicart/item/default....
2
votes
2answers
569 views

Magento 2: after get qty its show zero always [closed]

After get qty its show zero always Magento2
2
votes
1answer
1k views

Magento 2 : Add to cart qty validation

In default Magento 2 Why "e" is allowed to be entered and no any other letters in Qty textbox, It should allow only numbers.
2
votes
0answers
131 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 ...
2
votes
0answers
685 views

Mageto 2.3. How add Qty & increment and decrement for Product page and category page and widget

I am just sharing variant how i added increment and decrement for Product page and category page and widget I have created it in my custom theme into module Magento_Catalog. You should create file: ...
2
votes
1answer
381 views

How to add Qty Input to product list WIDGET

How can you add Qty Input to product list Widget in Magento 2. (not the the product list page as described here) I have added a product list widget to a CMS page like by clicking on the insert widget ...
2
votes
0answers
25 views

QTY box validation

I want to set a validation to use only English keyboard number on QTY box in product page magento 2.1 I mean that with any keyboard press 3 it use English keyboard not for-example Arabic keyboard
1
vote
3answers
8k views

Magento 2: Get qty of added product in cart

I want to get total quantity of product added in cart by product ID. I use \Magento\Checkout\Model\Cart class to get all items in cart. $items = $cart->getQuote()->getAllItems(); foreach ($...
1
vote
2answers
3k views

Magento 2 how to do minicart ajax update

Is there any way to update the mini cart with ajax without update button. I am using Magento 2.1.7 how to do mini cart ajax update when qty increment(+) and decrement(-) inside the mini cart, as qty ...
1
vote
1answer
2k views

How to get the Qty left in stock of a particular product in Magento 2

anybody can suggest me that how can i display the left quantity in stock of a particular product in product details page ?. I am using Magento 2.1.3.
1
vote
3answers
686 views

how to add negative qty product into cart in magento. 2

How to add a out of stock (less than 0 ) product in shopping cart in magento 2 In my backorders setting i have custom option as Allow pre-order when i select a custom option and saved a ...
1
vote
2answers
291 views

How to display stock quantity only for simple products?

I want to display stock quantity only for simple products. For that, I added some code and it's working fine for simple products. But the thing is it's also showing quantity for other types of ...
1
vote
1answer
1k views

How to restore items' Qtys for canceled orders

If an order is being canceled, its items should be restored into the inventory. How can this be implemented? Thanks
1
vote
2answers
1k 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 ...
1
vote
1answer
422 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
1
vote
1answer
212 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 ...
1
vote
1answer
300 views

Display quantity with "if conditions"

I use this to display the quantity of my products. <div class="availability-qty"> <?php if ($_product->isAvailable()): ?> <p class="availability in-stock"><?php echo $this-...
1
vote
1answer
520 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. ...
1
vote
1answer
957 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 ...
1
vote
2answers
281 views

Decimal of price and qty magento2.1

I have a problem in my customer panel myorder tab. In my order i see price 12,125.0000 and QTY: 5.0000 how should i remove decimal from them? it is just in my order and methods that i used is like ...
1
vote
1answer
106 views

Add to cart one product with different size at once in product listing page magento 2.3

I want my customers to add products with different size at once in the shop cart, is this possible ? can anyone help me ? please see attached screenshot: https://imghostr.com/F2QnsQgR
1
vote
2answers
2k views

Magento2: How to get product quantity and minimum quantity value?

In magento 2 how to get product quantity and minimum quantity value customly created modules?
1
vote
1answer
46 views

Can anyone help me to find the file from where i rename product QTY

How to find the file name and location in Magento 2? I want to rename the Quantity to Qty as you can see in the picture
1
vote
0answers
138 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
1
vote
2answers
243 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
1
vote
0answers
109 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 ...
1
vote
0answers
138 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 ...
1
vote
0answers
422 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
1
vote
1answer
191 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) ...
1
vote
0answers
29 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 ...
1
vote
0answers
330 views

Qty problem for bundle product Magento 1.9

I have one bundle product, and in that product default quantity is 1 But when am trying to add that product in cart getting this error This product is available for purchase in increments of 10 ...
1
vote
2answers
843 views

Magento 2.3.1 manage stock = no but showing only 0 left

I have turned on the feature in Magento that shows only x remaining when the stock is less than 5 which works fine. However on products that are set to stock manage = no, it's showing there's only 0 ...
1
vote
0answers
401 views

Magento 2.2.3: Unable to add more than 1 qty product in the cart

I've created a custom theme and wishlist page looks like this Product is getting added in the cart for qty 1. But when I set qty more than 1, I am redirecting to the product detail page. Here is my ...
1
vote
0answers
96 views

Magento2 : How Can I Update My Custom Fee While I Update Qty From Admin New Invoice Section

I have create one module to add custom fee to order product wise , for eg . 1 product = 10 , so 5 product = 50 , and custom fee is working fine in all section like checkout, order, Invoice now my ...
1
vote
1answer
132 views

Magento 2 - How to sell items separately or as a set?

We currently have a lot of items that we sell either as a full set or as individual items. For example say we have a product - Green Marbles. The individual sizes are small,med,large. Or a full set ...
1
vote
2answers
3k views

Magento 2: Show out-of-stock products in search results?

We have disabled out-of-stock products from showing on the frontend, but would like to override this for search results only. How would we accomplish this? Note: this store has thousands of products ...
1
vote
1answer
2k views

Set Individual Product's Minimum Qty Allowed in Shopping Cart for a particular customer group

I'm looking to setup a particular product with a minimum order quantity but only for a single customer group ("Wholesale"). Is there a way to do this using the core Magento 2 functionality? Barring ...