WPSlash

Trigger AJAX Popup on the whole product element click

Thursday October 29, 2020

The following code snippet will make popup opening without having to click on the “Select” button, will actually make the whole product wrapper clickable.

Copy and paste the following code to your functions.php under your child theme

add_action("wp_footer", "wpslash_woofood_hook_trigger_click_wrapper");

function wpslash_woofood_hook_trigger_click_wrapper()
{
    ?>

    <script type="text/javascript">
        

        jQuery(document).ready(function()

        {

                  jQuery(document).on('click', '.woofood-product-loop' , function(e)
                  { 
                    jQuery(this).find('.woofood-quickview-button').trigger('click');


                  });




        });
    </script>
    <?php
}

Leave a Comment

Your email address will not be published. Required fields are marked *

Related Articles

Tutorials WooCommerce

How to Choose the Best Food Ordering System for Your Restaurant (And Why WooFood is the Ultimate Solution)

If you’re running a restaurant, café, or fast-food business in today’s digital age, offering online food ordering is no longer optional — it’s essential. Customers expect the convenience of browsing your menu, customizing their orders, and checking out seamlessly from their phone or computer. But with so many plugins and systems available, how do you choose the right […]
April 21, 2025
WooFood

How to Disable Coupons for Delivery Orders in WooCommerce

If you’re running a WooCommerce-powered restaurant or food delivery service, you might want to restrict certain coupon codes for delivery orders while keeping them valid for pickup orders. This ensures better control over discounts, prevents misuse, and improves your store’s pricing strategy. Why Restrict Coupons for Delivery Orders? Offering coupons is a great way to attract customers, but in food […]
June 20, 2023
WooFood

How to Automatically Re-Enable Disabled Products in WooFood Once a Day

If you’re running a WooCommerce-powered restaurant ordering system using WooFood, you might have products that automatically get disabled due to stock limits or availability settings. To ensure a smooth customer experience, you can automate the re-enabling process using a scheduled WordPress cron job. This method allows you to reset all product availability once a day, ensuring your menu stays active without manual intervention. Why […]
March 8, 2023