PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Filter blocking per page select on category page

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

On our site, we want to add a selection for the number of products displayed next to the sorting option so that it works similarly to sorting. Our filter is configured to reload the page, not AJAX. That is, after sorting, a GET parameter is added to the URL in the form of ?orderby=rating. We also want to implement this for displaying the number of products, but after examining the WOOF plugin code, we see that it blocks the standard functionality of the WooCommerce sorting form and we can't add our own elements to it. The WOOF plugin filters the parameters and only allows orderby. Could you please advise on how this could be implemented?

Hello

Our plugin does not block the standard functionality of woocommerce.

For pagination you can try this plugin - https://wordpress.org/plugins/woocommerce-products-per-page/

 

Could you give me the plugin version number you are using?

Version - 3.3.5.3.

Here, I mean this functionality: https://prnt.sc/BwJde58Otvqe. When I try to submit the woocommerce-ordering form via jQuery, the request is blocked. I found the following code in the plugin file \wp-content\plugins\woocommerce-products-filter\js\front.js:

function woof_init_orderby() {
    jQuery('body').on('submit', 'form.woocommerce-ordering', function () {
        /* woo3.3 */
        if (!jQuery("#is_woo_shortcode").length) {
            return false;
        }
        /* +++ */
    });
    jQuery('body').on('change', 'form.woocommerce-ordering select.orderby', function () {
        /* woo3.3 */
        if (!jQuery("#is_woo_shortcode").length) {
            woof_current_values.orderby = jQuery(this).val();
            woof_ajax_page_num = 1;
            woof_submit_link(woof_get_submit_link(), 0);
            return false;
        }
        /* +++ */
    });
}

Hello

Please paste your license key here - https://share.pluginus.net/image/i20230222134241.png -> https://share.pluginus.net/image/i20230222134511.png

Update the plugin to latest version - https://currency-switcher.com/how-to-make-auto-update-for-wordpress-plugins-and-themes-bought-on-envato

When I try to submit the woocommerce-ordering form via jQuery, the request is blocked.  - No! You can see from the code that the sorting data is passed through the filter functionality - https://share.pluginus.net/image/i20240628105356.png - This is necessary for sorting to work in ajax mode.

I will try to explain again what we are implementing. On our page, we have a standard sorting field, and it works correctly. Next to it, we are adding a field to specify the number of products displayed per page in a similar manner. It will function similarly to the sorting field. When the select changes, the form is submitted, and the page reloads with GET parameters for sorting and our select element parameters. However, in our case, the provided code blocks the form submission, which is incorrect. The blocking occurs here: https://prnt.sc/lxx6Thwc6HRA

Hello

ok! Simple, free, fast, no custom code - https://wordpress.org/plugins/woocommerce-products-per-page/  - and you will get a dropdown with the ability to choose to display a different number of products on the page

if this solution doesn't suit you, just override this JS function in your js file

 

How can I override this function? I don't understand what you talking about.

Hello

If you don't have any programming experience, you should hire a developer to customize your code.

Please read this - https://webkul.com/blog/how-to-override-javascript-jquery-functions-and-events/