Questions tagged [quantity]

Questions related to products or inventory quantity or stock

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

Show Quantity on product page (configurable product)

I currently try setting up configurable product for our store, for example we sell a laptop with 3 grading A / A- / B and each grading has its own quantity and price. When setting the correct price / ...
Omar Mohamed's user avatar
0 votes
1 answer
20 views

pre order on the category page

How to change the label of add to cart to pre order on all magento 2.4.5 based on the below conditions: if(qty<0 , product is salable and getBackorders()/true ) to show pre order else add to cart. ...
L.A's user avatar
  • 1
0 votes
1 answer
37 views

Magento 2 Add Quantity Dropdown and to show Textbox when Quantity selection is 10 from dropdown at Cart Page

I want to add dropdown of 1 to 10 of quantity at cart page and if customer choose the 10 from quantity dropdown then the textbox appears for quantity field. please help me. thank you.
Jantar Mantar's user avatar
0 votes
0 answers
16 views

Get salable quantities for all products via REST API

For synchronizing inventory levels with the external ERP, I need to know the quantities and booked quantities of all products. I can easily get quantities of all products with one request (rest/all/V1/...
Alex's user avatar
  • 101
0 votes
0 answers
6 views

Get salable quantities for all products via REST API

For synchronizing inventory levels with the external ERP, I need to know the quantities and booked quantities of all products. I can easily get quantities of all products with one request (rest/all/V1/...
Alex's user avatar
  • 101
0 votes
0 answers
23 views

function returns quantity in magento2

I'm writing a function that returns quantity when an order is canceled by cron but I don't know how it works. Can anyone help me? Thank you.
hau's user avatar
  • 41
0 votes
2 answers
69 views

Magento 2 show current stock for salable quantity on productpage

I have this code for showing if my product is in stock or not. <?php /* @var $block \Magento\Catalog\Block\Product\View\AbstractView */?> <?php $_product = $block->getProduct() ?> &...
Kasper Elund's user avatar
0 votes
2 answers
67 views

Magento 2 Salable Quantity did not set when create product or edit product

I have created one Product and when I save this Product or else Edit this Product, the Salable Quantity is not set. You can get references using the below image. https://i.imgur.com/osAZIqc.png https:/...
Keval Chauhan's user avatar
1 vote
0 answers
17 views

Cart Price Rules - Quantity in cart equals or greater than 10 (from a same category, but with different sku's)

We face an issue here. We want to create a 5%, 10%, and 15% rebate when customer add 5, 10, or 15 units of a same category. It work well, until magento dont advise that the condition "Quantity in ...
Manuel Bisson's user avatar
0 votes
0 answers
26 views

Update product quantity after place an order with my own Observer event

I have created a new Observer event where I check sibling products. Sibling product are products with same pid. After placing the order, I would like to reduce the quantity of siblings of the product ...
beata's user avatar
  • 1
0 votes
1 answer
468 views

Magento 2 - Get cart item qty change in Javascript

I have a javascript file that loads when the page loads. This file defines two variables (one for the shopping cart items and one for the count). This script also contains a subscribe that fires ...
JamesS's user avatar
  • 101
0 votes
1 answer
32 views

Product Quantity After Order Placement on Success Page

I want to get the item quantity which was before Placing the order. Like before I place an order, the product quantity was 10. I ordered products with quantity 2. But when I get the stock quantity on ...
Jasvir Singh's user avatar
0 votes
1 answer
167 views

Saleable quantity is empty even though quantity is showing admin

Right, here is a strange one we are using magento 2.4.2 and stock in the channel to import product data (if any one is aware of them) for some strange range we ever we ever we run the import the "...
shafiq's user avatar
  • 295
0 votes
1 answer
172 views

how to get product quantity in observer

I'm working on magento2.4 .Need to get the quantity of the product in product save after observer. while get qty it always returns null for newly created products. Note:qty shows correctly for ...
Jothi Subramanian's user avatar
0 votes
2 answers
422 views

How to avoid using Salable quantity in magento 2

I am using magento 2.4.2-p1. My site is using Salable quantity functionality. I don't want to use salable quantity and turn this feature off. I only want to use Default quantity. How can i do that. ...
Nicola Smith's user avatar
0 votes
1 answer
29 views

How to multiply the quantity of the added product by 2 by clicking the add to cart button through the plugin?

How to multiply the quantity of the added product by 2 by clicking the add to cart button through the before plugin?
Eugene Morrison's user avatar
0 votes
1 answer
286 views

Increasing and decreasing the input quantity using Hyva / AlpineJS

I'm working on the input using Hyva, so with AlpineJS. I would need to understand how I have to do to make the input look like in the image using the + and - to increase or decrease the quantity.
Alessandro Scalesse's user avatar
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
0 votes
2 answers
3k views

Salable quantity won't update from 0 in Magento 2.4.4

I'm trying to update product quantities when something sells or is revised on another selling channel. I have a platform notification which is received, and everything works fine except when I'm ...
Swappart's user avatar
0 votes
2 answers
347 views

Magento 2 : product quantity increasing automatically

I am using magento 2.4.1, the issue is randomly my product's quantity is increasing, it automatically increments the quantity after some time. I tried to keep eye on few products and found that each ...
quickshiftin's user avatar
1 vote
0 answers
24 views

show caution text if customer insert larger quantity

If a customer inserted a quantity that is larger than the quantity of selected store echo text below the input type [qty] that says "The requested qty is larger than the quantity on this selected ...
Bayzel's user avatar
  • 187
4 votes
2 answers
8k views

How to update product salable quantity in Magento 2.4 programmatically?

I am trying to import products programmatically into a Magento 2.4.4 installation but I have problem setting the Salable Quantity. I cannot find a viable solution to this issue, please help if you can....
jfeid's user avatar
  • 43
0 votes
1 answer
250 views

Magento 2 selected quantity to different line of item

I am working with the Magento configurable product, in my requirement I've config & simple product, while customer added a 5 quantity of the config product with one custom option, then the 5 ...
senthil's user avatar
  • 1,729
1 vote
1 answer
25 views

I wanto to make the qunatity of products in a dropdown

My qunatity/Qty on Product page i simple a text field. I want to change it into a drop-down.
Magento Inquiry's user avatar
1 vote
1 answer
3k views

Magento 2 Product Salable Quantity shows 0 even if Qty is greater than 0

The products Salable Quantity of Simple products shows zero(0). But its Quantity is greater than zero (>0). Due to this product swatches are not showing correctly on the front end. Magento admin ...
IntraPersonalLearner's user avatar
1 vote
1 answer
310 views

Error message "Some of the products are disabled" on checkout

I am facing a very strange error message on checkout level on our Magento 2.4.4 instance with products with quantity below 1 and this only for customer group "Not logged in" When checking ...
Ben's user avatar
  • 141
1 vote
2 answers
1k views

Magento 2 - How to find all products with Salable qty as 0 via SQL query?

Is there a simple SQL query I can run to find any ENABLED product in Magento that has a salable quantity which is 0? We have thousands of products and in the back end product grid we can sort and ...
jvb8's user avatar
  • 23
0 votes
1 answer
267 views

Magento 2 - Getting wrong quantity from a simple product

I've only recently started working with Magento and developement in general, so I am new at this. I need a (simple) product's quantity for some custom logic. But I don't know how to get it into my ....
kray's user avatar
  • 3
0 votes
1 answer
273 views

Magento 2 : Get Global Max Allowed Quantity

How can I get global max sales qty in cart page.
sara ben's user avatar
0 votes
0 answers
147 views

Magento 2: How to implement decimal quantity with round off

How to use quantity in decimal, I know Magento has this feature by default. But I want to make this decimal quantity to round off feature. for example 0.1, 0.2, 0.3 if any user put 0.15 it should ...
ishaq's user avatar
  • 195
0 votes
2 answers
315 views

Ajax Add to Cart validation - When customer add more products to cart than the stock quantity is available in Product

When user is adding/increasing quantity than how to we can restrict him ? He can't add/increase quantity more than available saleable quantity. How to we can apply validation for display error message ...
Wajahat Bashir's user avatar
0 votes
1 answer
17 views

getCartQty code location

in Magento in Magento\Quote\Model\Quote\Item\Processor.php $candidate->getCartQty() is fetching wrong quantity for some products. I searched the whole codebase for "getCartQty()" and I ...
Mounir Semaan's user avatar
2 votes
1 answer
494 views

Magento 2 place order error

I am getting below error in place order with "google pay" [2021-06-30 12:00:06] report.CRITICAL: Error message {"exception":"[object] (Magento\Framework\Exception\...
devhs's user avatar
  • 497
1 vote
0 answers
1k views

Magento 2 : The requested qty is not available

While applying shipping using "/V1/stripe/payments/apply_shipping" api call, if the product's (simple product of config) product qty is 1 exact then it falls into below condition in file. ...
devhs's user avatar
  • 497
0 votes
0 answers
143 views

How to double the items in the cart by updating the quantity in the product cart page?

Double the value in the cart by updating the quantities.
kks's user avatar
  • 19
0 votes
1 answer
652 views

How to set a default quantity in Bundle Product

Here I am trying to pre-populate bundle product quantity in bundle edit page. I tried to add a default value but its not working. here my code sample. /vendor/magento/module-bundle/Ui/DataProvider/...
Praveen Negimani's user avatar
0 votes
1 answer
911 views

Salable Quantity is greater than quantity with some products

on some cases my salable quantity is greater than my quantity, not for all product but for example to 10 products on 1000. I could not figure out why, I also tried to delete the product and insert it ...
vortex's user avatar
  • 1
0 votes
1 answer
554 views

how to get child item object while adding to cart?

I wanna put customize the code with qty while adding to cart product. For that I have created Plugin Magento\Quote\Model\Quote\Item and used addQty() method,but in this method I call quoteItem object. ...
Niraj Patel's user avatar
0 votes
1 answer
337 views

Decimal quantity products price

We are selling fabrics, I want the quantity to be by meter price, like decimal numbers. For example a client can order 0.1 m; 0.2m ; 0.3m; 0.4m; 0.5m etc.. If the client orders 0.15m it will transform ...
ishaq's user avatar
  • 195
0 votes
1 answer
104 views

Magento Saleable quantity not reflecting

Here is an interesting one. All the id numbers were created at the same time but the highlighted ones have both been disabled so should have a '0' for saleable quantity? The one highlighted at the top ...
user3313215's user avatar
0 votes
0 answers
146 views

Magento 2.3.2 CE Inconsistent stock status. "In Stock" when OOS and vice versa

I am having some odd inconsistencies with Magento 2.3.2 when it comes to "Quantity_and_Stock_Status". I would like to add this to my layered navigation so customers can filter out the OOS ...
Andy's user avatar
  • 57
0 votes
0 answers
228 views

I want to add qty filter same as price filter in layered Navigation in Magento 2

In this i want to develop functionality in which qty filter is added and in that range is displayed in layered navigation as price filter. qty range as below: 1 - 50, 50 - 100, 100 - 150, ... so can ...
Deep Shah's user avatar
  • 565
1 vote
1 answer
344 views

Stock quantity change API

I want to change quantity number on specific product after payment receive. And after that I reveave 400 error. Is it possible to change the stock quantity? Or Am I doing something wrong? I try to do ...
Jan Legner's user avatar
0 votes
1 answer
133 views

Quantity Change Event is inventory killer

Such unattended automatic quantity change events are a big hit on the SB inventories. Say you have handles 1,000 e. and your magento is synced to Quick Books for daily sales reporting. Magento ...
Josh Unal's user avatar
1 vote
2 answers
225 views

Increment/decrement buttons on category page without refeshing

I want to add increment and decrement buttons for quantity on catalog page without refreshing the page Pease help!
Toranto mina's user avatar
0 votes
1 answer
69 views

Salable quantity in magento 2.3.3

How can i make Quantity and Salable quantity having same value in magento 2.3.3. https://prnt.sc/xf5mlb Here it is showing different Please help
Nafsss's user avatar
  • 760
0 votes
2 answers
358 views

Magento 2 - Product with Multiple Options with Quantity

I'm basically trying to have a product(t-shirt) with multiple sizes with its own quantity. Like this; Is there any extension or tutorial to do this please?
Thowzif's user avatar
  • 82
0 votes
2 answers
486 views

how to get product quantity in magento 2.3 in phtml file

I am using Magento 2.3 , in my case I want to test if a product has a quantity greater than or equal to 0 in the list of all product page, to add a message a customer, but I wonder how to get it, for ...
coding mv's user avatar
  • 129
0 votes
0 answers
718 views

Magento 2 Notice: Undefined index: quantity

I'm not sure if anyone can help? I've been trying to solve this problem for some time and I've narrowed it down. I am currently having a problem when disabling a product in Magento 2. When I disable a ...
Adam Gill's user avatar
3 votes
1 answer
2k views

How to get product Quantity in Magento 2

I need to retrieve product quantity, I found that, the interfaces we used before to get product quantity are deprecated, these are: \Magento\CatalogInventory\Api\StockStateInterface $stockItem And, \...
Ajwad Syed's user avatar
  • 1,591

1
2 3 4 5
7