Questions tagged [stock]

Denotes questions related to stock management and configuration on Magento

Filter by
Sorted by
Tagged with
0 votes
2 answers
21 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
1 vote
0 answers
11 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
15 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
49 views

How to get Product Salable quantity by productId in magento2

How to get product salable qty by productId?
  • 131
0 votes
1 answer
16 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.
  • 348
1 vote
0 answers
33 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,722
1 vote
0 answers
15 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
47 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
25 views

Product stock quantity is reducing automatically before shipment

How the product stock quantity is decreasing automatically in magento2 before shipment(not saleable quantity)
  • 131
0 votes
1 answer
22 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 ){ ...
  • 2,479
0 votes
2 answers
204 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
67 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
35 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 ...
  • 25
0 votes
1 answer
31 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 ...
  • 3
0 votes
0 answers
17 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
297 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
383 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:...
  • 448
0 votes
1 answer
176 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\...
  • 2,809
0 votes
0 answers
33 views

Stock sources as filters layered navigation

I'm quite new to Magento2 so correct me if there is anything unclear or impossible to do. We have different stock sources (stock for Europe and for the UKs). I would like our customers to be able to ...
0 votes
0 answers
184 views

Magento 2: Stock status for configurable product is general for different stores

I tried to find any solution but with no luck. I have a multi-store website that sells products in UK, FR and DE, and we use Default source - for UK, FR, and DE stores. Problem is that when I create ...
0 votes
0 answers
94 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
117 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?
  • 572
0 votes
1 answer
110 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="...
  • 954
0 votes
1 answer
106 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/...
  • 502
0 votes
0 answers
29 views

Change value of csv column before importing in magento stock

We can import stocks into our Magento warehouses automatically. For this from supplier we need a csv file. We can import the file direct from ftp or an url. We can also import local file on our server....
  • 101
0 votes
1 answer
88 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 ....
  • 3
1 vote
1 answer
928 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
0 answers
11 views

Magento 2 wrong tax calculation frontend plus able to order quantity what isn't in stock

Look: Where you see tax, but it should be 21% = €24,36 and this shows €26,77 Also in backend the order shows 30% while the calculation isn't Look: And second, The quantity of this product in stock ...
0 votes
0 answers
32 views

Product cost price

Simple question. If I add a cost price to the simple product. (I'm taking cost and not wholesale price) does it affect anything the customer sees on the front end Does it affect the price the ...
0 votes
1 answer
32 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 ...
  • 1
0 votes
0 answers
103 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 ...
  • 269
0 votes
1 answer
93 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’...
  • 101
0 votes
0 answers
359 views

Bundle product shows out of stock in frontend : options and selection do not match

I have a magento with multiple store. I created from the backoffice a bundle product with 2 options containing each one 3 selections of items This product appears as out of stock in my store frontend. ...
  • 954
1 vote
3 answers
234 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']); ...
1 vote
4 answers
1k 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
80 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 ...
  • 5
0 votes
2 answers
140 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
377 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
2k 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 ...
  • 954
0 votes
1 answer
20 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
40 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
327 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" ...
  • 66
0 votes
2 answers
123 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; ...
  • 954
0 votes
1 answer
480 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 ...
  • 1
0 votes
1 answer
503 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
289 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
179 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 ...
  • 3
1 vote
1 answer
66 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
906 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
2 3 4 5
11