1/** 2 * Searchanise widget 3 * 4 * @package Searchanise 5 */ 6 7Searchanise = {}; 8Searchanise.host = searchanise_options.host; 9Searchanise.api_key = searchanise_options.api_key; 10Searchanise.SearchInput = searchanise_options.search_input; 11 12Searchanise.AutoCmpParams = {}; 13Searchanise.AutoCmpParams.union = {}; 14 15if (searchanise_options.cur_label_for_usergroup != '') { 16 Searchanise.AutoCmpParams.union.price = {}; 17 Searchanise.AutoCmpParams.union.price.min = searchanise_options.cur_label_for_usergroup; 18} 19 20if (searchanise_options.max_cur_label_for_usergroup != '') { 21 Searchanise.AutoCmpParams.union.max_price = {}; 22 Searchanise.AutoCmpParams.union.max_price.min = searchanise_options.max_cur_label_for_usergroup; 23} 24 25if (searchanise_options.list_cur_label_for_usergroup != '') { 26 Searchanise.AutoCmpParams.union.list_price = {}; 27 Searchanise.AutoCmpParams.union.list_price.min = searchanise_options.list_cur_label_for_usergroup; 28} 29 30Searchanise.AutoCmpParams.restrictBy = {}; 31Searchanise.AutoCmpParams.restrictBy.visibility = 'visible|catalog|search'; 32Searchanise.AutoCmpParams.restrictBy.status = 'publish'; 33 34if (searchanise_options.hide_out_of_stock_products == 'Y') { 35 Searchanise.AutoCmpParams.restrictBy.is_in_stock = 'Y'; 36} 37 38if (searchanise_options.usergroup_ids) { 39 Searchanise.AutoCmpParams.restrictBy.usergroup_ids = searchanise_options.usergroup_ids; 40} 41 42Searchanise.AutoCmpParams.recentlyViewedProducts = searchanise_options.recentlyViewedProducts; 43 44Searchanise.ResultsParams = {}; 45Searchanise.ResultsParams.union = {}; 46 47if (searchanise_options.cur_label_for_usergroup != '') { 48 Searchanise.ResultsParams.union.price = {}; 49 Searchanise.ResultsParams.union.price.min = searchanise_options.cur_label_for_usergroup; 50} 51 52if (searchanise_options.max_cur_label_for_usergroup != '') { 53 Searchanise.ResultsParams.union.max_price = {}; 54 Searchanise.ResultsParams.union.max_price.min = searchanise_options.max_cur_label_for_usergroup; 55} 56 57if (searchanise_options.list_cur_label_for_usergroup != '') { 58 Searchanise.ResultsParams.union.list_price = {}; 59 Searchanise.ResultsParams.union.list_price.min = searchanise_options.list_cur_label_for_usergroup; 60} 61 62Searchanise.ResultsParams.restrictBy = {}; 63Searchanise.ResultsParams.restrictBy.visibility = 'visible|catalog|search'; 64Searchanise.ResultsParams.restrictBy.status = 'publish'; 65 66if (searchanise_options.hide_out_of_stock_products == 'Y') { 67 Searchanise.ResultsParams.restrictBy.is_in_stock = 'Y'; 68} 69 70if (searchanise_options.usergroup_ids) { 71 Searchanise.ResultsParams.restrictBy.usergroup_ids = searchanise_options.usergroup_ids; 72} 73 74Searchanise.ResultsParams.recentlyViewedProducts = searchanise_options.recentlyViewedProducts; 75 76Searchanise.RecommendationsParams = {}; 77Searchanise.RecommendationsParams.union = {}; 78 79if (searchanise_options.cur_label_for_usergroup != '') { 80 Searchanise.RecommendationsParams.union.price = {}; 81 Searchanise.RecommendationsParams.union.price.min = searchanise_options.cur_label_for_usergroup; 82} 83 84if (searchanise_options.max_cur_label_for_usergroup != '') { 85 Searchanise.RecommendationsParams.union.max_price = {}; 86 Searchanise.RecommendationsParams.union.max_price.min = searchanise_options.max_cur_label_for_usergroup; 87} 88 89if (searchanise_options.list_cur_label_for_usergroup != '') { 90 Searchanise.RecommendationsParams.union.list_price = {}; 91 Searchanise.RecommendationsParams.union.list_price.min = searchanise_options.list_cur_label_for_usergroup; 92} 93 94Searchanise.RecommendationsParams.restrictBy = {}; 95Searchanise.RecommendationsParams.restrictBy.visibility = 'visible|catalog|search'; 96Searchanise.RecommendationsParams.restrictBy.status = 'publish'; 97 98if (searchanise_options.hide_out_of_stock_products == 'Y') { 99 Searchanise.RecommendationsParams.restrictBy.is_in_stock = 'Y'; 100} 101 102if (searchanise_options.usergroup_ids) { 103 Searchanise.RecommendationsParams.restrictBy.usergroup_ids = searchanise_options.usergroup_ids; 104} 105 106Searchanise.RecommendationsParams.recentlyViewedProducts = searchanise_options.recentlyViewedProducts; 107 108if (searchanise_options.use_wp_jquery) { 109 Searchanise.forceUseExternalJQuery = true; 110} 111 112Searchanise.options = {}; 113Searchanise.options.ResultsDiv = '#snize_results';
114Searchanise.options.ResultsFormPath = searchanise_options.results_form_path; 115Searchanise.options.ResultsFallbackUrl = searchanise_options.results_fallback_url; 116Searchanise.options.RequestParamDisableSmartNavigation = searchanise_options.request_param_disable_smart_navigation; 117Searchanise.options.ResultsAddToCartUrl = searchanise_options.results_add_to_cart_url; 118 119if (searchanise_options.hideEmptyPrice) { 120 Searchanise.options.AutocompleteZeroPriceAction = "hide_zero_price"; 121 Searchanise.options.ResultsZeroPriceAction = "hide_zero_price"; 122} 123 124Searchanise.options.facetBy = {}; 125Searchanise.options.facetBy.price = {}; 126Searchanise.options.facetBy.price.type = 'slider'; 127 128Searchanise.options.PriceFormat = { 129 rate : searchanise_options.rate, 130 symbol: searchanise_options.symbol, 131 decimals: searchanise_options.decimals, 132 decimals_separator: searchanise_options.decimals_separator, 133 thousands_separator: searchanise_options.thousands_separator, 134 after: searchanise_options.currency_position_after 135}; 136 137(function() { 138 var __se = document.createElement( 'script' ); 139 __se.src = searchanise_options.host + '/widgets/v1.0/init.js'; 140 __se.setAttribute( 'async', 'true' ); 141 var s = document.getElementsByTagName( 'script' )[0]; s.parentNode.insertBefore( __se, s ); 142})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.