Changeset 1006889
- Timestamp:
- 10/13/2014 10:45:45 PM (11 years ago)
- Location:
- woocommerce-poor-guys-swiss-knife/trunk
- Files:
-
- 4 edited
-
assets/js/accordion.js (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
wcpgsk-af.php (modified) (5 diffs)
-
woocommerce-poor-guys-swiss-knife.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-poor-guys-swiss-knife/trunk/assets/js/accordion.js
r820403 r1006889 13 13 active: false, 14 14 }); 15 15 16 }); 16 17 /* -
woocommerce-poor-guys-swiss-knife/trunk/readme.txt
r1005375 r1006889 5 5 Requires at least: Wordpress 3.1 and WooCommerce 2.0 6 6 Tested up to: 4.0 7 Stable tag: 2.0. 17 Stable tag: 2.0.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 298 298 == Changelog == 299 299 300 = 2.0.2 = 301 302 * Compatibility: Make some filter functions saver to avoid errors with other third party plugins 303 * Revision: Number customer field handling 304 300 305 = 2.0.1 = 301 306 -
woocommerce-poor-guys-swiss-knife/trunk/wcpgsk-af.php
r1005375 r1006889 403 403 404 404 if ( !function_exists('wcpgsk_qtyselector_max') ) { 405 function wcpgsk_qtyselector_max( $whatever, $product ) { 406 global $wcpgsk_session; 407 $options = get_option( 'wcpgsk_settings' ); 408 if ( $product->is_sold_individually() ) : 409 $maxqty = 1; 405 function wcpgsk_qtyselector_max( $whatever, $product = null ) { 406 if ( isset( $product ) && is_object( $product ) ) : 407 global $wcpgsk_session; 408 $options = get_option( 'wcpgsk_settings' ); 409 if ( $product->is_sold_individually() ) : 410 $maxqty = 1; 411 else : 412 $maxqty = isset($options['cart']['maxqty_' . $product->product_type]) && $options['cart']['maxqty_' . $product->product_type] != 0 ? $options['cart']['maxqty_' . $product->product_type] : ''; 413 if ( isset($options['cart']['minmaxstepproduct']) && $options['cart']['minmaxstepproduct'] == 1 ) : 414 $product_id = $product->post->ID; 415 $maxval = get_post_meta($product_id, '_wcpgsk_maxqty', true); 416 if ( isset($maxval) && $maxval > 0 ) : 417 $maxqty = $maxval; 418 endif; 419 endif; 420 if ($maxqty == '' && isset($wcpgsk_session->qtyargs['max_value']) ) { 421 $maxqty = $wcpgsk_session->qtyargs['max_value']; 422 } 423 endif; 424 return $maxqty; 410 425 else : 411 $maxqty = isset($options['cart']['maxqty_' . $product->product_type]) && $options['cart']['maxqty_' . $product->product_type] != 0 ? $options['cart']['maxqty_' . $product->product_type] : ''; 412 if ( isset($options['cart']['minmaxstepproduct']) && $options['cart']['minmaxstepproduct'] == 1 ) : 413 $product_id = $product->post->ID; 414 $maxval = get_post_meta($product_id, '_wcpgsk_maxqty', true); 415 if ( isset($maxval) && $maxval > 0 ) : 416 $maxqty = $maxval; 417 endif; 418 endif; 419 if ($maxqty == '' && isset($wcpgsk_session->qtyargs['max_value']) ) { 420 $maxqty = $wcpgsk_session->qtyargs['max_value']; 421 } 422 endif; 423 return $maxqty; 426 return $whatever; 427 endif; 424 428 } 425 429 } 426 430 427 431 if ( !function_exists('wcpgsk_qtyselector_min') ) { 428 function wcpgsk_qtyselector_min( $whatever, $product ) { 429 global $wcpgsk_session; 430 $options = get_option( 'wcpgsk_settings' ); 431 if ( $product->is_sold_individually() ) : 432 $minqty = 1; 432 function wcpgsk_qtyselector_min( $whatever, $product = null ) { 433 if ( isset( $product ) && is_object( $product ) ) : 434 global $wcpgsk_session; 435 $options = get_option( 'wcpgsk_settings' ); 436 if ( $product->is_sold_individually() ) : 437 $minqty = 1; 438 else : 439 $minqty = isset($options['cart']['minqty_' . $product->product_type]) && $options['cart']['minqty_' . $product->product_type] != 0 ? $options['cart']['minqty_' . $product->product_type] : 0; 440 if ( isset($options['cart']['minmaxstepproduct']) && $options['cart']['minmaxstepproduct'] == 1 ) : 441 $product_id = $product->post->ID; 442 $minval = get_post_meta($product_id, '_wcpgsk_minqty', true); 443 if ( isset($minval) && $minval > 0 ) : 444 $minqty = $minval; 445 endif; 446 endif; 447 if ($minqty == '' && isset($wcpgsk_session->qtyargs['min_value']) ) { 448 $minqty = $wcpgsk_session->qtyargs['min_value']; 449 } 450 endif; 451 return $minqty; 433 452 else : 434 $minqty = isset($options['cart']['minqty_' . $product->product_type]) && $options['cart']['minqty_' . $product->product_type] != 0 ? $options['cart']['minqty_' . $product->product_type] : 0; 435 if ( isset($options['cart']['minmaxstepproduct']) && $options['cart']['minmaxstepproduct'] == 1 ) : 436 $product_id = $product->post->ID; 437 $minval = get_post_meta($product_id, '_wcpgsk_minqty', true); 438 if ( isset($minval) && $minval > 0 ) : 439 $minqty = $minval; 440 endif; 441 endif; 442 if ($minqty == '' && isset($wcpgsk_session->qtyargs['min_value']) ) { 443 $minqty = $wcpgsk_session->qtyargs['min_value']; 444 } 445 endif; 446 return $minqty; 453 return $whatever; 454 endif; 447 455 } 448 456 } 449 457 450 458 if ( !function_exists('wcpgsk_quantity_input_step') ) { 451 function wcpgsk_quantity_input_step( $whatever, $product ) { 452 global $wcpgsk_session; 453 $options = get_option( 'wcpgsk_settings' ); 454 if ( $product->is_sold_individually() ) : 455 $stepqty = 1; 456 else : 457 $stepqty = isset($options['cart']['stepqty_' . $product->product_type]) && $options['cart']['stepqty_' . $product->product_type] != 0 ? $options['cart']['stepqty_' . $product->product_type] : 1; 458 if ( isset($options['cart']['minmaxstepproduct']) && $options['cart']['minmaxstepproduct'] == 1 ) : 459 $product_id = $product->post->ID; 460 $stepval = get_post_meta($product_id, '_wcpgsk_stepqty', true); 461 if ( isset($stepval) && $stepval > 0 ) : 462 $stepqty = $stepval; 463 endif; 464 endif; 465 endif; 466 return $stepqty; 459 function wcpgsk_quantity_input_step( $whatever, $product = null ) { 460 if ( isset( $product ) && is_object( $product ) ) : 461 global $wcpgsk_session; 462 $options = get_option( 'wcpgsk_settings' ); 463 if ( $product->is_sold_individually() ) : 464 $stepqty = 1; 465 else : 466 $stepqty = isset($options['cart']['stepqty_' . $product->product_type]) && $options['cart']['stepqty_' . $product->product_type] != 0 ? $options['cart']['stepqty_' . $product->product_type] : 1; 467 if ( isset($options['cart']['minmaxstepproduct']) && $options['cart']['minmaxstepproduct'] == 1 ) : 468 $product_id = $product->post->ID; 469 $stepval = get_post_meta($product_id, '_wcpgsk_stepqty', true); 470 if ( isset($stepval) && $stepval > 0 ) : 471 $stepqty = $stepval; 472 endif; 473 endif; 474 endif; 475 return $stepqty; 476 else : 477 return $whatever; 478 endif; 467 479 } 468 480 } … … 473 485 * @TODO: revision of this all as the whole process is not meaningful due to some other changes 474 486 */ 475 function wcpgsk_qty_input_args($args , $product) {487 function wcpgsk_qty_input_args($argss) { 476 488 global $wcpgsk_session, $woocommerce; 477 489 … … 860 872 var $this = this; 861 873 jQuery(this).after("<div id=\'slider_" + jQuery(this).attr("id") + "\'></div>"); 874 if ( jQuery($this).attr("minvalue") ) { 875 jQuery($this).attr("min", jQuery($this).attr("minvalue") ); 876 } 877 if ( jQuery($this).attr("rangemax") ) { 878 jQuery($this).attr("max", jQuery($this).attr("rangemax") ); 879 } 880 if ( jQuery($this).attr("maxvalue") ) { 881 jQuery($this).attr("max", jQuery($this).attr("maxvalue") ); 882 } 883 if ( jQuery(this).attr("numstep") ) { 884 jQuery($this).attr("step", jQuery($this).attr("numstep") ); 885 } 862 886 863 887 if (jQuery($this).attr("numpres") == "true") { … … 874 898 } 875 899 else { 900 jQuery($this).attr("type", "number"); 901 876 902 jQuery("#slider_" + jQuery($this).attr("id")).slider({ 877 903 range: jQuery($this).attr("numpres"), … … 883 909 jQuery( $this ).val( ui.value ); 884 910 } 885 }).sliderAccess({ touchonly : false });911 }).sliderAccess({ touchonly : true }); 886 912 } 887 913 }); -
woocommerce-poor-guys-swiss-knife/trunk/woocommerce-poor-guys-swiss-knife.php
r1005375 r1006889 8 8 * Author: Uli Hake 9 9 * Author URI: http://takebarcelona.com/authorship/uli-hake 10 * Version: 2.0. 110 * Version: 2.0.2 11 11 * @package WordPress 12 12 * @subpackage WooCommerce Poor Guys Swiss Knife … … 121 121 //load into our global 122 122 $wcpgsk = new WCPGSK_Main( __FILE__ ); 123 $wcpgsk->version = '2.0. 1';123 $wcpgsk->version = '2.0.2'; 124 124 $wcpgsk->wcpgsk_hook_woocommerce_filters(); 125 125
Note: See TracChangeset
for help on using the changeset viewer.