瀏覽代碼

shop list

Tum 4 年之前
父節點
當前提交
0b697c9ce1

+ 0 - 2
app/wp-config.php

108
  * @link https://wordpress.org/support/article/debugging-in-wordpress/
108
  * @link https://wordpress.org/support/article/debugging-in-wordpress/
109
  */
109
  */
110
 define( 'WP_DEBUG', !!getenv_docker('WORDPRESS_DEBUG', '') );
110
 define( 'WP_DEBUG', !!getenv_docker('WORDPRESS_DEBUG', '') );
111
-define( 'WP_HOME', 'http://localhost:8000' );
112
-define( 'WP_SITEURL', 'http://localhost:8000' );
113
 
111
 
114
 
112
 
115
 /* Add any custom values between this line and the "stop editing" line. */
113
 /* Add any custom values between this line and the "stop editing" line. */

+ 27 - 27
app/wp-content/plugins/woo-product-filter/modules/woofilters/js/frontend.woofilters.js

125
 	WpfFrontendPage.prototype.checkForceFilters = (function() {
125
 	WpfFrontendPage.prototype.checkForceFilters = (function() {
126
 		var forceShowFilter = jQuery('.wpfMainWrapper[data-force="1"]');
126
 		var forceShowFilter = jQuery('.wpfMainWrapper[data-force="1"]');
127
 		if (!forceShowFilter.length) return;
127
 		if (!forceShowFilter.length) return;
128
-		
128
+
129
 		jQuery('.wpfMainWrapper').each(function () {
129
 		jQuery('.wpfMainWrapper').each(function () {
130
 			var wrapper = jQuery(this),
130
 			var wrapper = jQuery(this),
131
 				forceShowCurrent = wrapper.attr('data-force');
131
 				forceShowCurrent = wrapper.attr('data-force');
137
 			}
137
 			}
138
 		});
138
 		});
139
 	});
139
 	});
140
-	
140
+
141
 	WpfFrontendPage.prototype.showFiltersLoader = (function() {
141
 	WpfFrontendPage.prototype.showFiltersLoader = (function() {
142
 		jQuery('.wpfMainWrapper').each(function () {
142
 		jQuery('.wpfMainWrapper').each(function () {
143
 			var wrapper = jQuery(this);
143
 			var wrapper = jQuery(this);
251
 		});
251
 		});
252
 
252
 
253
 	});
253
 	});
254
-	
254
+
255
 	WpfFrontendPage.prototype.initDefaultSlider = (function (filter, type) {
255
 	WpfFrontendPage.prototype.initDefaultSlider = (function (filter, type) {
256
 		var _thisObj = this.$obj,
256
 		var _thisObj = this.$obj,
257
 			wrapper = filter.closest('.wpfMainWrapper'),
257
 			wrapper = filter.closest('.wpfMainWrapper'),
260
 			minInputId = '#wpfMinPrice',
260
 			minInputId = '#wpfMinPrice',
261
 			maxInputId = '#wpfMaxPrice',
261
 			maxInputId = '#wpfMaxPrice',
262
 			triggerName = 'wpfPriceChange';
262
 			triggerName = 'wpfPriceChange';
263
-		
263
+
264
 		if (filterType === 'attr') {
264
 		if (filterType === 'attr') {
265
 			minInputId = '#wpfMinAttrNum';
265
 			minInputId = '#wpfMinAttrNum';
266
 			maxInputId = '#wpfMaxAttrNum';
266
 			maxInputId = '#wpfMaxAttrNum';
267
 			triggerName = 'wpfAttrSliderChange';
267
 			triggerName = 'wpfAttrSliderChange';
268
 		}
268
 		}
269
-		
269
+
270
 		var minSelector = wrapper.find(minInputId),
270
 		var minSelector = wrapper.find(minInputId),
271
 			maxSelector = wrapper.find(maxInputId),
271
 			maxSelector = wrapper.find(maxInputId),
272
 			wpfDataStep = wrapper.find('#wpfDataStep').val()
272
 			wpfDataStep = wrapper.find('#wpfDataStep').val()
285
 
285
 
286
 		var	minPriceGetParams = urlParams.min_price ? parseFloat(urlParams.min_price) : valMin,
286
 		var	minPriceGetParams = urlParams.min_price ? parseFloat(urlParams.min_price) : valMin,
287
 			maxPriceGetParams = urlParams.max_price ? parseFloat(urlParams.max_price) : valMax;
287
 			maxPriceGetParams = urlParams.max_price ? parseFloat(urlParams.max_price) : valMax;
288
-		
288
+
289
 		if (filterType === 'attr') {
289
 		if (filterType === 'attr') {
290
 			if (urlParams[getAttr]) {
290
 			if (urlParams[getAttr]) {
291
 				var idsAnd = urlParams[getAttr].split(','),
291
 				var idsAnd = urlParams[getAttr].split(','),
296
 			minPriceGetParams = urlParams[getAttr] ? parseFloat(filterTypeValues[0]) : valMin;
296
 			minPriceGetParams = urlParams[getAttr] ? parseFloat(filterTypeValues[0]) : valMin;
297
 			maxPriceGetParams = urlParams[getAttr] ? parseFloat(filterTypeValues.pop()) : valMax;
297
 			maxPriceGetParams = urlParams[getAttr] ? parseFloat(filterTypeValues.pop()) : valMax;
298
 		}
298
 		}
299
-			
299
+
300
 		var sliderWrapper = filter.find("#wpfSliderRange"),
300
 		var sliderWrapper = filter.find("#wpfSliderRange"),
301
 			autoFilteringEnable = (wrapper.find('.wpfFilterButton').length == 0),
301
 			autoFilteringEnable = (wrapper.find('.wpfFilterButton').length == 0),
302
 			skin = filter.attr('data-price-skin');
302
 			skin = filter.attr('data-price-skin');
355
 									}
355
 									}
356
 								},1000);
356
 								},1000);
