Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #2805304
Check all products
Closed

Comments

  • David Puges started the conversation

    Hello

    I have created a product with many items, and I need to put the typical checkbox to select all products instead of checking all of them individually.

    Is this possible with this plugin? I would help a lot to all customers.

    Thanks

    David

  •  767
    Janilyn replied

    Hi David,

    Thank you for contacting WPClever Support Forum. 

    We’ve received your request and assigned one of our developers to help you with that. 

    He’ll be looking into your question and responding with specific instructions as soon as possible. 

    Please stay patient as we're having very heavy workloads, it might take some time for our developers to reach back.

    Best regards.

    Janilyn T. - WPClever Support Agent

  •  1,226
    Dustin replied

    Hi David,

    Please add the below custom code (How to add custom code?)

    /* WPClever */
    add_action( 'wp_footer', 'woosg_check_all_btn', 99 );
    function woosg_check_all_btn() {
        ?> 
        <script type="text/javascript">
          jQuery(document).ready(function($) {
            if (!$('.woosg-wrap').length || !$('.woosg-checkbox').length) {
              return false;
            }
            $('.woosg-products').
                append(
                    '<div class="woosg-product"><div class="woosg-choose"><input type="checkbox" id="woosg-checkall"/></div> <label for="woosg-checkall" style="cursor: pointer">Check all products</label></div>');
            $(document).on('click touch', '#woosg-checkall', function() {
              $('.woosg-checkbox').prop('checked', this.checked).trigger('change');
            });
          });
        </script>
        <?php
    }

    And the result https://www.screencast.com/t/Jyv1D1K0D

    You can change the text "Check all products" in the above code as you want.

    Best regards,
    Dustin