• Resolved shortblondeguy

    (@shortblondeguy)


    In each of my posts with a photo I want to sell, I have the code below.
    It varies only in the Shopify generated shortcode for different products, and my own shortcode for a description.

    When using Jetpack’s Infinite Scroll, all of my Buy Photo buttons expand using the “javascript:ReverseDisplay” I am using and the Shopify embed loads.

    But only on the first page.
    Scrolling beyond the first seven posts though, the ReverseDisplay expands, but only my own shortcode will display.
    The Shopify shortcode does not.

    If I then go into the post itself (clicking the post’s title) and then click Buy Print, the Shopify embed works properly.

    It also works properly when I TURN OFF Infinite Scroll in Jetpack. When I click “Older Posts” the subsequent pages have properly working Shopify embeds.

    Additionally, I’ve tried to just place the embed code from Shopify.com’s Buy Button code generator, into a post that is beyond the first scroll.

    When I scroll to the post, expecting the embed to be there, it is not.
    If I do this on a post on the first page before the scroll though, the embed loads and everything is there.
    When I go into the post itself too, the embed is loaded, just like my Buy Print button as mentioned above.

    I am launching my Buy Button’s functionality April 1st, and have to turn off Infinite Scroll so potential customers don’t have a poor experience (even though having to click “Older Posts” will be annoying to an end user).

    I’ve contacted Jetpack about this and they’ve been trying to assist but there haven’t been results yet.

    Can you find what might be wrong?

    Thanks!
    Anthony – shortblondeguy.com

    <div class="btn"><a href="javascript:ReverseDisplay('Buy a Print')" style="color: #FFFFFF;">Buy Print!</a></div>
    <div id="Buy a Print" style="display:none;">
    
    [shopify embed_type="product" shop="shortblondeguy-photos.myshopify.com" product_handle="double-sided" show="all"]
    [desc2to3]
    </div>
    
    <script type="text/javascript" language="JavaScript">// <![CDATA[
    function HideContent(d) { document.getElementById(d).style.display = "none"; } function ShowContent(d) { document.getElementById(d).style.display = "block"; } function ReverseDisplay(d) { if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; } else { document.getElementById(d).style.display = "none"; } }
    // ]]></script>

    https://www.ads-software.com/plugins/shopify-ecommerce-shopping-cart/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Shopify

    (@shopify)

    Hey Anthony,

    Site looks great. Did you manage to get everything working the way you’d like it?

    Thread Starter shortblondeguy

    (@shortblondeguy)

    Haha yes I forgot to come back here to give an update of a workaround I came up with.

    There was another issue my workaround solves too.

    The workaround was to turn the WordPress < ! –more– > tag into the Buy Print! button.
    I used CSS to do style it, and I changed the “Continue Reading” text to be “Buy Print!”
    I essentially turned the More tag into the Buy Print! button.

    That in turn jumps people into the actual post.
    That way I don’t need to use a ReverseDisplay Javascript like I was using previously.

    The other issue I discovered was that I couldn’t determine which photo on my first sale, that the customer wanted.
    The Referring URL in the Shopify order was https://shortblondeguy.com/page/3/ which is what showed when I had Infinite Scroll turned off.
    I did not have my workaround in place yet at the time.
    Potentially VERY embarrassing but for that first order know the customer very well and they told me what they ordered.

    My workaround above puts them into the actual photo post’s URL and when they make a purchase I’ll know which photo they want! haha

    Other than my workaround, I’ve seen rumblings about Infinite Scroll breaking content after the first scroll so Shopify, your embed code is not alone. Maybe Jetpack will hear enough about this and look into a fix for a future update.

    Thanks for getting back to me!

    Thread Starter shortblondeguy

    (@shortblondeguy)

    Oh this is resolved.

    Plugin Author Shopify

    (@shopify)

    Hey Anthony,

    Thanks for the update. Yeah, site is looking really good. Glad you found an elegant workaround.

    you know your stuff!

    Cheers,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Shopify Generated Shortcode doesn't load on Jetpack Infinite Scroll.’ is closed to new replies.