357
 							}
357
 							}
358
-							
358
+
359
 						}
359
 						}
360
 					}
360
 					}
361
 				});
361
 				});
746
 		});
746
 		});
747
 
747
 
748
 	});
748
 	});
749
-        
749
+
750
 	function applyFilter(_thisObj, $this)
750
 	function applyFilter(_thisObj, $this)
751
 	{
751
 	{
752
 		_thisObj.setCurrentLocation();
752
 		_thisObj.setCurrentLocation();
1091
 				'redirect_only_click' : Number($generalSettings['settings']['redirect_only_click']),
1091
 				'redirect_only_click' : Number($generalSettings['settings']['redirect_only_click']),
1092
 			};
1092
 			};
1093
 			$filterSettings['sort_by_title'] = ($generalSettings['settings']['sort_by_title'] != undefined && $generalSettings['settings']['sort_by_title'] == '1' ? true : false);
1093
 			$filterSettings['sort_by_title'] = ($generalSettings['settings']['sort_by_title'] != undefined && $generalSettings['settings']['sort_by_title'] == '1' ? true : false);
1094
-                        
1094
+
1095
 			// find woocommerce product loop type ( shorcode, loop )
1095
 			// find woocommerce product loop type ( shorcode, loop )
1096
 			var productContainerSelector = _thisObj.fixSelector($filterSettings['product_container_selector'], ''),
1096
 			var productContainerSelector = _thisObj.fixSelector($filterSettings['product_container_selector'], ''),
1097
 				productContainerElem = (productContainerSelector !== '')
1097
 				productContainerElem = (productContainerSelector !== '')
1307
 		}
1307
 		}
1308
 		return noWooPage;
1308
 		return noWooPage;
1309
 	});
1309
 	});
1310
-	
1310
+
1311
 	WpfFrontendPage.prototype.changeLmpButton = (function () {
1311
 	WpfFrontendPage.prototype.changeLmpButton = (function () {
1312
 		var lmpBtn = jQuery('.br_lmp_button_settings .lmp_button');
1312
 		var lmpBtn = jQuery('.br_lmp_button_settings .lmp_button');
1313
 		if (lmpBtn.length) {
1313
 		if (lmpBtn.length) {
1829
 	});
1829
 	});
1830
 	WpfFrontendPage.prototype.afterAjaxFiltering = (function($wrapperSettings){
1830
 	WpfFrontendPage.prototype.afterAjaxFiltering = (function($wrapperSettings){
1831
 		var _thisObj = this.$obj;
1831
 		var _thisObj = this.$obj;
1832
-		
1832
+
1833
 		//if changed min/max price and we have wpfPrice filter
1833
 		//if changed min/max price and we have wpfPrice filter
1834
 		//we need change slider
1834
 		//we need change slider
1835
 		_thisObj.getUrlParamsChangeFiltersValues();
1835
 		_thisObj.getUrlParamsChangeFiltersValues();
1856
 				}
1856
 				}
1857
 			}
1857
 			}
1858
 		}
1858
 		}
