Check product has more than one option in dropdown Magento -


hi need unusual , want

if product has more 1 option value

than should show in dropdown

otherwise if has 1 option value

than need show without dropdown or text only.

please suggest me how can this.

like if

<select name="select_box" id="select_box">     <option value="one">1</option>     <option value="tow">2</option>     <option value="three">3</option>     <option value="three">4</option>     <option value="three">5</option>     <option value="three">6</option> </select> 

the dropdown has more 1 opton need show above dropdown , if

  <select name="select_box" id="select_box">         <option value="one">optionname only</option>     </select> 

dropdown has 1 option need show optionname only text.this not require field.

3-4 files included in process.

you can see enabling "template path hints" admin->settings->advanced->developer.

anyway check these files

if dropdown can change in file (remember changes in theme not in base)

frontend/base/default/template/catalog/product/view/options/type/select.phtml

another files in process(check xml)

frontend/base/default/template/catalog/product/view/options/wrapper.phtml frontend/base/default/template/catalog/product/view/options/js.phtml frontend/base/default/template/catalog/product/view/options.phtml

another way:

goto

app/code/core/mage/catalog/block/product/view/options/type/select.php

here find getvalueshtml() , check code , edit per need (do not edit core files override editing purpose)


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -