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

can msgento change image according to it’s color attribute ?? 
 
Modulabs
Member
 
Avatar
Total Posts:  32
Joined:  2010-09-29
Slovenia
 

Hi there,

we developed module which ensures that product images changes depending on the selected attributes. Your web store customers could already see the actual product they wish to order. The price included implementation and adjustment module for two attributes.

Example:
It’s easier to imagine if we take T-shirt for example. On particular model of T-shirt you can choose the T-shirt color and color of the textt. If a user choose red shirt and green sign, it will show you T-shirt image in a selected color combination.

For another example we can take furniture where we could to selected item - let’s say deckchair - determine the color of wood and color of upholstery separately.

Additional:
The module is very specific, which means that it can be upgraded and adapted to any individual customer’s request. This can also be added to the desired caption option - customer can add text in a specific field, which then appears on the article. Also is possible changing the caption color, adding new artibutes which are account when displaying images (in our examples such as the T-shirt - woman or man, from furniture upholstery material type, etc.). The potential is great, if you have your own wish about the module, please let us know.

<a href="http://shop.spletnisistemi.si/change-image-according-atributes-magento.html">More about module here.</a>

If you are interesting in, please contact us on prodaja@spletnisistemi.si

Regards,

Image Attachments
slika atribut1.jpgslika atribut2.jpgslika atribut3.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
kevinblack
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2011-05-10
 

file catalog/product/view/type/options/configurable.phml

<?php
$_product 
$this->getProduct();
$_attributes Mage::helper('core')->decorateArray($this->getAllowAttributes());
?>
<?php 
if ($_product->isSaleable() && count($_attributes)):?>
    
<dl>
    
<?php foreach($_attributes as $_attribute): ?>
        <?php
        $_attributeId 
$_attribute->getAttributeId();
        
$_attributeInfo Mage::getModel('eav/entity_attribute')->load($_attributeId);
        
$_attributeLabel str_replace(' ','-',strtolower($_attributeInfo->getFrontendLabel()));
        
?>
            
<dd<?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>>
                <
div class="input-box">
                    <
select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>" class="required-entry super-attribute-select kevin-black-<?php echo $_attributeLabel;?>">
                    <
option><?php echo $_attributeInfo->getFrontendLabel() ?></option>
                    </
select>
                </
div>
            </
dd>
        
<?php endforeach; ?>
    
</dl>
<
script type="text/javascript">
    var 
spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>);
    
//kevin.qazware@gmail.com Change Text follow attribute Label
    
function changeFristText(){
        <?php 
foreach($_attributes as $_attribute): ?>
            <?php
            $_attributeId 
$_attribute->getAttributeId();
            
$_attributeInfo Mage::getModel('eav/entity_attribute')->load($_attributeId);
            
?>
            
var label '<?php echo $_attributeInfo->getFrontendLabel();?>';
            $$(
'select.kevin-black-'+label).each(function(elem){
                
var options elem.childElements();
                
options[0].update(label);
            
});
        
<?php endforeach;?>
    }
</script>
<?php 
endif;?>

in file : js/varien/configurable.js replace line 171 = element.options[0] = new Option(element.config.label, ‘’);

It for all attribute set .

File Attachments
QoptionLabel.zip  (File Size: 8KB - Downloads: 153)
 
Magento Community Magento Community
Magento Community
Magento Community
 
heyokdang
Jr. Member
 
Total Posts:  5
Joined:  2009-12-10
 

hi Occo,

great code, thank you so much wink good man.

can you tell me know how can i got the images based on selected value, i need this code or only need solutions so that i can got image and put in javascript code combine with value chose in dropdown option color ( super attribute).

Lighthouse.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kevinblack
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2011-05-10
 

See more and test in here :
http://extensions.qazware.com/extensions/q-color-swatches.html
and
http://extensions.qazware.com/extensions/q-options.html
cool smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
gari marcos
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2008-10-24
 
kevinblack - 05 March 2012 12:49 AM

