Questions tagged [inventory]

Denotes a question related to Magento inventory.

Filter by
Sorted by
Tagged with
9 votes
4 answers
4k views

Magento Observer Events - order of operations

I am attempting to inject functionality into the catalog_model_product_duplicate event. Part of this module will be to ensure that the stock status of the duplicated product is also duplicated; ...
philwinkle's user avatar
  • 35.8k
19 votes
2 answers
15k views

Detect inventory change

I need to detect whenever the inventory level of a product changes. I've had some success using the cataloginventory_stock_item_save_after event which is triggered when inventory is changed in the ...
gregdev's user avatar
  • 303
10 votes
9 answers
43k views

How to set a product to be in/out of stock programatically

I tried a few snippets found online but with no success. Just trying to set a product to be in stock / out of stock with code, this is as far as I've gotten: $product = Mage::getModel('catalog/...
CodeByMike's user avatar
17 votes
12 answers
46k views

Magento 2: Programmatically Updating Inventory

In the following code, I am able to store all the information with the exclusion of the stock data. Has something changed in Magento 2? public function __construct( ScopeConfigInterface $...
Stephen Malenshek's user avatar
11 votes
1 answer
6k views

The purpose of the table cataloginventory_stock

I see that in the default Magento versions 1.0 to 1.8 (ce) There is a table called cataloginventory_stock that contains only one record. stock_id stock_name 1 Default Related to this, ...
Marius's user avatar
  • 198k
7 votes
2 answers
12k views

Out of stock products still appear in the frontend

I don't want out of stock products to be appeared in my magento website. I have done the following to ensure I don't see my configurable product in the frontend. Configurable product inventory - out ...
UdaySagar's user avatar
6 votes
4 answers
24k views

Magento easy way to show out of stock in configurable product (greyed out)

this may be a simple question for some - but we havent used stock extensions before. My question: how can we easily, simply, add the ability to - instead of hiding out of stock simple products (as ...
snh_nl's user avatar
  • 5,442
5 votes
2 answers
2k views

Limit product backorder qty

Is there a way to limit the backorder qty? ie: I want to allow a product to get back-ordered, but only by a few
veilig's user avatar
  • 550
4 votes
4 answers
11k views

Magento 2 stock inventory is not being updated

when I placed order in front-end or back-end, quantities of product is not getting reduced or decremented When i have checked in admin panel... Please help me out.. Thanks in advance...
trilok kumar's user avatar
1 vote
2 answers
1k views

How to show a advance inventory custom field value in checkout order summary in magento 2

How to show a advance inventory custom field value in checkout order summary in magento 2 Product edit page in admin checkout page code: <?php namespace Cm\Preorder\Plugin\Checkout\Model; ...
Divya Sekar's user avatar
  • 1,475
1 vote
1 answer
2k views

How to fix Magento 2 MSI inventory reservation inconsistencies directly via DB?

I see orders that are closed, canceled or completed that were created in the reservation table but never removed and they won't be removed since it's triggered when the order changes the status. I ...
Rafael Corrêa Gomes's user avatar
0 votes
0 answers
491 views

Magento1.9 inventory updates api

I have a fields in inventory section qty, like below scree shot, i wants to update the qty fields both at a time using magento1.9 soap apis, In the above screen shot i wants to update Main and ...
shivashankar m's user avatar
10 votes
1 answer
11k views

Magento 1: Relationship Between `qty` in Stock Item, and Stock Status Tables

In Magento 1, Inventory information is stored in a Stock Item object. Each Stock Item object is associated with a product object. Magento persists Stock Item objects to the ...
Alana Storm's user avatar
  • 44.4k
7 votes
4 answers
10k views

Daily admin email for products that went out of stock that day

I am trying to set up a script to send out daily emails to my admin to let them know what went out of stock that day only. It doesn't need to be anything fancy, perhaps even writing items to a text ...
Adam Ross's user avatar
7 votes
10 answers
19k views

inventory_stock_1 doest exist on Magento 2.3

When I go to product pages and checkout the exception shows: Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'inventory_stock_1' doesn't exist, ...
the light's user avatar
  • 718
5 votes
1 answer
16k views

How Set Manage Stock as no in the magento - Programmatically

How Set Manage Stock as no in the magento, i have used this code but manage stock showing as yes $_product->setStockData(array( 'manage_stock' => 0, ...
Helphin's user avatar
  • 974
4 votes
3 answers
5k views

Disable stock check / decrease when shipping an order in Magento 2.3.1

I have a Magento 2.3.1 shop with external software managing my stock levels. I have disabled the Decrease Stock When Order is Placed setting but with the new Magento MSI in Magento 2.3, the stock is ...
Crim's user avatar
  • 131
3 votes
2 answers
3k 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 ...
Joost Mattheijssen's user avatar
3 votes
2 answers
1k views

Stock item not put back in stock automatically upon reaching positive inventory

When a stock item reaches QTY 0 or negative (granted backorders are disabled & QTY for item to become out of stock is 0 as well), is_in_stock is set to 0 automatically. However, when it then ...
Moose's user avatar
  • 7,495
3 votes
2 answers
1k views

Stock reduction on Invoice instead of Order

Currently, stock gets reduced when the Order has been placed, is there any way to change on invoice? As there, lot of junk orders, is there any way to make stock reducing when invoice for the ...
arvindwill's user avatar
3 votes
3 answers
4k views

Show available inventory on configurable product magento 2

I need on configurable product page to show available inventory of simple products,while selecting options, like price will change on option change in same way.
Ram Pratap Singh Gour's user avatar
3 votes
2 answers
2k views

Magento 2 - How to get stock of a product?

I want to instantiate CatalogInventory model in Magento 2 by calling loadByProduct() just like I used to do in Magento 1: $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($...
Sushivam's user avatar
  • 2,629
2 votes
1 answer
18k views

How can i quick update of qty and stock and all inventory fields in Magento

I want quick update of product on MAGENTO C.E 1.7 I know about the quick update of product attribute value using below code: getResource()->saveAttribute() just like $product=Mage::...
Amit Bera's user avatar
  • 77.5k
2 votes
3 answers
603 views

I need Products to always be instock and manage inventory. Magento ver. 1.9.0.1

My business is 50/50 drop shipped or products that I have in my inventory. I'm looking for a solution that will allow me to show all the products as in stock and I also need to be able to manage the ...
Norris Graves's user avatar
2 votes
4 answers
4k views

Store level Inventory for individual product Magento 2.2.0

Is there any way that have enable Store level Inventory. Its not about user config Inventory at Catalog > Inventory Its about Admin >> Catalog >> Product >> Open product which you want to ...
fernandus's user avatar
  • 484
2 votes
3 answers
1k views

How to save advance inventory custom field value in db in Magento 2

How to save advance inventory custom field value in DB on Magento 2 events.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
Divya Sekar's user avatar
  • 1,475
2 votes
3 answers
5k views

How to automatically cancel pending orders after a specified amount of time?

We found that we sometimes run out of stock/inventory due to orders pending payment. In our case, when the customer cancels PayPal payment, or doesn't pay through Bank Deposit. Is there a way to "...
Obay's user avatar
  • 357
1 vote
0 answers
1k views

Magento2.3.2: decrease stock quantity on invoice generate

I created the module for. 1. Decrease Stock quantity when invoice generate and 2. decrease of salable quantity and actual stock" after creating the ship. But the module is not working properly ...
irshad's user avatar
  • 171
1 vote
2 answers
6k views

configurable product show as out of stock in front end but In stock in back end

The configurable product shows as out of stock in front end product details page. I checked its associated products, it contains 25 as quantity and status as In stock. Thus the drop down options are ...
user9957's user avatar
1 vote
1 answer
1k views

Auto Update Configurable Products Stock Status with a cron job

I have the following script which I run to tell me if there are any configurable products the have their stock availability setting set incorrectly. <?php require_once('app/Mage.php'); //Path to ...
Pragman's user avatar
  • 407
1 vote
3 answers
8k views

Magento product quantity uses decimals

I know that there is an option to use decimals for product quantity for every product. But is there an option to change this globally? I am using Magento CE 1.7. Many thanks.
Andreas's user avatar
  • 123
0 votes
1 answer
337 views

Show available inventory configurable products Magento 2

I have got it working and its outputting the right information, but I do not get the toggle to work. Now I think thats because of the use of swatches. Hopefully someone here can help me out with that! ...
JorgB's user avatar
  • 328
0 votes
1 answer
2k views

Is it possible to set individual options out of stock ?

Is it possible to set individual options out of stock (or disable in some way, we are not using inventory) ? My client has different colours of their products and if one colour is out of stock there ...
byronyasgur's user avatar
0 votes
1 answer
681 views

Dropdown quantity option, but only for specific product intervals

We're trying to sell items in packs of 10, but the inventory is managed as individual items, not packs. The client wants users to be able to select their order quantity via a dropdown that only ...
Jacob Harris's user avatar
0 votes
1 answer
699 views

How Magento\CatalogInventory\Model\Stock\Item can be replaced in Constructor (DI)

I want to use below code in Magento 2 constructor. $stockItem = $objectManager->create('Magento\CatalogInventory\Model\Stock\Item'); Can any one tell me the right way of calling above create ...
Krishna ijjada's user avatar