Questions tagged [stock]

Denotes questions related to stock management and configuration on Magento

Filter by
Sorted by
Tagged with
1 vote
1 answer
35 views

group product or bundle product?

I have product A which is composed of 2 products B and 1 product C. The user can buy the Product A (so with product A B C ) on a page. The stock is decreased on A B C. OR He can separately buy ...
1 vote
3 answers
2k views

Magento 2.2: how to get out of stock products when managing stock

In one of my blocks I want to get a product collection including items that are out of stock, but the product collection always includes WHERE (stock_status_index.stock_status = 1) if you are managing ...
1 vote
1 answer
562 views

'only x left threshold' option not working

I have set the threshold to 7, I've set a simple product to quantity 2 and manage stock etc is on, it's also in stock. The setting 'Display products availability in stock in the frontend' is set to ...
  • 193
1 vote
1 answer
58 views

Prevent Stock Decrease if customer in a certain Customer Group places the order?

If the customer is in a certain customer group category, what is the most efficient way to prevent stock decrease once the order is placed? I want the quantity to remain unchanged only for some ...
  • 2,439
1 vote
1 answer
632 views

Disabling product alerts - effect on existing alerts

We have had product stock alerts in place and some customers have set up alerts. If we disable alerts what happens to existing alerts?
  • 787
1 vote
1 answer
1k views

How to update Qty on product save action?

I'm trying to update the StockData in catalog_product_save_before observer and not having any luck. I can get the stock data like this $_newProduct = $observer->getProduct(); $_newStock = $...
  • 141
1 vote
1 answer
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?
1 vote
1 answer
369 views

Magento 1.9.2.4 : Is there away to prevent any item from having an "Out of Stock" Status (regardless of quantity)?

We have ways of dealing with 0 or sub zero quantity on items using backorder but it puts our customers off when they see an out of stock label. I can put the whole catalog back in stock using the ...
1 vote
1 answer
149 views

Add filter "Shipped by"

Besides 'Category', 'Material', 'Brand', 'Color', 'By price range', 'Color Group', and 'Price', I'd like to add the filter 'Shipped by' This is what I have in my view: app/design/frontend/{my_theme}/...
  • 35
1 vote
1 answer
70 views

Minus qty in stock level even though no backorders is set to No

As per the subject, in the Configuration Inventory options, I have set the option for Backorders to "No Backorders". However, I'm still seeing minus figures appearing for some products. Can't work ...
1 vote
1 answer
117 views

Magento orders stuck in payment_review: how does one release? and is stock reserved?

we are seeing several orders with status/state both payment_review. And we are running a script that cleans up and releases the stock of order like 'payment_approval', payment_review and '...
  • 5,342
1 vote
1 answer
266 views

Magento stock sync using a lot of memory- what options do i have to reduce memory usage?

I have a file of around 100,000 sku's that need to have their quantity updated in Magento. For speed reasons, I am doing a few things: 1. I am generating an array of SKU, Product ID and SKU so that I ...
  • 113
1 vote
1 answer
63 views

How to switch product quantity's (non-managed stock) text from numerical value to text

The below code works well for products who's stock is being managed, but it displays "0" if "Manage Stock" is selected as "No" in the Magento backend. There's probably at least a few hundred products ...
1 vote
1 answer
162 views

Stock Status in backend product overview

I have a simple question :) In Backend, the products status is displayed (Active/Inactive) in the Catalog-> Manage Product section. it is also possible to mass-action wether products should be active ...
1 vote
1 answer
667 views

cannot define a correlation name more than once

we are using this extension : https://github.com/r-martins/Magento-OutOfStockLast for following purpose. if we click on any category link, initially we are displaying in-stock-products and than we ...
1 vote
1 answer
769 views

is_in_stock filter not working

I am making a Mage::getModel call to try and get all products in a certain category that is in stock. $stockIds = Mage::getModel('cataloginventory/stock_item') ->getCollection() ->...
  • 117
1 vote
1 answer
977 views

$stockItem->getIsInStock() stopped working after update to 1.9

example code: $stockItem = $product->getStockItem(); $stockItem->getIsInStock() The product is one item of a collection. Before the update I could Request the isInStock status in this way. ...
  • 6,127
1 vote
1 answer
577 views

Change Stock Status and update Stock Amount

We have gotten an API from our manufacturer, now we want to enable stock in these products and give them the right quantity... We use this code: $_product->setData('use_config_manage_stock', 0);...
  • 201
1 vote
1 answer
286 views

Magento and refurbished products

I'm working on a Magento store, containing 3,000 products, with a main stock and a main price updated automatically from SAGE (each 5 minutes). Here is the specificity : products can be both IN THE ...
1 vote
1 answer
2k views

How can I see a list of products that customers have asked to be alerted on?

I was looking in the admin area for a place to see products customers have chosen to be alerted on. This seems like a useful feature considering you may want to re-stock those products since they will ...
1 vote
2 answers
541 views

How to make stock quantity of another product decrease, when another product is bought?

I am having trouble in finding ways of making other products quantity decrease, when a person buys a different item. This is because the item they buy will use quantities of other items listed.
1 vote
1 answer
131 views

Notifications once product quantity reaches 0

