Home Forums WoodMart support forum On swatch click tooltips are not showing up in mobile browsers.

On swatch click tooltips are not showing up in mobile browsers.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #38640

    cliffJohn
    Participant

    When a swatch is selected in mobile for a product it should show tooltip but no color name (tooltip) is showing up. Any suggestions ? Thanks in advance.

    #38648

    Artem Temos
    Keymaster

    Hi,

    Sorry, but mobile devices don’t have hover state in CSS and that is why tooltips are not shown there.

    Kind Regards

    #38649

    cliffJohn
    Participant

    Can you suggest any workaround for this ? I really need to show the tooltips. Can’t i show it on click, is the tooltip coming from any JS so that i can change code there.

    #38667

    Artem Temos
    Keymaster

    In this situation you will need to customize the file themes/woodmart/js/functions.js and remove this line inside the function btnsToolTips

    if ( $(window).width() <= 1024 ) return;

    You will need to disable JS minification as well.

    #38677

    cliffJohn
    Participant

    Can i dequeue the functions.js and use it through child theme in order to prevent it from updating in future ?

    #38689

    Artem Temos
    Keymaster

    You can use this code snippet to get file from the child theme

    function woodmart_dequeue_script() {
    	wp_dequeue_script( 'woodmart-theme' );
    }
    add_action( 'wp_print_scripts', 'woodmart_dequeue_script', 100 );
    
    function woodmart_enqueue_script() {
    	$translations = array(
    		'adding_to_cart' => esc_html__('Processing', 'woodmart'),
    		'added_to_cart' => esc_html__('Product was successfully added to your cart.', 'woodmart'),
    		'continue_shopping' => esc_html__('Continue shopping', 'woodmart'),
    		'view_cart' => esc_html__('View Cart', 'woodmart'),
    		'go_to_checkout' => esc_html__('Checkout', 'woodmart'),
    		'loading' => esc_html__('Loading...', 'woodmart'),
    		'countdown_days' => esc_html__('days', 'woodmart'),
    		'countdown_hours' => esc_html__('hr', 'woodmart'),
    		'countdown_mins' => esc_html__('min', 'woodmart'),
    		'countdown_sec' => esc_html__('sc', 'woodmart'),
    		'wishlist' => ( class_exists( 'YITH_WCWL' ) ) ? 'yes' : 'no',
    		'cart_url' => ( woodmart_woocommerce_installed() ) ?  esc_url( wc_get_cart_url() ) : '',
    		'ajaxurl' => admin_url('admin-ajax.php'),
    		'add_to_cart_action' => ( woodmart_get_opt( 'add_to_cart_action' ) ) ? esc_js( woodmart_get_opt( 'add_to_cart_action' ) ) : 'widget',
    		'added_popup' => ( woodmart_get_opt( 'added_to_cart_popup' ) ) ? 'yes' : 'no',
    		'categories_toggle' => ( woodmart_get_opt( 'categories_toggle' ) ) ? 'yes' : 'no',
    		'enable_popup' => ( woodmart_get_opt( 'promo_popup' ) ) ? 'yes' : 'no',
    		'popup_delay' => ( woodmart_get_opt( 'promo_timeout' ) ) ? (int) woodmart_get_opt( 'promo_timeout' ) : 1000,
    		'popup_event' => woodmart_get_opt( 'popup_event' ),
    		'popup_scroll' => ( woodmart_get_opt( 'popup_scroll' ) ) ? (int) woodmart_get_opt( 'popup_scroll' ) : 1000,
    		'popup_pages' => ( woodmart_get_opt( 'popup_pages' ) ) ? (int) woodmart_get_opt( 'popup_pages' ) : 0,
    		'promo_popup_hide_mobile' => ( woodmart_get_opt( 'promo_popup_hide_mobile' ) ) ? 'yes' : 'no',
    		'product_images_captions' => ( woodmart_get_opt( 'product_images_captions' ) ) ? 'yes' : 'no',
    		'ajax_add_to_cart' => ( apply_filters( 'woodmart_ajax_add_to_cart', true ) ) ? woodmart_get_opt( 'single_ajax_add_to_cart' ) : false,
    		'all_results' => esc_html__('View all results', 'woodmart'),
    		'product_gallery' => woodmart_get_product_gallery_settings(),
    		'zoom_enable' => ( woodmart_get_opt( 'image_action' ) == 'zoom') ? 'yes' : 'no',
    		'ajax_scroll' => ( woodmart_get_opt( 'ajax_scroll' ) ) ? 'yes' : 'no',
    		'ajax_scroll_class' => apply_filters( 'woodmart_ajax_scroll_class' , '.main-page-wrapper' ),
    		'ajax_scroll_offset' => apply_filters( 'woodmart_ajax_scroll_offset' , 100 ),
    		'infinit_scroll_offset' => apply_filters( 'woodmart_infinit_scroll_offset' , 300 ),
    		'product_slider_auto_height' => ( woodmart_get_opt( 'product_slider_auto_height' ) ) ? 'yes' : 'no',
    		'header_builder' => ( woodmart_get_opt( 'header_builder' ) ) ? 'yes' : 'no',
    		'price_filter_action' => ( apply_filters( 'price_filter_action' , 'click' ) == 'submit' ) ? 'submit' : 'click',
    		'product_slider_autoplay' => apply_filters( 'woodmart_product_slider_autoplay' , false ),
    		'loading' => esc_html__( 'Loading...', 'woodmart' ),
    		'close' => esc_html__( 'Close (Esc)', 'woodmart' ),
    		'share_fb' => esc_html__( 'Share on Facebook', 'woodmart' ),
    		'pin_it' => esc_html__( 'Pin it', 'woodmart' ),
    		'tweet' => esc_html__( 'Tweet', 'woodmart' ),
    		'download_image' => esc_html__( 'Download image', 'woodmart' ),
    		'cookies_version' => ( woodmart_get_opt( 'cookies_version' ) ) ? (int)woodmart_get_opt( 'cookies_version' ) : 1,
    		'header_banner_version' => ( woodmart_get_opt( 'header_banner_version' ) ) ? (int)woodmart_get_opt( 'header_banner_version' ) : 1,
    		'header_banner_close_btn' => woodmart_get_opt( 'header_close_btn' ),
    		'header_banner_enabled' => woodmart_get_opt( 'header_banner' ),
    		'whb_header_clone' => woodmart_get_config( 'header-clone-structure' ),
    		'pjax_timeout' => apply_filters( 'woodmart_pjax_timeout' , 5000 ),
    		'split_nav_fix' => apply_filters( 'woodmart_split_nav_fix' , false ),
    	);
    	wp_enqueue_script( 'woodmart-theme-child-js', get_stylesheet_directory_uri() . '/functions.js' );
    	wp_add_inline_script( 'woodmart-theme-child-js', woodmart_settings_js(), 'after' );
    	wp_localize_script( 'woodmart-theme-child-js', 'woodmart_settings', $translations );
    }
    add_action( 'wp_enqueue_scripts', 'woodmart_enqueue_script', 10001 );
    #38690

    cliffJohn
    Participant

    It didn’t change anything Seems like functions.js is not even working, can you suggest something else ?

    #38719

    Artem Temos
    Keymaster

    Could you please describe the steps you perform so we can understand what is missed and why it doesn’t work?

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