See more and test in here :
http://extensions.qazware.com/extensions/q-color-swatches.html
and
http://extensions.qazware.com/extensions/q-options.html
cool smile

Instal ok, but it drops a “SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘[databasename].qcolorswatches’ doesn’t exist”

trying to install it on Magento 1.6.2.0

 
Magento Community Magento Community
Magento Community
Magento Community
 
gari marcos
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2008-10-24
 
kevinblack - 05 March 2012 12:49 AM

See more and test in here :
http://extensions.qazware.com/extensions/q-color-swatches.html
and
http://extensions.qazware.com/extensions/q-options.html
cool smile

And it shows it on your demo Admin Panel…
http://qoptions.qazware.com/index.php/admin/catalog_product/edit/id/167/key/bd4dd41134edeca7e0d8b3611eb23abb/

 
Magento Community Magento Community
Magento Community
Magento Community
 
kevinblack
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2011-05-10
 
gari marcos - 06 March 2012 09:17 AM

kevinblack - 05 March 2012 12:49 AM
See more and test in here :
http://extensions.qazware.com/extensions/q-color-swatches.html
and
http://extensions.qazware.com/extensions/q-options.html
cool smile

And it shows it on your demo Admin Panel…
http://qoptions.qazware.com/index.php/admin/catalog_product/edit/id/167/key/bd4dd41134edeca7e0d8b3611eb23abb/

Thanks for reply about bug.
Check it again.
I was checked and upload it to my site.

 
Magento Community Magento Community
Magento Community
Magento Community
 
gari marcos
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2008-10-24
 
kevinblack - 07 March 2012 01:58 AM

gari marcos - 06 March 2012 09:17 AM
kevinblack - 05 March 2012 12:49 AM
See more and test in here :
http://extensions.qazware.com/extensions/q-color-swatches.html
and
http://extensions.qazware.com/extensions/q-options.html
cool smile

And it shows it on your demo Admin Panel…
http://qoptions.qazware.com/index.php/admin/catalog_product/edit/id/167/key/bd4dd41134edeca7e0d8b3611eb23abb/

Thanks for reply about bug.
Check it again.
I was checked and upload it to my site.

Stil not working mate… Now I cant see the images I already uploaded, and so I cant assign colors and images.

 
Magento Community Magento Community
Magento Community
Magento Community
 
milali
Jr. Member
 
Total Posts:  26
Joined:  2012-01-08
 

what is the state of this?

I am looking at changing the main image based on what selection product you choose from the main category.

So they select <type> and it has 3 drop down options for sizes.

I would like the image to change based on the selection.

thanks

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

Hi milali, do you think the Image-Based Dynamic Configurable Products extension may work for you?

 
Magento Community Magento Community
Magento Community
Magento Community
 
gfxguru
Sr. Member
 
Total Posts:  186
Joined:  2008-11-20
 

Don’t you just hate it when extension developers spam the forums looking for victims to buy their product because they can’t create enough value in the product to make it speak for itself.

The reason the thread took off was because of a bit of source code someone contributed, we are not here to buy code that presents or limits some bit of functionality based on someone else’s business plan on possibly someone else’s code. If your product speaks for itself you shouldn’t have to constantly spam the forums....Telling someone of something that can help is different from beating someone with it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
gfxguru
Sr. Member
 
Total Posts:  186
Joined:  2008-11-20
 

oh and BTW… Thank you for everyone’s that’s contributed! This is a much needed capability that I am looking to expand upon.  Anyone have any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
gfxguru
Sr. Member
 
Total Posts:  186
Joined:  2008-11-20
 

Funny thing is this thread is how old? 4 years… wow.

 
Magento Community Magento Community
Magento Community
Magento Community
 
trouble.tribbles
Jr. Member
 
Total Posts:  17
Joined:  2010-04-13
 

Any ideas for allowing this functionality on a category page? I have my category pages set up with each product having a dropdown for color?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shiftins
Jr. Member
 
Total Posts:  2
Joined:  2012-09-04
 

Does anyone know where to put the code to make this work? I am not very good at coding.

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