Posted By

ryarwood on 10/05/11


Tagged

javascript jquery cart foxycart ecommerace


Versions (?)

Foxycart Disable Non-US


 / Published in: JavaScript
 

URL: http://forum.foxycart.com/comments.php?DiscussionID=4375

  1. var allow_international = true;
  2. for (var p = 0; p < fc_json.products.length; p++) {
  3. if (fc_json.products[p].category != 'training') allow_international = false;
  4. }
  5.  
  6. if (!allow_international) {
  7. $('#customer_country, #shipping_country').val('US');
  8. $('#customer_country_name, #shipping_country_name').val('United States');
  9. $('#customer_country_name, #shipping_country_name').attr('readonly', true).focus(function() {
  10. this.blur();
  11. });
  12. }

Report this snippet  

You need to login to post a comment.