People who code: we want your input. Take the Survey

Questions tagged [stock]

Denotes questions related to stock management and configuration on Magento

Filter by
Sorted by
Tagged with
0
votes
1answer
2k views

Get quantity in stock for items added in cart in JS

I need the quantity available for each product in cart in my custom javascript file. Does anyone know how to do this?
31
votes
7answers
70k views

How to get stock quantity of each product in Magento 2

How to get stock quantity of each product in list.phtml in Magento 2 ?
0
votes
0answers
23 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 ...
2
votes
3answers
3k views

Magento 2 : We cant place the order : SQLSTATE[HY000]: General error: 1449 The user specified as a definer your_db_user@% does not exist

I have migrated a Magento 2 site to a new server and getting the below error when placing order We cant place the order : SQLSTATE[HY000]: General error: 1449 The user specified as a definer ...
0
votes
0answers
14 views

Order split based on product attribute reducing qty twice

I have integrated Magento 2 order split based on product attributes with help of this extension. https://github.com/magestat/magento2-split-order My plugin file is below. public function ...
0
votes
0answers
20 views

Magento 2.4 stock_item in /v1/products API

The stock_item seems deprecated in the Magento /V1/products endpoint there is some mentioned here: Magento 2: Get Product Stock status details in Rest API Magento 2: Rest API add "stock_item"...
1
vote
3answers
542 views

Where does magento subtract from stock when purchase is made?

Where does magento actually subtract from product stock when purchase is made? (v. 1.9) After many unreliable attempts to come up with a solution, I think the best option (reluctantly) will be to ...
0
votes
1answer
13 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
1answer
65 views

Catalog product and Stock index Error

I am getting this strange error while reindex, and I cannot find any solution on google or on stackoverflow. Stock index exception: SQLSTATE[42S01]: Base table or view already exists: 1050 Table './...
0
votes
0answers
7 views

Bypass inventory validation on a non-MSI store

For the last couple of weeks, I have been trying to find a way where a product is a backorder only on the main stores while being able to be freely ordered one store in particular. We cannot use MSI ...
0
votes
1answer
128 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
1answer
2k views

Magento 2: Change Product status OUT OF STOCK Programmatically

I need to change product as out of stock without changing its Quantity. I mean if a product having quantity 5, It will be same but product would be changed to OUT OF STOCK. Is it possible in magento?
0
votes
1answer
31 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 ...
1
vote
1answer
3k views

Notify for Quantity Below in Magento 2

I have a requirements to notify the admin through email when a product quantity goes below 5 in Magento 2.0.7. I have found that there is option on the admin: System > Configuration > Catalog > ...
0
votes
1answer
32 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
votes
2answers
2k views

Multiple products, different units, one inventory

The scenario is as follows: Product A, SKU 1000, sold as 1 roll of 1000 meters of cable, price 800 euro Product B, SKU 1000, sold per meter of cable, price 1 euro Those products should share the ...
1
vote
1answer
23 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 ...
0
votes
2answers
3k views

Display stock status on product detail page

I have searched a lot and since I am new to magento I would like your help. I want to display my stock quantity on my product details page. Can someone please give me a step by step configuration ...
0
votes
0answers
9 views

how to create controller to show product name and stock status (Available/out of stock) in magento?

