Jump to content

Help on Edit Attributes Product


Strady77

Recommended Posts

Hello everyone, I would like to make a change to product_attributes to display only the correct values ​​and not all possible values.

Let me give an example for simplicity:

I have these combinations of attributes:

 

Attribute "Brand" has the value "BMW" and attribute "model" with value "Z4"

then

Attribute "Brand" has the value "FERRARI" and attribute "model" with value "360MODENA"

and many others ...

 

I wish after selecting (in Fornt Office) Brand attribute with the value in the attribute BMW next appear only the ability to select only the value Z4

 

The part of the code to be modified should be in the file product.tpl:

 

<div class="attribute_list">

{if ($group.group_type == 'select')}

<select name="{$groupName}" id="group_{$id_attribute_group|intval}" class="attribute_select" onchange="findCombination();getProductAttribute();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if};">

{foreach from=$group.attributes key=id_attribute item=group_attribute}

<option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'htmlall':'UTF-8'}">{$group_attribute|escape:'htmlall':'UTF-8'}</option>

 

{/foreach}

</select>

 

 

you can guide me on how to make this change?

Thanks to all

Edited by Strady77 (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...