Hello,
You can add the following code to the functions.php file:
if ( ! function_exists( 'yith_ywraq_show_button_based_on_qty' ) ) {
add_action( 'wp_footer', 'yith_ywraq_show_button_based_on_qty' );
function yith_ywraq_show_button_based_on_qty() {
?>
<script type="text/javascript">
jQuery( '.product .entry-summary .quantity .qty.text' ).on( 'change', function ( e ) {
var qty = 5;
var $button = jQuery( '.product .entry-summary .yith-ywraq-add-to-quote' );
if ( parseInt( jQuery( this ).val() ) >= qty ) {
$button.css( 'display', 'block' );
} else {
$button.css( 'display', 'none' );
}
} ).trigger( 'change' );
</script>
<?php
}
}
You only have to change the number 5 on this line:
var qty = 5;
The number you’ll set will act as the threshold for starting to show the “add to quote” button.
For example, without modifying the previous code, the “add to quote” button is hidden until you select 5 or more.