×

how to make all options “not required” ?

Home WPAli Support Forums WooCommerce Order Builder how to make all options “not required” ?

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #8835
    gianlol
    Participant

    hi, why it asks me to necessary select an option?

    I need that all options are “optional” how to do?

    #8836
    Ali Khallad
    Keymaster

    Make sure you unset the min select field, it should have no value for the options to become optional.

    #8837
    gianlol
    Participant

    yes I have it unset (tried 0 too), but still ask me for a selection

    #8839
    Ali Khallad
    Keymaster

    Can you share a screenshot of the options and a link to the product page so we can check?

    #8849
    gianlol
    Participant

    this is my settings
    nowtech-italia.it/EB_img/opt.jpg

    product link
    nowtech-italia.it/wpntc/prodotto/10-25-android-mercede-benz-classe-c-c-classe-w204-2011-2014-464gb/

    (sorry if not inserted link, but when I do that, the forum givee me error “duplicate reply”)

    • This reply was modified 4 years, 2 months ago by gianlol.
    #8853
    Ali Khallad
    Keymaster

    I accessed the link you provided but don’t see WWOB is implemented on that product.

    Can you try to remove 0 and keep the min select field empty?

    #8854
    gianlol
    Participant

    yes I temporary deactivated he plugin, I cannot take it active otherwise buyer get that error, I activated for 2days, you not replied so I turned it off again.

    btw , i tried remove 0 with empty field, and still got the error.

    #8855
    Ali Khallad
    Keymaster

    Can you share a screenshot of the error please?
    Do you use the latest version?

    #8863
    gianlol
    Participant

    the error is the same you can reproduce on your demo site
    for example here https://plugins.wpali.com/product/gift/

    click add to cart without any selection, you will see it

    this my screenshot nowtech-italia.it/error1.jpg

    #8865
    Ali Khallad
    Keymaster

    Aha, I see, this is part of the plugin functionality to make options required.
    You could try to disable it by placing this code in your child themes functions.php

    remove_action( 'woocommerce_add_to_cart_validation', array( 'Wpali_Woocommerce_Order_Builder_Public', 'wwob_prevent_items_add_to_cart' ), 10, 2);

    #8871
    gianlol
    Participant

    ok tried it, but still not working 🙁

    tried to insert that code in the functions.php of the main theme

    #8875
    Ali Khallad
    Keymaster

    Since this is not working, the only way is by editing core code, go to
    – wp-content/plugins/wpali-woocommerce-order-builder/includes/class-wpali-woocommerce-order-builder.php
    Then search for ( should be on line 199)
    $this->loader->add_action( 'woocommerce_add_to_cart_validation', $plugin_public, 'wwob_prevent_items_add_to_cart', 10, 2);

    and comment or remove this code.

    #8881
    gianlol
    Participant

    thank you, it’s working now!

    #8888
    Ali Khallad
    Keymaster

    Perfect, good to hear it’s working

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.