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

Automatically Add Remaining Quantity…
 
halopunker
Jr. Member
 
Total Posts:  23
Joined:  2008-12-30
 

How do I make it so that when a user enters in a quantity that is higher than what is presently available...that it adds the remaining stock to the cart?

As it stands, when I enter in a quantity that is higher than what is presently in stock i just get a generic ‘The requested quantity for “SAID_ITEM” is not available.’

This seems like it would be rather annoying to the customer, who will then have to ‘guess’ how many are in stock.  Any help would be greatly appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
VortexCommerce
Sr. Member
 
Avatar
Total Posts:  104
Joined:  2008-08-06
Harrogate, UK
 

Try showing the stock level. 

<?= (int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty()?>

 
Magento Community Magento Community
Magento Community
Magento Community
 
halopunker
Jr. Member
 
Total Posts:  23
Joined:  2008-12-30
 
brucyboy - 23 May 2009 01:43 PM

Try showing the stock level. 

<?= (int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty()?>

This was one option that i played around with in the past, but in the end how will this help with configurable products, or bundle products?

So what i’m looking for is a way to modify the cart to actually place the remaining quantity into the cart instead of just giving a ‘This is not available’.

 
Magento Community Magento Community
Magento Community
Magento Community
 
furnitureforyoultd
Enthusiast
 
Total Posts:  833
Joined:  2009-03-09
 

Can this be extended to only show the stock level if stock management is enabled? I have it disabled for the majority of our products; but we use it on clearance products so need a stock count.

If stock management disabled: Show nothing
if stock management enabled + spare stock: show “In Stock: {quantity}”
if stock management enabled + no stock: show “Out of Stock”

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