Home › Forums › WoodMart support forum › YITH Wishlist does not load js or css
YITH Wishlist does not load js or css
- This topic has 12 replies, 2 voices, and was last updated 2 years, 6 months ago by
Elise Noromit.
-
AuthorPosts
-
August 23, 2022 at 6:22 pm #399105
metuzaParticipantHello,
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
RuneAugust 24, 2022 at 4:40 am #399180
Elise NoromitMemberHello,
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
August 24, 2022 at 7:17 pm #399380
metuzaParticipantHello,
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
RuneAugust 25, 2022 at 3:04 am #399408
Elise NoromitMemberHello,
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
August 26, 2022 at 11:06 am #399738
metuzaParticipantHello 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
RuneAugust 26, 2022 at 12:23 pm #399752
metuzaParticipantSomething 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
RuneAugust 27, 2022 at 3:02 am #399865
Elise NoromitMemberHello,
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
August 27, 2022 at 8:52 am #399881
metuzaParticipantHello,
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
RuneAugust 29, 2022 at 7:27 pm #400254
metuzaParticipantSombody working on this? I found my custom functions deactivated for the entire day. It is way to long for any site showing issues.
Brgds
RuneAugust 30, 2022 at 12:53 am #400277
Elise NoromitMemberHello,
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
August 30, 2022 at 6:38 pm #400504
metuzaParticipantHello,
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
RuneAugust 30, 2022 at 7:34 pm #400507
metuzaParticipantDisregard my last message as i have found the issue in YITH plugin.
Brgds
RuneAugust 31, 2022 at 1:07 am #400543
Elise NoromitMemberHello,
We are glad you have solved the issue.
If you have any questions please feel free to contact us.
Best Regards
-
AuthorPosts
The topic ‘YITH Wishlist does not load js or css’ is closed to new replies.
- You must be logged in to create new topics. Login / Register