• Resolved bongminshop

    (@bongminshop)


    The add to cart button works fine, but customer can press Buy Now button without need to entering the required email field.

    • This topic was modified 1 week, 3 days ago by bongminshop.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Elena

    (@elenathemehigh)

    Your issue needs a detailed check. Can you please raise a ticket through our website? We hope our technical team will be able to help you.

    Thank you!

    Thread Starter bongminshop

    (@bongminshop)

    Thank you.

    Plugin Support Elena

    (@elenathemehigh)

    The issue is caused by the?Blonwe Core?plugin’s ‘Buy Now’ button, which adds a custom?Add to Cart?function that does not check extra field values.
    ?
    To resolve this, please try adding the following code to your child theme’s functions.php file to add the required attribute for the custom field:

    add_action('wp_footer','th_add_required_attribute',999);
    function th_add_required_attribute(){
    if(!is_product()){
    return;
    }
    ?>
    <script>
    jQuery(document).ready(function($) {
    // Add required attribute to the custom input field
    $('input[name="email"]').attr('required', 'required');
    });
    </script>
    <?php
    }

    Have a great day!

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