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

Configurable Product
 
rmehta
Jr. Member
 
Total Posts:  3
Joined:  2010-08-12
 

Hello

Can some one guide me how can i configure product, i am looking to put color as image not in dropdown, size as image. based on color size will filter.

Following is ref site.

http://www.javari.co.uk/Geox-Womens-Pelle-Art-I-Sandal/dp/B0031M9M4Y/275-5042190-8149346?ie=UTF8&cAsin;=B003A2IB1K&node;=217059031&sort;=shoesbrowserel2&fromPage;=search&sr;=1-2&suppressRedirect;=1&ie;=UTF8&qid;=1281642205071&asins;=B002USBQ5I,B003A2IB1K,B000NRPV36,B0030DH2ZU,B003FJGA1G,B0035EQWSM,B002T441QO,B003FMUNAM,B0018HUIL0,B000KJPXJO,B000KKKKTG,B002V1HK9A,B0036FTRQY,B002USB2Z2,B001UQ5CVK,B000KKJAUG,B002N2Z5CQ,B0000ATCFF,B000OLTRYU,B002V1HK72,B003AKZ5C0,B000T0KM4U,B002V1HKDG,B0001Y901K,B002WRI402,B001ULDORE,B0032FPLM2,B002XDQFPQ,B0032FPLX6,B002VJJR2U,B001FYR1HU,B0018HRED0,B0032FPLOA,B0000AFT0C,B002V1HKBI,B0001Y8YIK,B0032FPLR2,B000NSH6Y2,B000PGM7KU,B002T44132&contextTitle;=Search%20Results&asinTitle;=Geox%20D%20Roxi%20Pelle%20Art.I%20Sandal

Any help will appriciate.

 
Magento Community Magento Community
Magento Community
Magento Community
 
HenningP
Sr. Member
 
Total Posts:  78
Joined:  2010-07-14
 

Hi,

I had the same problem and the following solution:

$thumbs=array();
$sizes=array();
$sizeonly=array();
$colors=array();
$skus=array();
$inputs=array();
if (
$_product->isConfigurable()) {
    $_associatedProducts 
$_product->getTypeInstance(true)->getUsedProductCollection($_product);
    
$sizetype='';
    foreach (
$_associatedProducts as $p{
        $pr
=Mage::getModel('catalog/product')->load($p->getId());    // ist sonst nicht richtig initialisiert und hat keine Bilder usw.
        
if ($sizetype==''{
            $types
=array_keys($pr->getAttributes());
            foreach (
$types as $st{
                
if (strpos($st'size') !== false{
                    $sizetype
=$st;
                    break;
                
}
            }
        }
        
if ($sizetype!=''{
            $a
=$pr->getResource()->getAttribute($sizetype);
             if (
$a && is_object($a)) {
                $sid
=$pr->getData($sizetype);
                
$size=$a->getSource()->getOptionText($sid);
                 
$inputs['size']=$a->getId();
                 
$sizeonly[$sid]=$size;
             
}
             $a
=$pr->getResource()->getAttribute('color');
             if (
$a && is_object($a)) {
                 $cid
=$pr->getData('color');
                 
$color=$a->getSource()->getOptionText($cid);
                 
$inputs['color']=$a->getId();
                 if (
$sid{
                     
if (!isset($sizes[$cid])) $sizes[$cid]=array();
                     
$sizes[$cid][$sid]=$size;
                     if (!isset(
$skus[$cid])) $skus[$cid]=array();
                     
$skus[$cid][$sid]=$pr->getSku();
                 
else {
                     $skus[$cid]
=$pr->getSku();
                 
}
                 $colors[$cid]
=$color;
             
elseif ($sid{
                 $skus[$sid]
=$pr->getSku();
                 
$sizes[$cid]=$size;
             
}
        }
        $src
=(string)$_img_helper->init($pr'thumbnail')->resize(35,48);
        if (
strpos($src'placeholder') > 0) continue;
        
$img=(string)$_img_helper->init($pr'thumbnail')->resize(312,467);
        
$big=$_img_helper->init($pr'thumbnail');
        
$thumbs[$src] = array($this->stripTags($this->getImageLabel($pr'thumbnail'), nulltrue), $cid$img, (string)$big$big->getOriginalWidth());
     
}
}

Now you have Arrays with all infos you need.

Henning

 
Magento Community Magento Community
Magento Community
Magento Community
 
rmehta
Jr. Member
 
Total Posts:  3
Joined:  2010-08-12
 

Thanks for your info.

Where should i use this code? do you have screenshot with you

Regards

Ritesh

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