• I’m using a page builder and the shortcode isn’t displaying the Add to Wishlist heart/text.

    This is what it’s outputting to the source code which appears to be incorrect and I’m not sure why:
    <div class="yith-wcwl-add-to-wishlist add-to-wishlist-223 exists wishlist-fragment on-first-load" data-fragment-ref="223" data-fragment-options="{"base_url":"","in_default_wishlist":true,"is_single":false,"show_exists":false,"product_id":223,"parent_product_id":223,"product_type":"simple","show_view":false,"browse_wishlist_text":"Browse wishlist","already_in_wishslist_text":"","product_added_text":"Product added!","heading_icon":"fa-heart-o","available_multi_wishlist":false,"disable_wishlist":false,"show_count":false,"ajax_loading":false,"loop_position":"shortcode","item":"add_to_wishlist"}">

    The double quotes within the double quotes are incorrect. On a loop item that’s working we should see the inside quotes ":
    <div class="yith-wcwl-add-to-wishlist add-to-wishlist-265 wishlist-fragment on-first-load" data-fragment-ref="265" data-fragment-options="{&quot;base_url&quot;:&quot;&quot;,&quot;in_default_wishlist&quot;:false,&quot;is_single&quot;:false,&quot;show_exists&quot;:false,&quot;product_id&quot;:265,&quot;parent_product_id&quot;:265,&quot;product_type&quot;:&quot;simple&quot;,&quot;show_view&quot;:false,&quot;browse_wishlist_text&quot;:&quot;Browse wishlist&quot;,&quot;already_in_wishslist_text&quot;:&quot;&quot;,&quot;product_added_text&quot;:&quot;Product added!&quot;,&quot;heading_icon&quot;:&quot;fa-heart-o&quot;,&quot;available_multi_wishlist&quot;:false,&quot;disable_wishlist&quot;:false,&quot;show_count&quot;:false,&quot;ajax_loading&quot;:false,&quot;loop_position&quot;:&quot;before_image&quot;,&quot;item&quot;:&quot;add_to_wishlist&quot;}">

    Any idea why this is happening?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi there

    This is really strange, expecially since it isn’t always happening
    There is no difference in the button added to the loop and the button obtained with the shortcode (indeed, we use shortcode to print button in the loop)

    Could you please explain a bit better how to reproduce the issue? I’d be glad to perform a test on local installation, if possible

    Thread Starter edival

    (@edival)

    I’m using Divi and Divi Engine for the broken one, whereas only Divi for the working one, so I’m not sure if Divi Engine might change the system. I’m thinking Divi Engine runs after the Yith JS executes which misses the timing for Yith to manipulate the DOM elements. But when I looked at the raw page source I noticed the above issue which is where my concern starts.

    Not sure how to explain it any better. Maybe there’s a way to run the Yith wishlist JS after the page is loaded? I couldn’t find that option.

    Plugin Author YITHEMES

    (@yithemes)

    Hi there

    Wishlist specific js executes on document ready; if you want to re-run initialization for Wishlist elements, you can do so by executing the following line of JS at the specific trigger where it is needed:

    $(document).trigger('yith_wcwl_init');
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Loop Shortcode Issue’ is closed to new replies.