Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Show Available On Backorder Only When The Stock Level Is <= 0
 
Ashley
Member
 
Total Posts:  51
Joined:  2008-07-23
 

I am using Magento 1.4.1.0 and am making use of the backorder functionality for products. The default behavior though seems to not function correctly or I am using it wrongly!

If I have a product where there is a stock level of 100, and I have set the backorder option to ‘allow qty below 0 and notify customer’, one would presume that the available on backorder message would only show when the stock level was 0 or less. This does not seem to be the case and even though I have 100 items of the product in stock, Magento is telling the customers that it is available on back order which would probably make them look elsewhere for the product when I have it sat here waiting to sell and ship…

Is this really the default behavior of product backorders or am I missing something here? I don’t want to have to manually set the allow backorders option when the stock level hits 0. I can over ride the core to correct this but again do not want to do this unless it is 100% necessary.

Regards
Ashley

 
Magento Community Magento Community
Magento Community
Magento Community
 
EcomDev
Sr. Member
 
Avatar
Total Posts:  122
Joined:  2010-03-17
Ukraine, Kyiv
 

Seems you have corrupted inventory index. Magento displays backorder massage only when stock qty - added to cart qty < 0. Try to refresh stock status index at Admin -> System -> Manage Indexes -> Stock Status -> Reindex Data

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ashley
Member
 
Total Posts:  51
Joined:  2008-07-23
 

Hi,

Thanks for your quick reply. I had thought of this and tried it several times but still no joy. Am going to setup a fresh install and start comparing database dumps before and after making changes to see if I can work out whats going on. Really just needed the behavior confirmed before I spent hours looking into it which I shall now do!

Many thanks again for the response.

Regards
Ashley

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ashley
Member
 
Total Posts:  51
Joined:  2008-07-23
 

Found the problem! We modded the product list view and product view of our theme to display the available on back order message where we where getting the stock qty of the product and checking for <= 0 and also seeing if the product was available on back order with notify customer. In the version (1.4.0.1) which we were using when we made this change, the product stock qty was loaded as part of the product collection data so you could do ($_product->getQty()) but now in 1.4.1.0 this is not the case and we have to load the stockInventory object for the product ($_product->getStockItem()->getQty()) to get the stock level. Must have been done for a performance improvement.

Thanks for the help again.

Regards
Ashley

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top