I'm trying to send a notification when the product becomes out of stock. This is the code I have on my Observer: public function detectProductChanges($observer) { $product = $observer->...
  • 147
1 vote
1 answer
967 views

reindex cataloginventory_stock via api

We currently are using the api to update inventory via a vb.net service which works but appears that until we update the 'Stock Status' index manually the updated status doesn't show properly for ...
  • 11
1 vote
1 answer
1k views

How to display products in site that are out of stock

On my Magento site I have configurable products. They have size and color attributes. How can I display products with sizes and colors that are out of stock? Now you can select only the color from ...
1 vote
1 answer
261 views

Extend/hook into where Magento decides if a product can be shown/sold

I have a problem i'd like to have some opinions on. I'm totally new with Magento, but not with programming. Background: I've built a small module to import stock quantites from a couple of our ...
1 vote
1 answer
154 views

Magento Live Stock excluding session stock

I am having a right ball game with a issue. I have written a AJAX cart system for a wholesale website we are developing. There is one long list of products and you can just enter your quantity in each ...
1 vote
0 answers
28 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 ...
1 vote
0 answers
37 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,752
1 vote
0 answers
18 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\...
1 vote
1 answer
461 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
509 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:...
  • 498
1 vote
1 answer
2k 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 ...
1 vote
3 answers
909 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 ...
1 vote
0 answers
386 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 ...
  • 9,807
1 vote
0 answers
29 views

Stocks sources of other website's showing on applying store switcher in admin

Ours is the multi website store(UAE and Oman), and each website is assigned its own stock source under Stores > Stocks But when I Go to product edit, and switch store to Oman website, user is able ...
1 vote
1 answer
285 views

Magento 2 Stock update API Postman error (Consumer is not authorized to access %resources)

I am trying to update the product quantity using postman. But i am getting the following errors { "message": "Consumer is not authorized to access %resources", "parameters&...
1 vote
1 answer
638 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
  • 111
1 vote
0 answers
55 views

When Magento reserve stock in Paypal payment?

It's a bit of imaginary situation and I think it's not that common but can happens and today someone asked me about that and I got curious but I have no easy way atm to test this so I thought in ...
  • 364
1 vote
1 answer
60 views

Out of stock products: why do they appear in Collection::getAllIds and not in Collection::getItems

Im trying to get all products in a collection: out of stock and products in stock. So what I did is: /** @var $collection \Magentp\Catalog\Model\ResourceModel\Product\Collection */ $collection = $...
1 vote
0 answers
166 views

Magento2: Not able to assign Source after enable the MSI module

I have disabled the MSI inventory module (as explained in this article) in my store. After facing some issues I have reverted back MSI related all modules, but after enabled all modules I am not able ...
1 vote
0 answers
68 views

Magento 2 - Layered navigation show products with salable quantity to 0

In my store I have all products with only 1 quantity. When I buy a product, its "Salable Quantity" is 0 instead its "Quantity" stays 1 and thats ok, because the product is only "reserved" and the ...
1 vote
1 answer
27 views

Magento 1 php script product in stock sent email

I would like a php script that when specific products, which I define, have a qty of higher than 0. I automatically receive an e-mail from this. Anyone have an idea how I can easily make a script out ...
  • 1,434
1 vote
0 answers
197 views

Magento 2.3.3 Upgrade Error - You cannot define a correlation name 'stock_item' more than once

Getting Error on Bundle Product page on Magento 2.3.3 after Upgrade. Exception #0 (Zend_Db_Select_Exception): You cannot define a correlation name 'stock_item' more than once Thanks
1 vote
1 answer
331 views

Update Product QTY right before place order from external remote API

We want to update and check product quantity when user clicks on "Place Order" button. If product is outofstock in remote API and get 0 qty then user should not able to "Place Order" and display ...
1 vote
0 answers
2k views

Magento 2: Missing Default Inventory Stock and Source

While running the Magento indexer commands I received this error: No linked stock found. After checking the backend I realised that there is no default inventory stock entry or source. I am running ...
1 vote
0 answers
33 views

How to get catalog in stock on frontend?

I have done everything everyone subscribes everywhere From reindex, in stock, manage all, quantity, databases check, double check But products just don't appear on front end because it says out of ...
1 vote
2 answers
259 views

Save stock data programmatically

You know how you've got; $tempProduct->setData('price', 9.99); $tempProduct->getResource()->saveAttribute($tempProduct,'price'); I want to do the same, except for stock; $stockData = $...
1 vote
1 answer
3k views

Magento 2 - Bulk update stock programmatically - Using database query [duplicate]

I have 10 products; 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. I want to be able to bulk change 1, 3, 4, 5 and 9 to 0 quantity and out of stock and 2, 6, 7, 8 and 10 to 100 quantity and in stock. How can I do ...
1 vote
3 answers
1k views

How to move the "IN STOCK" above Add to cart button

How to move the Stock availability (In Stock) next to the Quantity button.
1 vote
0 answers
47 views

Magento 2 - bundle product

I want to sell in Magento 2 products that depend from production. I will explain this base on coffee. Let say I have 1 Kg of seeds arabika as a simple product. This translate to 900 g of ground ...

1
3 4
5
6 7
10