Home Forums WoodMart support forum Bug with “Products by Rating list” not using Permalink structure

Bug with “Products by Rating list” not using Permalink structure

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #602811

    barry-6678
    Participant

    Heya,

    There seems to be an issue, when I add to widget the “Products by Rating list” which is either part of your plugin theme (I’m using woodmart).

    It appears to be sending users to “https://shop.scanimals.net/product-category/all/?min_price=0&max_price=50” which is 404 error, rather it should be sending to “https://shop.scanimals.net/index.php/product-category/all/?min_price=0&max_price=50”

    I have custom permalink of /index.php/%year%/%monthnum%/%day%/%postname%/

    I will attempt to add some custom code for now to try fix it temporarily.

    #602812

    barry-6678
    Participant

    temporary fix

    jQuery(document).ready(function($) {
        function updatePriceFilterURL() {
            var priceFilterForm = document.querySelector('.widget_price_filter form');
            if (priceFilterForm) {
                priceFilterForm.action = priceFilterForm.action.replace('/product-category/', '/index.php/product-category/');
            }
        }
    
        // Run on page load
        updatePriceFilterURL();
    
        // Run on AJAX update
        $(document).on('updated_wc_div', function() {
            updatePriceFilterURL();
        });
    });
Viewing 2 posts - 1 through 2 (of 2 total)