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

display picture according to the content of the list
 
gabi
Jr. Member
 
Total Posts:  10
Joined:  2008-10-02
 

hello community

in my configurable product I have two options size and color in two liste.Suivant the content of the list I want to display color images of each color available in the list? I managed to display all the colors available, but I want to dispaly only the color available in the list

http://img379.imageshack.us/img379/1115/66145215ec7.th.jpghttp://img379.imageshack.us/images/thpix.gif

For example if I have a product that contains three colors and the size 42 have two colors available so that I display two images that match the color available in the list

http://img259.imageshack.us/img259/1925/89403566wf3.th.jpghttp://img259.imageshack.us/images/thpix.gif

in this colors picture display only red et black

http://img259.imageshack.us/img259/5972/11414562cr4.th.jpghttp://img259.imageshack.us/images/thpix.gif

in this picture display is blue

to realize my display I insert this code in configurable.phtml
\app\design\frontend\default\default\template\catalog\product\view\type\options

<?php    $p=$_attribute->getPrices() ;  $i=count($p)-1;    
    while (
$i >= 0)
    $x
=$p[$i]['label'];   ;  
        echo 
"<img src=\"http://127.0.0.1/magento-1.1.6/magento/media/colors/".$x.".png\">"; 
  
$i-- ;
    ?>

any idea please????????
thx

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