Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Tooltip Shortcode? #708740

    I found out that displaying a tooltip with Enfold is very easy!
    You can just use the “data-avia-tooltip” attribute in a link or span element for instance:
    <span data-avia-tooltip="I'm a tooltip!">Warning... Tooltip behind!</span>

    in reply to: Map not displaying #664273

    Using Enfold 3.6.1, Google Maps seems to be broken in the frontend and in the admin.

    Admin :
    Nothing happens when hitting the Fetch coordinates button.

    Frontend :

    Oops! Something went wrong.
    This page didn’t load Google Maps correctly. See the JavaScript console for technical details.

    Console :

    Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error
    ...ut(a,0)};ab=function(a,b){if(Object.prototype.hasOwnProperty.call(a,b))return a[...
    js?v=3....sLoaded (ligne 35)
    Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
    util.js (ligne 222)
    TypeError: document.getElementById(...) is null

    Tested the same shortcode from a Enfold 3.4.7 (which is working right now) and pasted it into an Enfold 3.6.1 site but it doesn’t resolve the case.

    • This reply was modified 8 years, 5 months ago by webmarka.

    Okay, I just managed a fix. I think this is a little bug in Enfold so I suggest to fix it in a further release :)

    # Override avia management of thumbnails.
    # See : https://kriesi.at/support/topic/woocommerce-cayalog-page/
    # See : https://kriesi.at/support/topic/woocommerce-archive-page-default-product-placeholder-not-showing/
    add_action( 'after_setup_theme', 'enfold_woocommerce_child_theme_override' );
    function enfold_woocommerce_child_theme_override()
    {
    	remove_action( 'woocommerce_before_shop_loop_item_title', 'avia_woocommerce_thumbnail', 10);
    	add_action( 'woocommerce_before_shop_loop_item_title', 'avia_woocommerce_thumbnail_child_theme', 10);
    
    	function avia_woocommerce_thumbnail_child_theme($asdf)
    	{
    		global $product, $avia_config;
    		$rating = $product->get_rating_html(); //get rating
    
    		$id = get_the_ID();
    		$size = 'shop_catalog';
    		
    		$gallery_thumbnail = avia_woocommerce_gallery_first_thumbnail( $id , $size);
    		$post_thumbnail = get_the_post_thumbnail( $id , $size );
    		
    		// Get the default WC thumbnail if empty.
    		$post_thumbnail = empty($gallery_thumbnail) && empty($post_thumbnail) ? 
    			$post_thumbnail = wc_placeholder_img(): $post_thumbnail;
    
    		echo "<div class='thumbnail_container'>";
    			echo $gallery_thumbnail;
    			echo $post_thumbnail;
    			if(!empty($rating)) echo "<span class='rating_container'>".$rating."</span>";
    			if($product->product_type == 'simple') echo "<span class='cart-loading'></span>";
    		echo "</div>";
    	}
    }

    Works fine now, yeah!

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