Questions tagged [stock]

Denotes questions related to stock management and configuration on Magento

Filter by
Sorted by
Tagged with
71
votes
8answers
50k 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 ...
28
votes
5answers
52k 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 ?
19
votes
2answers
16k views

Why is disabled status 2 instead of 0?

A question for any magento devs: Why is it that an enabled product has status 1, while a disabled product has a status of 2? Usually, "enabled" or "active" or whatever gets the status 1, while the ...
16
votes
3answers
11k views

Handling multiple stock locations or warehouses

The Magento database contains the table cataloginventory_stock with a single entry in there called 'Default'. I know this is the place to start for handling multiple stock locations. I'm wondering ...
12
votes
4answers
42k views

Get product stock quantity in magento

I need to get product stock quantity for the item, how to get that $products = Mage::getModel('catalog/product')->getCollection(); $products->addAttributeToSelect(array('name', 'thumbnail', '...
12
votes
1answer
2k views

Why does Magento have a stock index?

I might be being a bit short sighted but I can't find the reasoning behind Magento having a stock index when cataloginventory_stock_status and cataloginventory_stock_status_idx are identical in ...
10
votes
1answer
5k 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, ...
9
votes
1answer
10k 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 ...
9
votes
2answers
987 views

Product collection problem - incorrect pricing data or not showing out of stock items

I am retrieving a product collection based on the current category. I need this collection to contain both in and out of stock products, and I also need the pricing data to be displayed correctly. My ...
7
votes
1answer
3k views

magento 2 event cataloginventory_stock_item_save_after

I need to detect whenever the inventory level of a product changes. As there is cataloginventory_stock_item_save_after in magento 1.x wanto to implemet same in magento 2.1 <event name="...
7
votes
1answer
96 views

Product with different sub qty levels

Trying to currently work this out and understand it isn't default magento. I have a product (Red Shoe) and I need to record the qty of different values of the product for example Red Shoe is made up ...
6
votes
4answers
22k 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 ...
6
votes
2answers
11k views

change stock availability programmatically

How I can change stock availability ie in stock and out of stock of product programmatically using product ID?
6
votes
1answer
3k views

how does magento check if a configure/grouped product is out of stock in the catalog/search

in the setup of magento i have i have set backorders to be on but i only needed them on so that out of stock items could be added to the cart from an order editor i've been making changes to magento ...
6
votes
2answers
1k views

How do I post JSON to a web API method?

I want to send a JSON string via API, and then parse the JSON in code. I don't want Magento to try to convert my JSON parameter to a PHP object. I'm trying to add this to the stock registry API. ...
6
votes
3answers
4k views

Product stock is not saved when creating a product programmatically

I'm creating products programatically on Magento CE 1.8.1. The form works fine except every once in a while we get a nasty error that comes and goes away, and does not affect all users. :"SQLSTATE[...
6
votes
1answer
178 views

Stock / Inventory management

I am new to Magento extension development and looking for a way to implement a connection to our WMS. I have done some tutorials on extension development, but am a little stuck on where or how to make ...
5
votes
1answer
7k views

Magento 2: Set product stock programmatically

I have to setup Product 'in stock' and update Quantity programmatically. Here is my code I am trying: $product->setData('is_in_stock', 1); $product->setData('qty', 5); $product->save();
5
votes
2answers
4k views

Get stock values for bundled product in product grid

We use several bundled products, and I'm having trouble displaying the stock value on the product grid. I don't even need values, just in stock or out of stock. Take the following example: iPhone, ...
5
votes
3answers
922 views

Magento2 - EAV cache issue saving qty in admin

We have this Magento 2.1 project running Production mode with "Update on save" mode for all indexes Our customer manages catalog himself, and reported us some stock issues. Problem was changing ...
5
votes
0answers
162 views

Add product stock information to product repository

When working with the ProductRepository in Magento 2 and the results of the getList method what is the "best" way to add extra information to the results? For example in the default 2.1.7 setup you ...
5
votes
1answer
129 views

many-to-one product attribute

I need to add an attribute that allows multiple values - but not from a set of pre-selected values, not multiple select but multiple text fields. One product, one or more values in the one field. ...
5
votes
0answers
440 views

How to show “Only 1 Product available” also on Configurable Product?

Im wondering how I can "activate" the "Only X left Threshold" also for configurable products? On Normal Products it works and shows for example "only 1 left", but on products where you can choose ...
4
votes
2answers
5k views

Differences between some stock methods

Modifying product page I have encountered some methods touching stock and product availibility: $_product->isSaleable()); $_product->isSalable()); $_product->isAvailable()); $_product->...
4
votes
2answers
3k views

Cron job template block not being translated, but testObserver is

I am configuring a product out of stock notification / alert, and I'm having an issue with localization / translation (pt_BR) in Magento CE 1.9.0.1. The email/productalert/stock.phtml block isn't ...
4
votes
2answers
11k views

How to allow orders for out-of-stock products?

We want to be able to take orders for products that are "out of stock" in Magento. I have enabled backorders in System > Config > Inventory, but the "Add to basket" button is still hidden for ...
4
votes
5answers
6k views

