Plugin Directory

Changeset 3433308


Ignore:
Timestamp:
01/06/2026 07:41:35 AM (3 months ago)
Author:
printess
Message:
  • Added additional basket item property printess_hide_quantity for products that have use record count as quantity activated.
Location:
printess-editor/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • printess-editor/trunk/includes/js/printessWoocommerce.js

    r3422702 r3433308  
    10661066                    }
    10671067                    if (settings.useRecordCountAsQuantity === true && typeof context.currentRecordCount !== null && context.currentRecordCount != null && context.currentRecordCount > 0) {
     1068                        //Add input for basket item flag that this item should not render out quantity control
     1069                        const hideQuantityInput = document.createElement("input");
     1070                        hideQuantityInput.setAttribute("id", "printess_hide_quantity");
     1071                        hideQuantityInput.setAttribute("name", "printess_hide_quantity");
     1072                        hideQuantityInput.value = "true";
     1073                        cartForm.appendChild(hideQuantityInput);
    10681074                        const quantiyCtrl = document.querySelector('input[name="quantity"],select[name="quantity"],input[name="qty"],select[name="qty"]');
    10691075                        if (quantiyCtrl) {
  • printess-editor/trunk/printess.php

    r3422702 r3433308  
    55 * Plugin URI: https://printess.com/kb/integrations/woo-commerce/index.html
    66 * Developer: Bastian Kröger (support@printess.com); Alexander Oser (support@printess.com)
    7  * Version: 1.6.73
     7 * Version: 1.6.74
    88 * Author: Printess
    99 * Author URI: https://printess.com
     
    1414 * Tested up to: 6.9
    1515 *
    16  * Woo: 10000:924030dfsfhsf8429842386wdff234sfd
     16 * Woo: 10000:924031dfsfhsf8429842386wdff234sfd
    1717 * WC requires at least: 5.8
    1818 * WC tested up to: 10.3.6
     
    139139    $additionalSettings             = filter_input( INPUT_POST, 'printess-additional-settings', FILTER_SANITIZE_SPECIAL_CHARS );
    140140    $item_usage                     = filter_input( INPUT_POST, 'printess_item_usage', FILTER_UNSAFE_RAW );
     141  $printess_hide_quantity                       = filter_input( INPUT_POST, 'printess_hide_quantity', FILTER_UNSAFE_RAW );
    141142    $remove_items_from_cart    = false;
    142143    $remove_option_value       = get_option( 'printess_show_original_product_in_basket', true );
     
    210211    if ( ! empty( $item_usage ) ) {
    211212        $cart_item_data['printess-item-usage'] = $item_usage;
     213    }
     214
     215    if ( ! empty( $printess_hide_quantity ) ) {
     216        $cart_item_data['printess_hide_quantity'] = $printess_hide_quantity;
    212217    }
    213218
  • printess-editor/trunk/readme.txt

    r3422702 r3433308  
    55Tested up to: 6.9
    66WC Tested up to: 10.3.6
    7 Stable tag: 1.6.73
     7Stable tag: 1.6.74
    88Requires PHP: 8.1
    99License: GPLv2 or later
     
    371371 = 1.6.73 =
    372372 - Added support for using data table record count as product quantity (quantity selector must be hidden [not removed!] from product page and hidden / removed from shopping basket)
     373
     374 = 1.6.74 =
     375 - Added additional basket item property printess_hide_quantity for products that have use record count as quantity activated.
Note: See TracChangeset for help on using the changeset viewer.