Questions tagged [stock]
Denotes questions related to stock management and configuration on Magento
498
questions
0
votes
1
answer
18
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 "...
0
votes
1
answer
30
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 ...
0
votes
0
answers
21
views
Magento 2.4.3 - How to show out of stock on group product
We have an issue where a group product does not show "out of stock" status when one or more associated products are out of stock.
When you are on the category page, the group product that is ...
0
votes
2
answers
28
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 ...
1
vote
0
answers
28
views
Filters don't hide out-of-stock products
I have a couple of custom filters, size and warehouse availability. When I select for example, size "XS" and "Warehouse1" I still see the product in the catalog that has size XS in ...
0
votes
0
answers
19
views
Magento 2.4.3 - Stock is not going to 0
we have an issue where stock does not go to 0, so if a customer buys something E.g. that has 1 left, the stock does not go to 0. The same happens if there are 5 left and the customer buys 5 it does ...
0
votes
2
answers
120
views
How to get Product Salable quantity by productId in magento2
How to get product salable qty by productId?
0
votes
1
answer
21
views
Custom Warehouse
By Default Magento using Total Stock warehouse. I want to use my warehouse for all my products . I am currently using my custom warehouse, But some times it shows the magento by default warehouse.
1
vote
0
answers
37
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 ...
1
vote
0
answers
18
views
Correct way to call an object based on quantity, for displaying a product-alert, when backorders are allowed
I am trying to modify the following file in Magento2
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\ProductAlert\Block\...
2
votes
0
answers
73
views
Show product alert link /stock alert, when a product is quantity zero, but still in stock
I am trying to add the "notify me when product is back in stock" link to a product that is still "in stock" but with a quantity of zero.
Is this possible by modifying the module ...
0
votes
1
answer
47
views
Product stock quantity is reducing automatically before shipment
How the product stock quantity is decreasing automatically in magento2 before shipment(not saleable quantity)
0
votes
1
answer
61
views
Getting the minimum qty allowed in a shopping cart without deprecated methods
Previously to get the minimum qty allowed in a shopping cart I would use the following code:
public function __construct(
\Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry
){
...
0
votes
2
answers
533
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\...
0
votes
0
answers
80
views
Magento 2 "out of stock" label on product page
I need to add “out of stock” string next to product option when product are out of stock on this list. Can someone help me?[
0
votes
0
answers
46
views
Magento 2.3.2. How can I add the stock quantity column to the 'Related Products' admin grid?
Basically, I want to add related products that are in stock, rather than those that aren't, so
I am looking to add the stock quantity column to the related products grid on the admin side in order to ...
0
votes
1
answer
55
views
Magento 2 swatches
I'm not good at Magento coding, so bear with me. I want to expose swatches for products with quantity 0 in the product list (changing the text with a ligther color with CSS for example)
example:
I'm ...
0
votes
0
answers
19
views
Add bcc to back to stock alert notification
I am struggling to add bcc to back in stock alert notification.
I would like the mail to be sent to customer and bcc admin.
I've tried adding the addBcc part but did not work.
Mage::getModel('core/...
1
vote
1
answer
469
views
Checkout cart error: The requested qty is not available
I'm using Magento 2.4.4, clients reported issues with the items in the cart, and I'm able to simulate by having two carts in different clients' accounts with the same item that has 1 item in stock.
...
1
vote
0
answers
514
views
Programmatically update Stock Status Magento 2
I am trying to update Stock Status when the quantity is updated. Either from admin or web API (rest).
app/code/Namespace/Module/etc/events.xml
<?xml version="1.0" ?>
<config xmlns:...
0
votes
1
answer
299
views
Property "Qty" does not have accessor method "getQty" in class Magento\InventoryApi\Api\Data\SourceItemInterface
I get this error:
[2022-03-24 11:32:10] main.CRITICAL: Report ID: webapi-623c56baea1fe;
Message: Property "Qty" does not have accessor method "getQty" in
class "Magento\...
0
votes
0
answers
127
views
Extend API V1/products to put the not available products at the end
I want to display out of stock products at the end of the V1/products response.
So far I tried to create a plugin on Magento\Catalog\Api\ProductRepositoryInterface to override the getList method but ...
0
votes
1
answer
200
views
Where is the "notify me when in stock" data saved in which table?
Hi I am trying to see where is "notify me in stock alert " data saved to which table.
Moreover, default Magento customer profile should include the item alert list or not?
0
votes
1
answer
163
views
isSaleable product save
Use Case
From a product with quantity 0 and Out of stock status.
I have an event
<event name="catalog_product_save_after">
<observer name="stock_alert" instance="...
0
votes
1
answer
161
views
Magento 2: How to get cart items and its stocks using custom API?
I'm learning Magento 2 API. I need to create a custom API to get cart items and its stocks. I can see there is an API available to get cart items in Magento by default which is the below
GET V1/carts/...
0
votes
1
answer
152
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 ....
1
vote
1
answer
2k
views
"The requested qty is not available" not always shown?
Magento 2.4.2
Lets say I have a qty of 1 for product X. Now when I try to put a qty of 10 of product X to the cart, the message "The requested qty is not available" is NOT shown. Nothing is ...
0
votes
1
answer
37
views
How to retrieve updated stock quantity after modifying source item repository?
I am trying to add stock quantity dynamically and use the current stock quantity for adding the product to the cart. The stock quantity gets updated successfully, however the ProductRepository keeps ...
0
votes
0
answers
130
views
Magento Product Stock status changes automatically
We are facing an issue with Magento 2.4. We are using MSI and we have 3 warehouses. All products have been assigned 3 warehouses and we manage stock using MSI. A product can be available in one ...
0
votes
1
answer
152
views
Manage stock needs to be set per store
Situation:
Magento 2.4.2 p1 (but was also like this on earlier versions)
We have Magento multistore.
So example.
I create a configurable product from our imports (Emagic manager).
I set ‘manage stock’...
2
votes
3
answers
395
views
How to save stock attribute value ('qty') for a product with Magento 2 objectmanager?
I've found out how to do this with other attributes.
For example a custom 'location' attribute:
$product = $this->objectManager->get('Magento\Catalog\Model\Product')- >load($post['id']);
...
2
votes
4
answers
2k
views
Magento 2.4.4 - Unable to place order: There are no source items with the in stock status
I assume that the client couldn't proceed with items in the cart that aren't in stock, but even with a clean Magento installation, it's happening.
How could I solve or find the reason for this issue?
0
votes
1
answer
101
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 ...
0
votes
2
answers
228
views
Magento 2 Stock Status
This question has been answered for Magento 1. (see: here).
As I am migrating to Magento2 and need the same logic here is the issue:
I am trying to figure a way to hide show stock status/availability ...
1
vote
1
answer
564
views
Where Inventory_stock_% table get updated in Magento 2?
The problem I'm facing is that
The table Inventory_stock_13 used for the 2nd website is updated incorrectly.
When set source status to Out of stock, column is_salable is still 1 and quantity is ...
0
votes
1
answer
3k
views
The stock item was unable to be saved. Please try again
I'm running a custom import.
At some point the error: The stock item was unable to be saved. Please try again.
Is triggered by : $this->_productRepository->save($prod);
Now I'm trying to figure ...
0
votes
1
answer
21
views
Stock set to zero after sale
Magento 2.4.2
For some reason product stock is being set to 0 after an order is placed, regardless of quantity previously in stock or quantity ordered.
What could be causing this?
How can I debug ...
0
votes
1
answer
19
views
Magento 2.3.6 - Stock do not go from 1 to 0
We have Magento 2.3.6 and MIS is disabled.
So we have an issue when products are sold from any number down to 0 it does not decrease at all.
E.g. if we have 10 left of a product and someone buys 10 ...
0
votes
1
answer
69
views
Why the massive product update via admin isn't working?
I'm just updated all my 12k products via admin massive action, I changed the stock status to in stock, but it's not running.
How could I force it to run and fix it the next time?
0
votes
1
answer
466
views
Magento 2 How to restore stock after cancel order
I am working on Magento 2.3.5 p-1
I have created a custom module that adds a mass action to the sales order grid, through a controller this action changes the order status to "customCancel" ...
0
votes
2
answers
150
views
Get all stock quantities given one product
These are the stocks I have
On my export this is what i'm getting, as you can see (for re and re_pro which belong to the same website) the quantity is fine , but the salable qty is a merge of both; ...
0
votes
1
answer
642
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 ...
0
votes
1
answer
635
views
Magento 2.4 - Stock Alerts not showing
I can't figure out why, buy products alerts aren't showing.
here's my config;
Would anyone have any suggestions?
0
votes
1
answer
490
views
How to get stock quantity for a given product_id
Does anyone know how to get StockItem by product_id in Magento 2.4.x? We have the following code that works most of the time, but sometimes it throws the following error: "The stock item with the ...
0
votes
1
answer
228
views
Magento 2.4.2 stock wrong on productpage
I have installed magento 2.4.2 community edition as multistore. The configurable products are uploaded with a csv from the supplier.
On the page with all products I get the right message that the ...
1
vote
1
answer
115
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 ...
1
vote
1
answer
1k
views
Magento 2.4.1 Move Out of Stock In last Of Category Listing
I want to move out of stock product in last of the category listing, itried below code but same seems not working.
app/code/Meetanshi/StockQuantity/etc/module.xml
<?xml version="1.0"?>
...
1
vote
3
answers
927
views
Display Out of Stock Products in the End on Category Pages - Magento 2.4.0
I want to display all out of stock products in end on category pages, I have tested few solution which is mentioned on Magento stack exchange, But no one is working for me. Anybody can help me ...
2
votes
1
answer
3k
views
Magento2: Product Stock Bulk Update API
I'm looking for the bulk variant of the product stock update API
/rest/default/V1/products/{productSku}/stockItems/{itemId}
Objective:
I want to update quantities of multiple products in one API call
...
0
votes
0
answers
141
views
Stock issue - Magento 2.3
We have an issue, not anything major, more like an annoying issue, and we do not understand why.
One of our stores has low stock, so if we have 1 left and someone buys it, in Magento admin, it shows ...