Skip to main content

Questions tagged [stock]

Denotes questions related to stock management and configuration on Magento

Filter by
Sorted by
Tagged with
0 votes
2 answers
30 views

How can I adjust Saleable Quantity in bulk in Magento 2.4.7

I am using emagic one to import 35,000 products into a new instance of Magento 2.4.7. The import goes well, with all product fields and images imported. The issue that I have is that "saleable ...
Jim Edgar's user avatar
0 votes
1 answer
26 views

How to Move Out of Stock Products to the Bottom and Available Products to the Top in Magento 2.4.7

How to Move Out of Stock Products to the Bottom and Available Products to the Top in Magento 2.4.7 After Magento 2.4.7 update Out of stock products appeared at the top of the page, and the customer ...
mdm95's user avatar
  • 25
1 vote
1 answer
52 views

Magento 2 : Product showing out of stock but In stock in admin

I have use Magento 2.4.6-p5 version. We have some products in our inventory that are in-stock in the backend but showing out-of-stock in frontend. If I make a product out-stock and then back to in-...
Marcel Michael's user avatar
0 votes
0 answers
16 views

Failed Order Payment Not Reverting MSI Inventory Quantity in Magento 2

I'm experiencing an issue with my Magento 2 website concerning inventory management using Multi Source Inventory (MSI). Whenever there is a failed transaction via a specific payment gateway, the ...
Alku's user avatar
  • 1
0 votes
0 answers
15 views

Configurable child products show as backorder on order confirmation

I have a lot of configurable products on my site and have a problem and that is: When a customer places an order of a child product of a configurable product the order confirmation show the child ...
Kasper Elund's user avatar
1 vote
1 answer
32 views

Adding items to the basket when fewer are available

We are looking to solve a problem with Magento 2.4.6 (version probably irrelevant). We have multiple configurable products available for sale and customers will place orders for big quantities of the ...
Oracle's user avatar
  • 11
0 votes
2 answers
104 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
0 answers
22 views

Best practice for dealing with lost packages during shipping

Using: Magento 2.4.6 Hyva magento2 default theme: 1.2.3 Subject: What is a good way to handle lost packages during shipping? Situation is as follows: Product gets paid. Product is shipped to customer ...
JanosDjango's user avatar
0 votes
1 answer
290 views

Out of stock product visible on storefront. After updating the product programmatically

I'm working on integration, where I'm updating a product stock. But Whenever I set product stock to zero the product gets out-of-stock(as intended) from the backend but is still visible on the ...
Anurag's user avatar
  • 5
1 vote
1 answer
639 views

Magento2.4: How to assign a new source to stock programmatically?

I am trying to assign new sources to stock but it's not working. I checked the logs and there is no error found. Below is my code. Can anyone please check and suggest me where am I wrong? public ...
MagentoDev's user avatar
0 votes
0 answers
50 views

SQL Error when importing stock csv

Since we have updated to magento 2.4.6 when we want to import stock via csv we now receive an error. systemException Additional data: SQLSTATE[42000]: Syntax error or access violation: 1064 You have ...
Michael's user avatar
  • 303
1 vote
1 answer
100 views

Magento 2.4.3 - Grouped/bundle product out of stock when one or more child items is out of stock

How can I make grouped/bundle products out of stock if one or more child products are out of stock?
Jan-petter Havna's user avatar
0 votes
1 answer
31 views

Magento 2.4.3 - Translation Issue

I'm trying to translate "Availability %1" to "På lager: %1" and this happens. Does anyone know why this happens?
Jan-petter Havna's user avatar
0 votes
1 answer
202 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
199 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
103 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
2 votes
0 answers
52 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 ...
Захар Joe's user avatar
1 vote
0 answers
26 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 ...
Jan-petter Havna's user avatar
1 vote
2 answers
844 views

How to get Product Salable quantity by productId in magento2

How to get product salable qty by productId?
Alshihab's user avatar
  • 161
1 vote
1 answer
24 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.
Rana Zain's user avatar
  • 678
1 vote
0 answers
42 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
1 vote
0 answers
29 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\...
JanosDjango's user avatar
2 votes
0 answers
136 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 ...
JanosDjango's user avatar
0 votes
1 answer
478 views

Product stock quantity is reducing automatically before shipment

How the product stock quantity is decreasing automatically in magento2 before shipment(not saleable quantity)
Alshihab's user avatar
  • 161
1 vote
1 answer
357 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 ){ ...
Goose84's user avatar
  • 2,621
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
0 votes
1 answer
120 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 ...
kray's user avatar
  • 3
1 vote
1 answer
1k 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. ...
Rafael Corrêa Gomes's user avatar
1 vote
0 answers
652 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:...
puntable's user avatar
  • 528
0 votes
1 answer
660 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\...
Greg's user avatar
  • 2,739
0 votes
0 answers
160 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 ...
darkmatterantearth's user avatar
0 votes
1 answer
610 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?
Paul Fan's user avatar
  • 658
0 votes
1 answer
249 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="...
Claims's user avatar
  • 1,211
0 votes
1 answer
316 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/...
MagentoDev's user avatar
0 votes
1 answer
278 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
2 votes
1 answer
3k 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 ...
user4095519's user avatar
0 votes
1 answer
51 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 ...
Bartu's user avatar
  • 1
0 votes
0 answers
180 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 ...
OBAID's user avatar
  • 279
0 votes
1 answer
272 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’...
Emile's user avatar
  • 101
2 votes
3 answers
669 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']); ...
IvoJongmans's user avatar
2 votes
4 answers
3k 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?
Rafael Corrêa Gomes's user avatar
0 votes
1 answer
136 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
2 answers
383 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 ...
RoboxFuze's user avatar
  • 119
3 votes
1 answer
1k 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 ...
Long Nguyen's user avatar
1 vote
1 answer
5k 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 ...
Claims's user avatar
  • 1,211
0 votes
1 answer
44 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 ...
William Oakley's user avatar
0 votes
1 answer
20 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 ...
Jan-petter Havna's user avatar
0 votes
1 answer
157 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?
Rafael Corrêa Gomes's user avatar
0 votes
1 answer
862 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" ...
Noty's user avatar
  • 76
0 votes
2 answers
261 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; ...
Claims's user avatar
  • 1,211

1
2 3 4 5
11