how to make all options “not required” ?
Home › WPAli Support Forums › WooCommerce Order Builder › how to make all options “not required” ?
- This topic has 13 replies, 2 voices, and was last updated 5 years ago by
Ali Khallad.
-
AuthorPosts
-
October 2, 2020 at 9:33 am #8835
gianlol
Participanthi, why it asks me to necessary select an option?
I need that all options are “optional” how to do?
October 2, 2020 at 11:00 am #8836Ali Khallad
KeymasterMake sure you unset the min select field, it should have no value for the options to become optional.
October 2, 2020 at 11:18 am #8837gianlol
Participantyes I have it unset (tried 0 too), but still ask me for a selection
October 2, 2020 at 10:25 pm #8839Ali Khallad
KeymasterCan you share a screenshot of the options and a link to the product page so we can check?
October 5, 2020 at 9:23 am #8849gianlol
Participantthis is my settings
nowtech-italia.it/EB_img/opt.jpgproduct 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 5 years, 1 month ago by
gianlol.
October 7, 2020 at 11:37 am #8853Ali Khallad
KeymasterI 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?
October 9, 2020 at 7:55 am #8854gianlol
Participantyes 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.
October 10, 2020 at 12:22 pm #8855Ali Khallad
KeymasterCan you share a screenshot of the error please?
Do you use the latest version?October 12, 2020 at 7:39 am #8863gianlol
Participantthe 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
October 12, 2020 at 11:26 am #8865Ali Khallad
KeymasterAha, 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.phpremove_action( 'woocommerce_add_to_cart_validation', array( 'Wpali_Woocommerce_Order_Builder_Public', 'wwob_prevent_items_add_to_cart' ), 10, 2);October 13, 2020 at 7:11 am #8871gianlol
Participantok tried it, but still not working 🙁
tried to insert that code in the functions.php of the main theme
October 13, 2020 at 11:55 am #8875Ali Khallad
KeymasterSince 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.
October 14, 2020 at 10:39 am #8881gianlol
Participantthank you, it’s working now!
October 16, 2020 at 4:05 pm #8888Ali Khallad
KeymasterPerfect, good to hear it’s working
-
This reply was modified 5 years, 1 month ago by
-
AuthorPosts
- You must be logged in to reply to this topic.