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

Page 1 of 2
Show out of stock configurable options - as disabled select option
 
m4tthewdixon
Jr. Member
 
Total Posts:  1
Joined:  2008-09-06
 

Hi,

Firstly - Love Magento!!

I need products to show all applicable configurable options (including out of stock options) - but make out of stock options disabled.
So that the dropdown box shows all options - but the user is unable to select the associated out of stock products.

I can see the options are populated with JSON collection, but have got lost in finding where this list is populated.

Any help in this matter would be very gratefully received!

Matt

 
Magento Community Magento Community
Magento Community
Magento Community
 
8181
Jr. Member
 
Total Posts:  25
Joined:  2008-10-26
 

hey Matt, by default does it remove it from the drop down if out of stock?
Do you have to make the parent configurable product “in stock”?

I am trying to get the hang of this as well

 
Magento Community Magento Community
Magento Community
Magento Community
 
nyah
Jr. Member
 
Total Posts:  8
Joined:  2008-08-26
Leipzig, Germany
 

any new information on this issue?
I need to show the options the same way m4tthewdixon does…

 
Magento Community Magento Community
Magento Community
Magento Community
 
ptjedi
Sr. Member
 
Avatar
Total Posts:  250
Joined:  2008-03-12
Porto, Portugal
 

This is something I have been banging for months. Why does Magento doesn’t allow us to select if we want to make visible products out of stock in configurable products. It’s illogical because Simples products remain on sight when they reach qty = 0, why doesn’t the options of configurable products?

The main problem with this is that we will keep customers asking us through e-mail and phone if we do have (or use to have) a size that isn’t displayed.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nyah
Jr. Member
 
Total Posts:  8
Joined:  2008-08-26
Leipzig, Germany
 

Finally I found an approach to solve this issue… you have to rewrite the getAllowedProducs() function in Mage_Catalog_Block_Product_View_Type_Configurable. It’s responsible for filtering unavailable products out of the assigned simple product options.
Rewrite

public function getAllowProducts()
    
{
        
if (!$this->hasAllowProducts()) {
            $products 
= array();
            
$allProducts $this->getProduct()->getTypeInstance()->getUsedProducts();
            foreach (
$allProducts as $product{
                
if ($product->isSaleable()) {
                    $products[] 
$product;
                
}
            }
            $this
->setAllowProducts($products);
        
}
        
return $this->getData('allow_products');
    
}

with

public function getAllowProducts() {
        $allProducts 
$this->getProduct()->getTypeInstance()->getUsedProducts();
        
$this->setAllowProducts($allProducts);
        return 
$this->getData('allow_products');
    
}

and all product options are displayed in options dropdown. From this point you can add your own functions to mark the unavailable options…

hope this helps a bit wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
ptjedi
Sr. Member
 
Avatar
Total Posts:  250
Joined:  2008-03-12
Porto, Portugal
 

Well, that’s a start!
Now we just have to find the constructor of the selection box and tell it that the nonSaleable products of the whole “apparentlySaleable” product collection remain gray.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nyah
Jr. Member
 
Total Posts:  8
Joined:  2008-08-26
Leipzig, Germany
 

I had to do something similar… the unavailable products should be highlighted in grey.
I wrote a function wich filtered the unavailable products and collected the ids of the configurable attribute (wich is the option value), passed them to javascript via json and changed the style (background color) of the appropriate options. Or you could disable the unavailable options so that they are visible but not selectable…

 
Magento Community Magento Community
Magento Community
Magento Community
 
rhino
Jr. Member
 
Total Posts:  21
Joined:  2007-08-31
 

@nyah: Would you be kind enough to post your solution? I would like sold out options to be marked in gray. It would really reduce the number of phone calls we receive.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ptjedi
Sr. Member
 
Avatar
Total Posts:  250
Joined:  2008-03-12
Porto, Portugal
 

Version 1.3 out and this issue/flaw is still not corrected. :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
elfling
Enthusiast
 
Avatar
Total Posts:  901
Joined:  2008-10-21
 

http://www.magentocommerce.com/boards/viewthread/33550/

 
Magento Community Magento Community
Magento Community
Magento Community
 
Scott Munn
Jr. Member
 
Total Posts:  19
Joined:  2009-09-04
 

Has anyone been able to get this working so that it will show the items but as a disabled drop-down option?  I can get Magento to show them all, but not sure where to add the disabled code to the drop down menu.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Amasty
Mentor
 
Avatar
Total Posts:  3988
Joined:  2009-11-10
 

Hello Guys,

The Custom Stock Status extension does this a bit differently - it displays the out of stock option and allows to select it, however hides the add to cart button. You can also display custom stock status for each option (e.g. will be in 3 days, expected soon, etc.), more info available here: Custom Stock Status.  It is possible to subscribe to the out of stock configurations to be notified when they are back in stock.

Do you think it could work for you?

Image Attachments
back-in-stock.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
Amasty
Mentor
 
Avatar
Total Posts:  3988
Joined:  2009-11-10
 
nyah - 28 November 2008 12:17 AM

any new information on this issue?
I need to show the options the same way m4tthewdixon does…

Could my extension work for you or is it mandatory for the out of stock options to be unselectable? Trying to get improvement ideas:).

 
Magento Community Magento Community
Magento Community
Magento Community
 
webdev5
Jr. Member
 
Total Posts:  5
Joined:  2010-03-17
 

@nyah
Hi could you please post your solution, I need it urgently.
Thanks in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vossie75
Sr. Member
 
Total Posts:  133
Joined:  2008-12-19
 

Das anyone now or there are more extentions like http://www.magentocommerce.com/extension/2386/custom-stock-status but what can be paid for without creditcard?
looking for somthing like this as soon as possible.

 
Magento Community Magento Community
Magento Community
Magento Community
 
chason70
Member
 
Total Posts:  67
Joined:  2008-05-24
 

U can try this extension http://ecommerce.aheadworks.com/magento-extensions/custom-stock-display.html

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2