1859
-					
1859
+
1860
 		_thisObj.changeLmpButton();
1860
 		_thisObj.changeLmpButton();
1861
-		
1861
+
1862
 		// for yith quick view
1862
 		// for yith quick view
1863
 		jQuery(document).trigger('yith_wcqv_wcajaxnav_update');
1863
 		jQuery(document).trigger('yith_wcqv_wcajaxnav_update');
1864
 
1864
 
1865
 		if (typeof (_thisObj.scrollToProductsPro) == 'function') {
1865
 		if (typeof (_thisObj.scrollToProductsPro) == 'function') {
1866
 			_thisObj.scrollToProductsPro($wrapperSettings);
1866
 			_thisObj.scrollToProductsPro($wrapperSettings);
1867
 		}
1867
 		}
1868
-		
1868
+
1869
 		if (jQuery(_thisObj.defaultProductSelector).closest('.et_pb_shop').length && jQuery(_thisObj.defaultProductSelector).find('[loading="lazy"]').length == 0) {
1869
 		if (jQuery(_thisObj.defaultProductSelector).closest('.et_pb_shop').length && jQuery(_thisObj.defaultProductSelector).find('[loading="lazy"]').length == 0) {
1870
 			heightIdenticalInRow('.et_pb_shop li.product');
1870
 			heightIdenticalInRow('.et_pb_shop li.product');
1871
 		}
1871
 		}
1874
 		// event for custom javascript hook, example: document.addEventListener('wpfAjaxSuccess', function(event) {console.log('Custom js');});
1874
 		// event for custom javascript hook, example: document.addEventListener('wpfAjaxSuccess', function(event) {console.log('Custom js');});
1875
 		//document.dispatchEvent(new Event('wpfAjaxSuccess')); - not work in IE11
1875
 		//document.dispatchEvent(new Event('wpfAjaxSuccess')); - not work in IE11
1876
 		var customEvent = document.createEvent('Event');
1876
 		var customEvent = document.createEvent('Event');
1877
-		customEvent.initEvent('wpfAjaxSuccess', false, true); 
1877
+		customEvent.initEvent('wpfAjaxSuccess', false, true);
1878
 		document.dispatchEvent(customEvent);
1878
 		document.dispatchEvent(customEvent);
1879
 	});
1879
 	});
1880
 
1880
 
1902
 
1902
 
