kishoreunni Posted February 20, 2015 Share Posted February 20, 2015 here it is showing This combination does not exist for this product. Please select another combination. Actually i have added a code in AdminAttributesGroupsController.php in about line 173 array( 'id' => 'checkbox', 'name' => $this->l('Check Boxes') ), the result is that in the back office it is shown like this Also i added some code in product.tpl {elseif ($group.group_type == 'checkbox')} <ul> {foreach from=$group.attributes key=id_attribute item=group_attribute} <li> <input type="checkbox" class="attribute_checkbox" name="{$groupName|escape:'html':'UTF-8'}" value="{$id_attribute}" {if ($group.default == $id_attribute)}{/if} /> <span>{$group_attribute|escape:'html':'UTF-8'}</span> </li> {/foreach} </ul> Added code in product.js $(document).on('click', '.attribute_checkbox', function(e){ e.preventDefault(); findCombination(); getProductAttribute(); }); function findCombination(firstTime) { . . . . var checkbox_inputs = parseInt($('#attributes .checked > input[type=checkbox]').length); if (checkbox_inputs) checkbox_inputs = '#attributes .checked > input[type=checkbox]'; else checkbox_inputs = '#attributes input[type=checkbox]:checked'; $('#attributes select, #attributes input[type=hidden], ' + checkbox).each(function(){ choice.push(parseInt($(this).val())); }); . . . . } function getProductAttribute() { . . . . . . var checkbox_inputs = parseInt($('#attributes .checked > input[type=checkbox]').length); if (checkbox_inputs) checkbox_inputs = '#attributes .checked > input[type=checkbox]'; else checkbox_inputs = '#attributes input[type=checkbox]:checked'; $('#attributes select, #attributes input[type=hidden], ' + checkbox_inputs).each(function(){ tab_attributes.push($(this).val()); }); . . . . } here i have created an attribute check with attribute type - Check Boxes. Also added 3 values to it 3 values are:- But in the Database table:- ps_attribute_group and when i click on the edit field of id_attribute_group =24 it looks like this here there is no checkbox in the drop down menu corresponding to group_type Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now