Link to home
Start Free TrialLog in
Avatar of magento
magento

asked on

php html delete

Hi ,

I use the below code, so user choose the select item type in drop down and the image will display based on the selection.

I dont want the "select item type" , need only the images.

Please help .

            <div id="select_phone_type" class="t_shirt tab_content">
                <div class="wrap_product_type">
                    <h3 class="product-type-title numbers first"><?php echo $this->__("Select Item Type") ?></h3>
            		<select id="t-shirt-type">
                        <?php 
                            $group_items = Mage::getModel( 'pdp/pdpgroup' )->getPdpGroup();
                            foreach ($group_items as $group_item ){ ?>
                                <option value='<?php echo $group_item->getId() ?>' <?php if($dt_ts[0]==$group_item->getId()) echo 'selected="selected"'; ?>><?php echo $group_item->getTitle() ?></option>
                            <?php }
                        ?>
                    </select>
                </div>
        		<div class="color_wrap no-display">
                    <h3 class="color-option"><?php echo $this->__("Select Item") ?></h3>
            		<div color="list" id="list_color">
            			<ul>
            			<?php $img_all = ''; $fi=0; foreach ($designs as $design) {
            			     if($dt_ts[4]==''){
            			         if($fi++==0){
                			         //$f_img_act = 'class="active"';
                			     }else{
                			         $f_img_act = '';
                                 }
            			     }else{
            			         if($dt_ts[4]==$design->getId()){
            			             $f_img_act = 'class="active"';
            			         }else{
                			         $f_img_act = '';
            			         }
            			     }
            				$option = unserialize($design->getOptions());
            				$frontInlay = $helper->getInlayInfoByFilename($design->getFilename());
            				$backInlay = $helper->getInlayInfoByFilename($design->getFilenameBack());
            				$leftInlay = $helper->getInlayInfoByFilename($design->getFilenameLeft());
            				$rightInlay = $helper->getInlayInfoByFilename($design->getFilenameRight());
                                                                             
                            $img_all .= '<img src="'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'pdp/images/'.$design->getFilenameBack().'" /><img src="'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'pdp/images/'.$design->getFilename().'" />';
            				echo '<li '.$f_img_act.' did="'.$design->getId().'" inlay="'.$frontInlay . '-' . $backInlay . '-' . $leftInlay . '-' . $rightInlay . '" relf="'. $design->getFilename().'" relb="' . $design->getFilenameBack() .'" relr="' . $design->getFilenameRight() .'" rell="' . $design->getFilenameLeft() .'" tt="'. $design->getPdpgroup() .'" price="'.$design->getPrice().'" ><img src="'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'pdp/images/'.$design->getFilename().'" /></li>';
            			} ?>
            			</ul>
            		</div>

Open in new window

magento-custom-module.gif
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

You can't change a dropdown to display images, you have to rewrite the page code to display images with appropriate links.
Avatar of magento
magento

ASKER

Hi Dave,

The idea is to remove the dropdown first.

So after that the ...

products are available in $group_item->getId() then use the $design->getId() and show only the images instead of product .

The screenshot attached is what i looking for, but not sure how to make that part work.

Thanks
You basically take the link and image that you have and duplicate it with the other options from the dropdown.  I'm not sure what your code is going to look like because you have a lot of things there that are not familiar to me.
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of magento

ASKER

Hi Julian,

Thanks for your email.

originally i have a dropdown with 3 values, when i click 1st value, it displays 1 st values image
when i click 2nd value in fropdown it shows 2nd values image and so on.

Since the customers may get confused because both of them are same. Now instead of that dropdown i want to display only product  images of 3 values .

I have hidden the select html

                        <select id="t-shirt-type" style="visibility:hidden;">

And now 50% of my goal is done.

But i cant able to make the javascript you have provided in my code.

Can you please check my code and advice?

Thanks
magento-custom-module.gif
t-shirt.html