1903
 	/*WpfFrontendPage.prototype.runReadyList = (function(){
1903
 	/*WpfFrontendPage.prototype.runReadyList = (function(){
1904
 		if (window.readyList && window.readyList.length) {
1904
 		if (window.readyList && window.readyList.length) {
1905
-			
1905
+
1906
 			jQuery(window.readyList).each(function(i, el) {
1906
 			jQuery(window.readyList).each(function(i, el) {
1907
 				var strFunc = el['a'][0].toString();
1907
 				var strFunc = el['a'][0].toString();
1908
 				if (strFunc.indexOf('WpfFrontendPage') == -1 && strFunc.indexOf('.ajaxComplete(') == -1) {
1908
 				if (strFunc.indexOf('WpfFrontendPage') == -1 && strFunc.indexOf('.ajaxComplete(') == -1) {
1973
 						var sliderCurAfter = ($filter.attr('data-slider-currency-after') != undefined) ? $filter.attr('data-slider-currency-after') : '';
1973
 						var sliderCurAfter = ($filter.attr('data-slider-currency-after') != undefined) ? $filter.attr('data-slider-currency-after') : '';
1974
 						var sliderWrapper = $filter.find('.ion-range-slider').data('ionRangeSlider');
1974
 						var sliderWrapper = $filter.find('.ion-range-slider').data('ionRangeSlider');
1975
 						$filter.addClass('wpfNotActiveSlider');
1975
 						$filter.addClass('wpfNotActiveSlider');
1976
-						
1976
+
1977
 						if (sliderCurBefore || sliderCurAfter) {
1977
 						if (sliderCurBefore || sliderCurAfter) {
1978
 							setTimeout(function()
1978
 							setTimeout(function()
1979
 							{
1979
 							{
2202
 			frontendOptions[getParams] = value;
2202
 			frontendOptions[getParams] = value;
2203
 			selectedOptions['list'][0] = name;
2203
 			selectedOptions['list'][0] = name;
2204
 		}
2204
 		}
2205
-		
2205
+
2206
 		optionsArray['backend'] = options;
2206
 		optionsArray['backend'] = options;
2207
 		optionsArray['frontend'] = frontendOptions;
2207
 		optionsArray['frontend'] = frontendOptions;
2208
 		optionsArray['selected'] = selectedOptions;
2208
 		optionsArray['selected'] = selectedOptions;
2728
         var obj = {}, p, idx;
2728
         var obj = {}, p, idx;
2729
         for (var i=0, n=pairs.length; i < n; i++) {
2729
         for (var i=0, n=pairs.length; i < n; i++) {
2730
             p = pairs[i].split('=');
2730
             p = pairs[i].split('=');
2731
-            idx = p[0]; 
2731
+            idx = p[0];
2732
             if (obj[idx] === undefined) {
2732
             if (obj[idx] === undefined) {
2733
                 obj[idx] = unescape(p[1]).replace ( /\+/g, ' ' );
2733
                 obj[idx] = unescape(p[1]).replace ( /\+/g, ' ' );
2734
             }else{
2734
             }else{
2792
 			});
2792
 			});
2793
 		}
2793
 		}
2794
 	});
2794
 	});
2795
-	
2795
+
2796
 	// plugin event woocommerce-product-search
2796
 	// plugin event woocommerce-product-search
2797
 	// https://docs.woocommerce.com/documentation/plugins/woocommerce/woocommerce-extensions/woocommerce-product-search/
2797
 	// https://docs.woocommerce.com/documentation/plugins/woocommerce/woocommerce-extensions/woocommerce-product-search/
2798
 	jQuery(document).on('ixProductFilterRequestProcessed', function (event) {
2798
 	jQuery(document).on('ixProductFilterRequestProcessed', function (event) {
3156
 			isShowAll = Boolean(filter.data('show-all')),
3156
 			isShowAll = Boolean(filter.data('show-all')),
3157
 			isNotInLogic = getAttr.indexOf('pr_filter') == -1 ? false : true,
3157
 			isNotInLogic = getAttr.indexOf('pr_filter') == -1 ? false : true,
3158
 			userExistIds = [];
3158
 			userExistIds = [];
3159
-		
3159
+
3160
 		switch (filterContentType) {
3160
 		switch (filterContentType) {
3161
 			case 'user':
3161
 			case 'user':
3162
 				jQuery.each(wpfExistUsers, function (index, value) {
3162
 				jQuery.each(wpfExistUsers, function (index, value) {
3244
 		noWooPage = _thisObj.noWoo,
3244
 		noWooPage = _thisObj.noWoo,
3245
 		filterWrapper = jQuery('.wpfMainWrapper'),
3245
 		filterWrapper = jQuery('.wpfMainWrapper'),
3246
 		priceFilters = jQuery('.wpfFilterWrapper[data-filter-type="wpfPrice"].wpfNotActive');
3246
 		priceFilters = jQuery('.wpfFilterWrapper[data-filter-type="wpfPrice"].wpfNotActive');
3247
-	
3247
+
3248
 	jQuery('.wpfFilterWrapper[data-filter-type="wpfPrice"]').each(function () {
3248
 	jQuery('.wpfFilterWrapper[data-filter-type="wpfPrice"]').each(function () {
3249
 		var wpfPrice = jQuery(this);
3249
 		var wpfPrice = jQuery(this);
3250
 		wpfPrice.attr('data-minvalue', prices.min_price).attr('data-maxvalue', prices.max_price);
3250
 		wpfPrice.attr('data-minvalue', prices.min_price).attr('data-maxvalue', prices.max_price);
3251
-		
3251
+
3252
 		wpfPrice.find('#wpfMinPrice').attr('min', prices.min_price).val(prices.min_price);
3252
 		wpfPrice.find('#wpfMinPrice').attr('min', prices.min_price).val(prices.min_price);
3253
 		wpfPrice.find('#wpfMaxPrice').attr('max', prices.max_price).val(prices.max_price);
3253
 		wpfPrice.find('#wpfMaxPrice').attr('max', prices.max_price).val(prices.max_price);
3254
-		
3254
+
3255
 		if (wpfPrice.find(".ion-range-slider").length) {
3255
 		if (wpfPrice.find(".ion-range-slider").length) {
3256
 			wpfPrice.find(".ion-range-slider").each(function () {
3256
 			wpfPrice.find(".ion-range-slider").each(function () {
3257
 				jQuery(this).attr('data-min', prices.min_price).attr('data-max', prices.max_price);
3257
 				jQuery(this).attr('data-min', prices.min_price).attr('data-max', prices.max_price);
3296
 	var elementsHeight = [];
3296
 	var elementsHeight = [];
3297
 	var rowIndex = 0;
3297
 	var rowIndex = 0;
3298
 	var elementIndex = 0;
3298
 	var elementIndex = 0;
3299
-	
3299
+
3300
 	jQuery(selector).each(function (index, element) {
3300
 	jQuery(selector).each(function (index, element) {
3301
 		if (!elementsHeight[rowIndex]) {
3301
 		if (!elementsHeight[rowIndex]) {
3302
 			elementsHeight[rowIndex] = [];
3302
 			elementsHeight[rowIndex] = [];
3308
 			&&
3308
 			&&
3309
 			elementsHeight[rowIndex][elementsHeight[rowIndex].length - 1].top !== jQuery(element).offset().top
3309
 			elementsHeight[rowIndex][elementsHeight[rowIndex].length - 1].top !== jQuery(element).offset().top
3310
 		) {
3310
 		) {
3311
-			
3311
+
3312
 			setMaxHeight(elementsHeight[rowIndex]);
3312
 			setMaxHeight(elementsHeight[rowIndex]);
3313
 			rowIndex++;
3313
 			rowIndex++;
3314
 		}
3314
 		}

+ 2 - 4
app/wp-content/themes/whitesports/footer.php

182
     </div>
182
     </div>
183
 </div>
183
 </div>
184
 <?php wp_footer(); ?>
184
 <?php wp_footer(); ?>
185
-<script src="<?= get_template_directory_uri() ?>/ecogreen/js/jquery.js"></script>
186
-<script type="text/javascript" src="<?= get_template_directory_uri() ?>/ecogreen/js/jquery-2.1.4.js"></script> 
187
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/jquery.bxslider.min.js"></script>
185
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/jquery.bxslider.min.js"></script>
188
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/bootstrap.min.js"></script>
186
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/bootstrap.min.js"></script>
189
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/bootstrap-select.min.js"></script>
187
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/bootstrap-select.min.js"></script>
190
-<script type="text/javascript" src="js/jquery-ui.min.js"></script>
188
+<script type="text/javascript" src="<?= get_template_directory_uri() ?>/ecogreen/js/jquery-ui.min.js"></script>
191
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/revolution.min.js"></script>
189
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/revolution.min.js"></script>
192
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/isotope.js"></script>
190
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/isotope.js"></script>
193
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/jquery.fancybox.pack.js"></script>
191
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/jquery.fancybox.pack.js"></script>
195
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/html5lightbox.js"></script>
193
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/html5lightbox.js"></script>
196
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/circle-progress.js"></script>
194
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/circle-progress.js"></script>
197
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/owl.js"></script>
195
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/owl.js"></script>
198
-<script type="<?= get_template_directory_uri() ?>/ecogreen/text/javascript" src="js/jquery.mixitup.min.js"></script>
196
+<script type="text/javascript" src="<?= get_template_directory_uri() ?>/ecogreen/js/jquery.mixitup.min.js"></script>
199
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/masterslider/masterslider.js"></script>
197
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/masterslider/masterslider.js"></script>
200
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/owl.carousel.min.js"></script>
198
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/owl.carousel.min.js"></script>
201
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/mixitup.js"></script>
199
 <script src="<?= get_template_directory_uri() ?>/ecogreen/js/mixitup.js"></script>

+ 1 - 1
app/wp-content/themes/whitesports/page-shop.php

17
 
17
 
18
     <main id="primary" class="container">
18
     <main id="primary" class="container">
19
 <div class='col-md-3'>
19
 <div class='col-md-3'>
20
+<?= do_shortcode('[wpf-filters id=1]') ?>
20
 </div>
21
 </div>
21
 <div class='col-md-9'>
22
 <div class='col-md-9'>
22
 		<?php
23
 		<?php
38
 	</main><!-- #main -->
39
 	</main><!-- #main -->
39
 
40
 
40
 <?php
41
 <?php
41
-get_sidebar();
42
 get_footer();
42
 get_footer();