I want to create a table to show stock status if all products. This table will contains following fields: => Product Name => Product SKU => Quantity => Stock Status (In Stock / Out of ...
2
votes
3answers
4k views

How to get stock quantity of configurable product in Magento 2

I am able to get all the available sizes of configurable product calling getJsonConfig() of below class Magento\ConfigurableProduct\Block\Product\View\Type\Configurable; But I need stock of ...
1
vote
1answer
2k views

How to manage stock in multi store website in Magento 2?

I am using Magento 2.1.4 I have created 11 website each with 2 or 3 store view in Magento under same admin. Now I want to enable "Manage Stock" options only for two websites. but it seems that this ...
0
votes
3answers
1k views

Prevent the quantity of inventory in the backend products is negative

I'm using Magento 1.7.0.2 and Magento 1.9.1.0. As we know, by default, Qty Inventory at the backend (Admin - Catalog - Manage Products - Edit - General - Inventory - Qty) may contain a negative value, ...
1
vote
1answer
1k views

Magento 2 product “packs”

I want to implement a store with many small products that are usually bought in bulk (maybe 20-100 pieces at once). So I want to implement product "packs", i.e. a "pack of 10" alongside a "pack of 50"....
0
votes
2answers
38 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 ...
0
votes
1answer
234 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
0answers
48 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 ...
0
votes
2answers
2k views

How to Trigger Stock Status Index?

We're using Mass Product Update in the admin, however, this doesn't trigger stock status. I can use observer once catalog_product_attribute_update_before is called, and manually trigger indexer there....
2
votes
1answer
2k views

Products incorrectly shown as out of stock - Magento 2.2.1

I have made a configurable product, with 4 associated configurations. My issue is that the product configurations are set with the right quantities, by the size of the product. But the product is ...
0
votes
1answer
31 views

How to allow Notify me when Product back in stock for Guests / not Logged-In users?

I want to notify to customer and guests, when products back in stock, But in magento this feature is working only for customers, who is register on my website, But i want allow to also guests and not ...
2
votes
2answers
192 views

Create a product with different colors (associated products) where each color shares stock with all other colors

Is it possible to create a product with different colors where each different color points to the same stock? For example, I have created a configurable product with a color attribute. After ...
1
vote
1answer
1k views

Magento 1.9 CE: configurable products stock alert

I sell t-shirts (configurable products) in three sizes (simple products). I have set: System > Configuration > Catalog > Allow Alert When Product Comes Back in Stock - Yes I have a simple product (...
0
votes
0answers
13 views

Remove Stock Status if Price = 0 in Magento 2.3

Is there a way to hide the Out Of Stock message for products with $0 as a price only? I realize that the saleable quantity can be hidden in Go to Stores > Configuration > Catalog > Inventory &...
1
vote
2answers
3k views

Product Repository Shows 'Requested product doesn't exist' After Setting is_in_stock = 0

I Have Loaded A Simple Product Using Magento\Catalog\Model\ProductRepository And Changed Its Quantity To 1 And Stock Status (is_in_stock) To 0, Using Function $productStock->...
0
votes
1answer
167 views

Magento 2.3 inventory inconsistencies

After 3 months of upgrading a Magento 2.0 to 2.3, I noticed many stock inconsistencies like items reserved and never removed, and the orders are closed. Why does it happen and how could I check it?
0
votes
1answer
38 views

Magento 2 stock status product page

Have used the following code to display the saleable quantity on my product page: How do I add the following? The $qty must be in bold? Quantity below 0 like -5 must be displayed as 0 because of ...
71
votes
8answers
58k views

Magento 2 How to unlock reindex process

I'm making some tests in Magento reindex process and I locked the stock index process. How can I unlock this process? Design Config Grid index has been rebuilt successfully in 00:00:02 Customer ...
0
votes
1answer
32 views

How to disable stock management for one of the assigned sources on a product? Multi Source platform setup

I am running a multi-source setup on Magento 2.3 platform. I create two different stock sources and assigned them to a product in my catalogue as such: I would like to disable stock management for &...
0
votes
0answers
15 views

Paypal order payment verification Stock

I use Paypal under Magento 1.9 and it happens once or twice a week that orders are in payment verification status. It lasts about 15 days. During this period of time the product sold is still ...
3
votes
4answers
3k views

Salable Quantity is greater than quantity

My salable quantity is greater than my quantity. How has this happened? I recently updated to Magento 2 and have been trying to get my head around the MSI but still can't figure out how salable ...
1
vote
1answer
89 views

How to ship Out of Stock products (backorders)?

How could I ship out of stock products (backorders)? I see the error: Not all of your products are available in the requested quantity. Thanks
0
votes
0answers
23 views

Magento 2: Some products are out of stock

I don't understand why some products are out of stock (they have quantity and are in stock). I imported an csv with all products. For some products the price is shown (they are in stock) and for some ...
0
votes
0answers
7 views

Group products and stock availability

We have a lot of grope products in our store. We want to see if there is possible to remove the "in stock" when one of the products is sold out. We have turned off so they are not able to ...
0
votes
2answers
112 views

magento 2 enterprice stock source export not working

Hi i am using magento enterprice when i tried to export stock source it below message showing Message is added to queue, wait to get your file soon but after consumer run getting error bin/magento ...
0
votes
0answers
33 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 ...
0
votes
1answer
159 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, \...
0
votes
0answers
60 views

Magento 2.4 MSI - get total stock on product page

In our previous Magento version, without MSI, we used the following code to display the total qty. $_product->getExtensionAttributes()->getStockItem()->getQty(); Sadly this does not work ...
0
votes
3answers
1k views

Cancel order and restore products stock qty

I'm using the following code to cancel programmatically some orders in my magento website: foreach($orderCollection as $order): $order = Mage::getModel('sales/order')->load($order->getId());...
0
votes
0answers
59 views

Default source and stock missing in MSI after re-enabled - Magento 2

We disabled all the below MSI extensions. Magento_Inventory Magento_InventoryCatalog Magento_InventoryAdminUi Magento_InventoryApi Magento_InventoryBundleProduct Magento_InventoryBundleProductAdminUi ...
0
votes
0answers
25 views

REST API is not updating the product stock quantity in Magento 2.3

REST API is not updating the product stock quantity. Request: https://domain.com/rest/V1/products/1004052/stockItems/361 BODY: { "stockItem": { "item_id": 361, "qty&...
0
votes
1answer
511 views

Proper way to update stock in >= 2.4?

I'm finding inconsistent documentation on how to update product stock for M2 2.4.1. Magento\Catalog\Model\Product::setStockData is documented in code to be deprecated and points to Magento\...

1
2 3 4 5
10