Home Forums WoodMart support forum YITH Wishlist does not load js or css

YITH Wishlist does not load js or css

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #399105

    metuza
    Participant

    Hello,

    Is there anything in woodmart that is blocking YITH wishlist from loading its CSS and JS files?
    I can not get it loaded in the wishlist page, all ajax functionality and css is missing.

    Brgds
    Rune

    #399180

    Hello,

    Please try to deactivate WoodMart integrated Wishlist in the Theme Settings > Shop > Wishlist.

    If you have any questions please feel free to contact us.

    Best Regards

    #399380

    metuza
    Participant

    Hello,

    Sorry, but i am not using the woodmart wishlist option so it is not active. It seems like something is dequeue all YITH Wishlist plugin style and JS IDs. I setup a custom hook and registered all css and js files using a new ID and then enqueued these files so now everything works ok. Not possible to load the standard css/js IDs.

    Brgds
    Rune

    #399408

    Hello,

    Please insert the site admin access into the Private content below the message area. We will take a closer look at the case.

    Best Regards

    #399738

    metuza
    Participant

    Hello again,

    Also check why woodmart theme make it so products with outofstock status get instock status in the wishlistpage. You can see it here when logged in: https://www.villmarksbua.no/onskeliste/
    The Coleman Silverton Comfort 150 is out of stock but show up as in stock. If i switch theme everything is OK.

    In regards to the css and js not beeing loaded i have now added a function in my child-theme functions.php that rename all IDs and loads css and js correctly.

    I have added login credentials.

    Brgds
    Rune

    #399752

    metuza
    Participant

    Something is going wrong in the below function. If i comment out the 2 first as below then everything works ok.

    function woodmart_get_availability_stock_status( $availability ) {
    if ( ! isset( $availability[‘availability’] ) || ! $availability[‘availability’] ) {
    // return $availability;
    }
    if ( isset( $availability[‘class’] ) ) {
    // $availability[‘class’] .= ‘ wd-style-‘ . woodmart_get_opt( ‘stock_status_design’, ‘default’ );
    }
    if ( ‘with-bg’ === woodmart_get_opt( ‘stock_status_design’, ‘default’ ) ) {
    $availability[‘availability’] = ‘<span>’ . $availability[‘availability’] . ‘</span>’;
    }
    return $availability;
    }
    add_filter( ‘woocommerce_get_availability’, ‘woodmart_get_availability_stock_status’ );

    Brgds
    Rune

    #399865

    Hello,

    Please make the full backup of your site and check the issue on the Storefront theme to detect if our theme causes the problem. Storefront is a free theme developed by WooСommerce.

    If the problem appears only on WoodMart, deactivate all the plugins except these ones:

    Slider Revolution
    WPBakery Page Builder
    Woodmart Core
    Contact Form 7
    MailChimp for WordPress
    WooCommerce
    Safe SVG
    Switch to the parent theme and check.

    If the problem has gone, activate the plugins one by one, checking the issue to detect which one causes the problem.

    Best Regards

    #399881

    metuza
    Participant

    Hello,

    As mentioned before we have done everything that you recommend, changed theme and disabled all plugins. The result was that Woodmart is causing the problem. Also YITH support has tested our site and found the same, woodmart is causing the issues.

    But we have added a new function to enqueue all CSS and JS with new IDs so css and js is now loading ok. Also we have just disabled the woodmart function as mentioned before, using this function:

    function vmb_remove_parent_filters() {
    remove_filter( ‘woocommerce_get_availability’, ‘woodmart_get_availability_stock_status’ );
    }
    add_action( ‘after_setup_theme’, ‘vmb_remove_parent_filters’ );

    So now the stock status works perfectly fine on all our websites.

    So you can just close this ticket, but please you should check the issues with YITH wishlist CSS/JS not loading and stock status showing wrong status, in woodmart.

    Brgds
    Rune

    #400254

    metuza
    Participant

    Sombody working on this? I found my custom functions deactivated for the entire day. It is way to long for any site showing issues.

    Brgds
    Rune

    #400277

    Hello,

    Our developers are working on the styles issue, which will be fixed in the next update.

    As for the out-of-stock of YITH, this case is the specific for YITH as it checks the status via $product->get_availability() which contains the CSS classes required for our theme.

    The correct way to check the status is using $product->get_stock_status()

    If you have any questions please feel free to contact us.

    Best Regards

    #400504

    metuza
    Participant

    Hello,

    YITH check stock status using $product->get_stock_status(), but it can not work as woodmart makes it return: in-stock wd-style-default.

    Normally it should return in-stock or out-of-stock

    Brgds
    Rune

    #400507

    metuza
    Participant

    Disregard my last message as i have found the issue in YITH plugin.

    Brgds
    Rune

    #400543

    Hello,

    We are glad you have solved the issue.

    If you have any questions please feel free to contact us.

    Best Regards

Viewing 13 posts - 1 through 13 (of 13 total)

The topic ‘YITH Wishlist does not load js or css’ is closed to new replies.