Shortcode code something like this(wishlist):
if ( defined( 'YITH_WCWL' ) && ! function_exists( 'yith_wcwl_get_items_count' ) ) {
function yith_wcwl_get_items_count() {
ob_start();
?>
<a href="<?php echo esc_url( YITH_WCWL()->get_wishlist_url() ); ?>">
<span class="yith-wcwl-items-count">
<i class="yith-wcwl-icon fa fa-heart-o"></i>
<span class="yith-wcwl-number"><?php echo esc_html( yith_wcwl_count_all_products() ); ?></span>
</span>
</a>
<?php
return ob_get_clean();
}
add_shortcode( 'yith_wcwl_items_count', 'yith_wcwl_get_items_count' );
}
if ( defined( 'YITH_WCWL' ) && ! function_exists( 'yith_wcwl_ajax_update_count' ) ) {
function yith_wcwl_ajax_update_count() {
wp_send_json( array(
'count' => yith_wcwl_count_all_products()
) );
}
add_action( 'wp_ajax_yith_wcwl_update_wishlist_count', 'yith_wcwl_ajax_update_count' );
add_action( 'wp_ajax_nopriv_yith_wcwl_update_wishlist_count', 'yith_wcwl_ajax_update_count' );
}
if ( defined( 'YITH_WCWL' ) && ! function_exists( 'yith_wcwl_enqueue_custom_script' ) ) {
function yith_wcwl_enqueue_custom_script() {
wp_add_inline_script(
'jquery-yith-wcwl',
"
jQuery( function( $ ) {
$( document ).on( 'added_to_wishlist removed_from_wishlist', function() {
$.get( yith_wcwl_l10n.ajax_url, {
action: 'yith_wcwl_update_wishlist_count'
}, function( data ) {
$('.yith-wcwl-items-count').children('.yith-wcwl-number').html( data.count );
} );
} );
} );
"
);
}
add_action( 'wp_enqueue_scripts', 'yith_wcwl_enqueue_custom_script', 20 );
}
]]>I installed your YITH Compare plugin but it doesn’t work on mobile. It works correctly on desktop PC.
This is the link where you can see the problem, please open if from Mobile device in order to see that once you click on “Confronta” (in english it is Compare) nothing happens. On target when clicking on Compare, the pop up comparison table should appear.
Could you please support on it?
Thank you
Best regard
]]>I want to override the style.css of the plugin and want to modify some of the css in it through my template.
Was able to successfully dequeue other css as they were added using the wp_enqueue function. Only style.css is added through <link stylesheet>.
Also you have not specified any id to it.
Provide a solution for overriding the style.css
https://www.ads-software.com/plugins/yith-woocommerce-compare/
]]>When i activate my YITH plugins, my theme (Customizr) does not seem to want to “save & Publish”
as soon as i disable theme, the them will save & publish…
are there any codes i should change in general to make my theme compatible with these plugins?
Thank you:)
Buzz
Is there a way to hide the COMPARE BUTTON on iPad and smaller?
I am having trouble with the way the popup overlay displays on anything smaller than the desktop.
Thanks so much!
https://www.ads-software.com/plugins/yith-woocommerce-compare/
]]>Firstly, thank you for this amazing plugin.
We’re facing a problem. We would like to add a link/icon/image on one of the template files (archive-product.php specifically) to the compare table. Basically, our product page is one column full width, and there is no possibility of adding the compare widget to the sidebar, or anyplace else on the template.
We tried copying the code of the compare button from the compare widget manually and then pasting in on the archive-product.php. The button comes ok, but when clicking it, it takes the user to a new page with the contents of the compare table. The popup does not function.
Please can you help us?
Look forward to your reply.
Kind regards,
Varun
https://www.ads-software.com/plugins/woocommerce-compare-products/
]]>