Jump to content

Select image from drop list and display in product page?


Recommended Posts

I want change my code to that way, when i edit or add my product in backend and i select from drop list image and it show in product page as a image?

 

My code informations.tpl

	                </tr>
	                <tr>
			<td class="col-left">
			{include file="controllers/products/multishop/checkbox.tpl" field="internal_name" type="default"}
			<label>{l s='Internal name:'}</label>
			
		        <td style="padding-bottom:5px;">
			<select name="internal_name" id="internal_name">
				<option value="Valik 1" {if $product->internal_name == 'Valik 1'}selected="selected"{/if} >{l s='Valik 1'}</option>
				<option value="Valik 2" {if $product->internal_name == 'Valik 2'}selected="selected"{/if} >{l s='Valik 2'}</option>
				<option value="Valik 3" {if $product->internal_name == 'Valik 3'}selected="selected"{/if} >{l s='Valik 3'}</option>
				<option value="Valik 4" {if $product->internal_name == 'Valik 4'}selected="selected"{/if}> {l s='Valik 4'}</option>
			</select>
		        </td>

and in theme product.tpl

		<div id="product_internal_name" style="border: 1px solid #D0D3D8;margin-bottom:20px;background:#E5E6E7;">
             	{if !empty($product->internal_name)}
             	<a href=""><b>{l s='Developer:'}</b></a>
                {$product->internal_name}
             	{/if}
         	</div>

 Huge thanks!

Edited by Fastplayz (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...