Igor150195

Фикс допполей поиска

Feb 11th, 2022 (edited)
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. shop2.search.getParams = function (folder_id, func) {
  2.     var gr_filter_max_count = shop2.my.gr_filter_max_count;
  3.     var url;
  4.  
  5.     shop2.trigger("beforeGetFolderCustomFields");
  6.    
  7.     if (folder_id > 0) {
  8.         url =
  9.             "/my/s3/api/shop2/?cmd=getFolderCustomFields" +
  10.             "&hash=" +
  11.             shop2.apiHash.getFolderCustomFields +
  12.             "&ver_id=" +
  13.             shop2.verId +
  14.             "&folder_id=" +
  15.             folder_id +
  16.             "&" +
  17.             decodeURIComponent(document.location.search).replace(/[^&]*=(&|$)/g,"");
  18.    
  19.         if (gr_filter_max_count) {
  20.             url = url + `gr_filter_max_count=${gr_filter_max_count}&`;
  21.         };
  22.  
  23.         $.getJSON(url, function (d, status) {
  24.             shop2.fire("afterGetFolderCustomFields", func, d, status);
  25.             shop2.trigger("afterGetFolderCustomFields", d, status);
  26.         });
  27.     };
  28. };
Add Comment
Please, Sign In to add comment