Jump to content

This combination does not exist for this product. Please select another combination.


Recommended Posts

post-893517-0-94574800-1424412112_thumb.png

 

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

 

post-893517-0-75003200-1424412461_thumb.png

 

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

 

post-893517-0-18304500-1424412742_thumb.png

 

3 values are:-

post-893517-0-74896100-1424412830_thumb.png

 

But in the Database

table:- ps_attribute_group

 

post-893517-0-22295800-1424413066_thumb.png

 

and when i click on the edit field of id_attribute_group =24 it looks like this

post-893517-0-86604400-1424413191_thumb.png

 

here there is no checkbox in the drop down menu corresponding to group_type

 

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...