Changeset 3426751
- Timestamp:
- 12/24/2025 10:25:17 AM (3 months ago)
- Location:
- shopbuild/trunk
- Files:
-
- 7 edited
-
functions.php (modified) (2 diffs)
-
public/js/pure-wc-shopbuild.js (modified) (1 diff)
-
public/widgets/elementor/single-product-compare.php (modified) (2 diffs)
-
public/widgets/elementor/single-product-thumbnail.php (modified) (3 diffs)
-
public/woocommerce/single-product/add-to-cart/variation-add-to-cart-button.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
shopbuild.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shopbuild/trunk/functions.php
r3414980 r3426751 1435 1435 'classes' => apply_filters('woocommerce_quantity_input_classes', array('input-text', 'qty', 'text'), $product), 1436 1436 'max_value' => apply_filters('woocommerce_quantity_input_max', -1, $product), 1437 'min_value' => apply_filters('woocommerce_quantity_input_min', 0, $product),1437 'min_value' => apply_filters('woocommerce_quantity_input_min', 1, $product), 1438 1438 'step' => apply_filters('woocommerce_quantity_input_step', 1, $product), 1439 1439 'pattern' => apply_filters('woocommerce_quantity_input_pattern', has_filter('woocommerce_stock_amount', 'intval') ? '[0-9]*' : ''), … … 1450 1450 1451 1451 // Apply sanity to min/max args - min cannot be lower than 0. 1452 $args['min_value'] = max($args['min_value'], 0);1452 $args['min_value'] = max($args['min_value'], 1); 1453 1453 $args['max_value'] = 0 < $args['max_value'] ? $args['max_value'] : ''; 1454 1454 -
shopbuild/trunk/public/js/pure-wc-shopbuild.js
r3414980 r3426751 235 235 } 236 236 237 function quantity_arrow_keys() { 238 $(document).on('keydown', '.strb-cart-input', function(e) { 239 var $input = $(this); 240 var currentVal = parseFloat($input.val()); 241 var step = parseFloat($input.attr('step')) || 1; 242 var min = parseFloat($input.attr('min')); 243 var max = parseFloat($input.attr('max')); 244 245 // Arrow Up 246 if (e.which === 38) { 247 e.preventDefault(); 248 if (isNaN(currentVal)) currentVal = 0; 249 var newVal = currentVal + step; 250 if (!isNaN(max) && newVal > max) newVal = max; 251 $input.val(newVal).trigger('change'); 252 } 253 // Arrow Down 254 else if (e.which === 40) { 255 e.preventDefault(); 256 if (isNaN(currentVal)) currentVal = 0; 257 var newVal = currentVal - step; 258 if (!isNaN(min) && newVal < min) newVal = min; 259 $input.val(newVal).trigger('change'); 260 } 261 }); 262 } 263 237 264 $(function() { 238 265 // Your code here 239 266 countdown(); 240 267 products_price_filter(); 268 quantity_arrow_keys(); 241 269 }); 242 270 -
shopbuild/trunk/public/widgets/elementor/single-product-compare.php
r3414980 r3426751 103 103 } 104 104 105 if (empty($storebuild_product)) { 106 return; 107 } 105 $storebuild_product = $storebuild_product?? $product; 106 108 107 109 108 $output = sprintf('<button data-bs-toggle="tooltip" type="button" data-bs-placement="bottom" class="strb-product-details-action-btn button wp-element-button pure-tooltip pure-wc-compare-btn" data-id="%s" title="Add To Compare"> … … 115 114 </svg> 116 115 Compare 117 </button>', $ product->get_id());116 </button>', $storebuild_product->get_id()); 118 117 119 118 print wp_kses($output, storebuild_get_kses_extended_ruleset()); -
shopbuild/trunk/public/widgets/elementor/single-product-thumbnail.php
r3425313 r3426751 277 277 'type' => \Elementor\Controls_Manager::COLOR, 278 278 'selectors' => [ 279 '{{WRAPPER}} .strb-product-details-thumbnail span.onsale ' => 'background-color: {{VALUE}}',279 '{{WRAPPER}} .strb-product-details-thumbnail span.onsale, {{WRAPPER}} .strb-single-product-gallery .onsale' => 'background-color: {{VALUE}}', 280 280 ], 281 281 ] … … 288 288 'type' => \Elementor\Controls_Manager::COLOR, 289 289 'selectors' => [ 290 '{{WRAPPER}} .strb-product-details-thumbnail span.onsale, {{WRAPPER}} .strb- product-details-thumbnail span.onsale' => 'color: {{VALUE}}',290 '{{WRAPPER}} .strb-product-details-thumbnail span.onsale, {{WRAPPER}} .strb-single-product-gallery .onsale' => 'color: {{VALUE}}', 291 291 ], 292 292 ] … … 298 298 'name' => 'storebuild_product_sale_typography', 299 299 'label' => esc_html__('Typography', 'shopbuild'), 300 'selector' => '{{WRAPPER}} .strb-product-details-thumbnail span.onsale, {{WRAPPER}} .strb- product-details-thumbnail span.onsale',300 'selector' => '{{WRAPPER}} .strb-product-details-thumbnail span.onsale, {{WRAPPER}} .strb-single-product-gallery .onsale', 301 301 ] 302 302 ); -
shopbuild/trunk/public/woocommerce/single-product/add-to-cart/variation-add-to-cart-button.php
r3414980 r3426751 14 14 // verify nonce 15 15 if(isset($_POST['add-to-cart-nonce-' . $product->get_id()]) && !wp_verify_nonce( wp_unslash( sanitize_text_field(wp_unslash($_POST['add-to-cart-nonce-' . $product->get_id()]))), 'add-to-cart-' . $product->get_id() )) { 16 $storebuild_quantity = 0;16 $storebuild_quantity = 1; 17 17 }else{ 18 18 $storebuild_quantity = (isset( $_POST['quantity'] )) ? absint( wp_unslash($_POST['quantity']) ) : $product->get_min_purchase_quantity(); … … 29 29 'min_value' => apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product ), 30 30 'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->get_max_purchase_quantity(), $product ), 31 'input_value' => esc_attr($ quantity),31 'input_value' => esc_attr($storebuild_quantity), 32 32 ) 33 33 ); -
shopbuild/trunk/readme.txt
r3425313 r3426751 8 8 WC requires at least: 5.6 9 9 WC tested up to: 8.2 10 Stable tag: 4.0. 310 Stable tag: 4.0.4 11 11 License: GPLv2 12 12 License URI: https://www.gnu.org/licenses/gpl-2.1.html … … 529 529 * Fixed array to string conversion warning in product search form. 530 530 531 = 4.0.4 = 532 * Added arrow key support for quantity input fields. 533 531 534 == Upgrade Notice == 532 535 -
shopbuild/trunk/shopbuild.php
r3425313 r3426751 12 12 * 13 13 * @link https://storebuild.shop 14 * @since 4.0. 314 * @since 4.0.4 15 15 * @package Storebuild 16 16 * … … 19 19 * Plugin URI: https://storebuild.shop 20 20 * Description: Build your shop with amazing woocommerce tools. Customize your shop and product page. Order invoices, order tracking now in one package. 21 * Version: 4.0. 321 * Version: 4.0.4 22 22 * Author: ThemePure 23 23 * Author URI: https://themepure.net … … 37 37 } 38 38 39 define('STOREBUILD_VERSION', '4.0. 3');39 define('STOREBUILD_VERSION', '4.0.4'); 40 40 define('STOREBUILD_PATH', plugin_dir_path(__FILE__)); 41 41 define('STOREBUILD_URL', plugins_url('/', __FILE__));
Note: See TracChangeset
for help on using the changeset viewer.