Selling Products By Weight: Multiple Options & Accurate Stock Management

I'm fairly new to Magento - I have no idea how to achieve what I am about to propose, nor what would be the best way to go about it. (Note: This is not a question about the Weight attribute) My ...
4
votes
5answers
4k views

Showing Salable QTY in frontend Magento 2.3

We are currently showing our available qty in stock on the frontend of each product using the following code: <?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $...
4
votes
4answers
6k views

Updating stock causing foreign key constraint fail

So, I'm trying to update product quantities programmatically. On a standard magento install, it works flawlessly, but on the actual magento shop I'm developing it for, it fails with a SQLSTATE[23000]: ...
4
votes
1answer
6k views

Magento 2.1 Update Product Stock in Cron Job

I need to be able to programmatically update product stock in my Cron job. I have an array that contains both the SKU of the product needing updating and the Stock value of that product. How can I ...
4
votes
2answers
3k views

Magento add stock qty in backend new order creation

I was wondering how we could add a stock value in the 'backend new order creation' ... see image below What we see now is that we enter an order, but in the next step are warned that ther is no stock ...
4
votes
1answer
181 views

Stock = 0, out of stock - then I process a credit note. Stock = 1, but still out of stock

Situation: Stock = 0, in_stock = no Then I process a credit note. Stock = 1, in_stock = no I would expect the in_stock to be set back to yes. The effect of this is that we have many T-shirts in 1 ...
4
votes
1answer
2k views

Hide Out of Stock Products in Layered Navigation, but Not Category

I want to be able to filter by sizes that are in stock via the layered navigation, eg I select size large and the filtered results only show me configurable products with an in stock size large ...
4
votes
1answer
162 views

(Stock) Indexes on Import in EE

Why are importing (standard CSV import, not dataflow) product lists and the field is_in_stock does not seem to have an effect. In the backend it is shown properly, but not in the frontend. Clearing ...
4
votes
1answer
187 views

Why have my configurables stock status Out of Stock

All I found so far is from the User Guide in Step 4 under 2.: The Quantity is determined by the product variations, so you can leave it blank for now. The Stock Status of a configurable ...
4
votes
1answer
667 views

Return stock when order on hold

I need to achieve the next thing in my Magento store: When I push the button On Hold in the admin for an order, the stock needs to be returned to the product (so increase). When I unhold the order the ...
4
votes
1answer
1k views

The “Product Prices” and “Product Attributes” index depended on stock index?

I found that on a client server, the stock index run cause a heavy load and slow down the site, so I changed the stock index to manually. After I changed "stock status" index to manually mode, every ...
4
votes
0answers
131 views

Magento 1.9 Add Backorder status of a product to the product grid in backend

I'd like to add the status of the back-order in the main manage product grid as an column so I can see it in 1 instance. the status is visible when you click on a product and go to inventory and you ...
4
votes
2answers
216 views

Set stock levels on the configurable products

As we all know when you have a configurable product such as a T-Shirt in blue and red, you would create 2 simple products and 1 configurable product and each simple product would have its own stock ...
3
votes
4answers
6k views

How to show products with the most quantity sorted first

Prior to my store allowing back orders, when browsing all products that were "In Stock" were displayed with a higher priority over products that were "Out of stock". Since allowing back orders on my ...
3
votes
5answers
7k views

Disable “Only X left Threshold” Qty from Showing on Store

Anyone know how to remove the "Only # left" from showing on the product page of the store? System > Configuration > Inventory for Stock Options has the field "Only X left Threshold" set to "0" which ...
3
votes
2answers
4k views

Debug/Disable automatic set out of stock when lower qty reached

Magento Automatically set a product when a certain qty limit is reached: system -> configuration -> catalog -> inventory -> Qty for Item's Status to Become Out of Stock As pointed out by @...
3
votes
2answers
2k views

Get only the in stock simple products of a configurable product

I am trying to get all the in stock simple products of a configurable product in magento2. Below code gets all in stock and out of stock products of configurable product, But I need only the in stock ...
3
votes
1answer
398 views

Low stock on category page

I have setup a stock notification "ONLY x LEFT" on a product page. Could you please advise how to set a "Low Stock" notification on the category page? As below (10 left):
3
votes
2answers
938 views

M 1.9.0.1 - SQL - Set manage stock 1 for all simple products

I would like to update all my simple products in database by direct sql to set "manage stock" to 1 but don't know how to start.
3
votes
2answers
1k 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 ...
3
votes
2answers
635 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 ...
3
votes
2answers
1k views

Email for Low Stock Products

How can I setup the Email Notification for the Low Stock Products and Expired Products?
3
votes
4answers
7k views

Where is var/lock in Magento 1.9?

I get the error "Stock Status Index process is working now. Please try run this process later." when trying to reindex. Other answers say to clear var/lock/. where is var/lock in 1.9?
3
votes
1answer
330 views

CatalogInvenotry Stock Item save

I found that CatalogInventory/Model/Stock/Item model doesn't trigger _beforeSave() method of it's parent. So, we cannot observe models save_before event. Is it special for preventing from hooks or ...

1
2 3 4 5
9