Changeset 2674012
- Timestamp:
- 02/07/2022 07:27:47 AM (4 years ago)
- Location:
- wc-quantity-plus-minus-button
- Files:
-
- 24 added
- 5 edited
-
tags/1.0.9 (added)
-
tags/1.0.9/assets (added)
-
tags/1.0.9/assets/css (added)
-
tags/1.0.9/assets/css/admin-common.css (added)
-
tags/1.0.9/assets/css/admin-style.css (added)
-
tags/1.0.9/assets/css/style.css (added)
-
tags/1.0.9/assets/images (added)
-
tags/1.0.9/assets/images/icon - Copy.png (added)
-
tags/1.0.9/assets/images/icon-color.png (added)
-
tags/1.0.9/assets/images/icon.png (added)
-
tags/1.0.9/assets/images/logo-color.png (added)
-
tags/1.0.9/assets/images/logo.png (added)
-
tags/1.0.9/assets/js (added)
-
tags/1.0.9/assets/js/admin-script.js (added)
-
tags/1.0.9/assets/js/scripts.js (added)
-
tags/1.0.9/includes (added)
-
tags/1.0.9/includes/admin-menu.php (added)
-
tags/1.0.9/includes/functions.php (added)
-
tags/1.0.9/includes/load-scripts.php (added)
-
tags/1.0.9/init.php (added)
-
tags/1.0.9/readme.txt (added)
-
tags/1.0.9/template (added)
-
tags/1.0.9/template/global (added)
-
tags/1.0.9/template/global/quantity-input.php (added)
-
trunk/assets/js/scripts.js (modified) (2 diffs)
-
trunk/includes/functions.php (modified) (3 diffs)
-
trunk/init.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/template/global/quantity-input.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wc-quantity-plus-minus-button/trunk/assets/js/scripts.js
r2588983 r2674012 32 32 if ($(this).is(".plus")) { 33 33 if (val === max){ 34 console.log(555);35 34 return false; 36 35 } 37 36 38 37 if (isNaN(val)) { 39 console.log(666);40 38 qty.val(step); 41 39 return false; 42 40 } 43 41 if (val + step > max) { 44 qtyObj.attr('data-last_step', ( max-val ) );42 qtyObj.attr('data-last_step', ( max-val < 0 ? 1 : max-val ) ); 45 43 qtyObj.attr('data-prev_step', ( step ) ); 46 44 qtyObj.find(".input-text").removeAttr('step' ); 47 45 qty.val(max); 48 46 } else { 49 console.log(888);50 47 qty.val(val + step); 51 48 } … … 61 58 } 62 59 if (val === min){ 63 console.log(1111);64 60 return false; 65 61 } 66 62 67 63 if (isNaN(val)) { 68 console.log(2222);69 64 qty.val(min); 70 65 return false; 71 66 } 72 67 if (val - step < min) { 73 console.log(3333);74 68 qty.val(min); 75 69 } else { 76 console.log(4444);77 70 qty.val(val - step); 78 71 } -
wc-quantity-plus-minus-button/trunk/includes/functions.php
r2622441 r2674012 9 9 */ 10 10 function wqpmb_locate_template( $template, $template_name, $template_path ){ 11 12 if( $template_name !== 'global/quantity-input.php' ){13 return $template;14 }15 16 17 11 $option_key = WQPMB_Button::$option['option']; 18 12 $datas = get_option( $option_key, false ); … … 109 103 return ' ultraaddons ' . WQPMB_MENU_SLUG . ' '; 110 104 } 111 return '';105 return; 112 106 } 113 107 add_filter( 'admin_body_class', 'wqpmb_admin_body_class' ); … … 166 160 } 167 161 162 if( !function_exists( 'wqpmb_button_off_in_minicart' ) ){ 163 164 /** 165 * Disable our qty button from other place where global $product is not available 166 * 167 * @param bool $bool 168 * @return bool 169 */ 170 function wqpmb_button_off_in_minicart( $bool ){ 171 global $product; 172 if(is_null($product)) return false; 173 return $bool; 174 } 175 //add_filter( 'wqpmb_template_on_off', 'wqpmb_button_off_in_minicart' ); //currently disable 176 } 177 168 178 if( !function_exists( 'wqpmb_header_css' ) ){ 169 179 /** -
wc-quantity-plus-minus-button/trunk/init.php
r2673625 r2674012 10 10 * Domain Path: /languages/ 11 11 * 12 * Version: 1. 0.912 * Version: 1.1.0 13 13 * Requires at least: 4.0.0 14 14 * Tested up to: 5.9 15 15 * WC requires at least: 3.7 16 * WC tested up to: 5.6.016 * WC tested up to: 6.1.1 17 17 */ 18 if ( ! defined( 'ABSPATH' ) ) {18 if ( ! defined( 'ABSPATH' ) ) { 19 19 die(); 20 20 } 21 21 22 if ( ! defined( 'UltraAddons' ) ) {22 if ( ! defined( 'UltraAddons' ) ) { 23 23 define( 'UltraAddons', __( 'UltraAddons', 'wqpmb' )); 24 24 } 25 25 26 26 if ( !defined( 'WQPMB_VERSION' ) ) { 27 define( 'WQPMB_VERSION', '1. 0.7');27 define( 'WQPMB_VERSION', '1.1.0.0'); 28 28 } 29 29 -
wc-quantity-plus-minus-button/trunk/readme.txt
r2673625 r2674012 3 3 Contributors: codersaiful, codeastrology 4 4 Tags: woocommerce quantity, plus minus button, quantity, qty button 5 Version: 1.1.0 5 6 Requires at least: 4.0.0 6 7 Tested up to: 5.9 7 8 Requires PHP: 5.6 8 9 WC requires at least: 3.7 9 WC tested up to: 5.6.010 WC tested up to: 6.1.1 10 11 License: GPL3+ 11 12 License URI: http://www.gnu.org/licenses/gpl.html … … 136 137 == Change log == 137 138 138 = 1.0.9 =139 * Fixed: body-class issue on WooCommerce My Subscriptions menu140 141 = 1.0.8 =142 * Integrate with sold indivisual143 144 139 = 1.0.6 = 145 140 -
wc-quantity-plus-minus-button/trunk/template/global/quantity-input.php
r2589188 r2674012 38 38 exit; 39 39 } 40 41 42 40 43 41 if ( $max_value && $min_value === $max_value ) {
Note: See TracChangeset
for help on using the changeset viewer.