1. Chris Moffitt
  2. satchmo
  3. Issues
Issue #1438 resolved

no 'fieldValue'-bug on satchmo_product.js

Andrea de la Huerta
created an issue

I had some js-bugs with the last trunk version of satchmo_product.js using jquery 1.4.2 where fieldValue() doesn't exist. This was causing, that selecting an option from the ProductVariations-SelectBox, wasn't updating anything.

This is my patch with the fix:

{{{

!patch

diff -r 57a77971e342 -r c143e491e4ae satchmo/static/js/satchmo_product.js --- a/satchmo/static/js/satchmo_product.js Fri Aug 17 12:03:18 2012 +0000 +++ b/satchmo/static/js/satchmo_product.js Sat Aug 18 20:02:30 2012 +0000 @@ -37,8 +37,10 @@ var work = Array(satchmo.option_ids.length); for (var ix=0; ix<satchmo.option_ids.length; ix++) { var k = "#" + satchmo.option_ids[ix]; - var v = $(k).fieldValue()[0]; - work[ix] = v; + var it = $(k); + if (it.length) { + work[ix] = it[0].value; + } } return work.join('::'); }; @@ -105,9 +107,7 @@ }

    $('#product_images').html(images_to_stay);

-

  • var qty = parseInt($('#quantity').fieldValue()[0]);
  • var qty = parseInt($('#quantity')[0].value); satchmo.set_name(detail['SLUG']);

     if (!satchmo.variations['SALE']) {
    

}}}

Comments (1)

  1. Log in to comment