jeudi 2 juin 2016

ajax filter loading slow in opencart

I am using following code to filter products based on checkbox list in opencart 2.0.0.0.There are several filter groups like color ,size etc and in each filter group there are several list box item.Basically with each checkbox item check it filter products through ajax. Problem is that in first one or two check box check it works faster but choosing multiple checkbox it gradually getting slow.Any help pls? following is the checkbox item check event

 $('.checkbox').on('change', function(){
   var filter = [];


   $('.checkbox input[type="checkbox"]:checked').each(function() {
    filter.push( $(this).val() );
   });

   params['filter'] = filter.join(',');

   ajax();

   return false;
  });




Aucun commentaire:

Enregistrer un commentaire