[FIX] website_sale: the order of the attribute list doesn't matter

This commit is contained in:
Denis Ledoux 2014-09-10 15:07:06 +02:00
parent 2266a96420
commit d3ba8a840d
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ $(document).ready(function () {
});
var available = false;
for (var k in variant_ids) {
if (_.isEqual(variant_ids[k][1], values)) {
if (_.isEmpty(_.difference(variant_ids[k][1], values))) {
var dec = variant_ids[k][2] % 1;
$('input[name="product_id"]').val(variant_ids[k][0]);
$price.html(variant_ids[k][2] + (dec < 0.01 ? ".00" : (dec < 1 ? "0" : "") ));