• Resolved fanostheo

    (@fanostheo)


    I am in the process of testing the WP Shopify APP to see if this is the solution we want to use. I created a test site and test page. I have successfully synced Shopify to WP without issues. The test products and test collections are showing in the products/collections section in WP under the WP Shopify tab but they just won’t show on the page itself when using shortcodes. Not sure what else to do here. All I get is the message “Loading products…” or “Loading collections…” depending on which shortcode I use.

    Can someone please help? This is urgent.

    • This topic was modified 4 years, 9 months ago by fanostheo.

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

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author andrewmrobbins

    (@andrewmrobbins)

    @fanostheo

    Hey there,

    It looks like you have a couple JavaScript errors showing up on that page that are unrelated to the plugin. This can prevent the plugin from loading.

    Can you try deactivating your other plugins temporarily top see if the loading message goes away?

    Also try switching to a default theme.

    I’m having exactly this problem. I have about 10 products that just won’t load on their individual product pages. They show up in collections and lists, but if you click through, you get the gray “loading” bars and they just never load. I’ve resynced the data 5 times now, cleared the cache, and checked for javascript errors. I’ve updated to the latest Pro version, and checked the products for any differences they have with other products. Nothing.

    Here is an example:

    https://shopredbird.com/products/c-small-plaza-letter/

    Any advice? I’ve been pretty frustrated today trying to get this working, and my client is breathing down my neck.

    Plugin Author andrewmrobbins

    (@andrewmrobbins)

    @creativepickle

    Here are a few things you can try:

    1. Use the “Remove all Shopify data” tool first before resyncing.

    2. Deactivate the plugin, reactivate, and try syncing again. Doing this will ensure all the necessary database values are set which, when missing, can sometimes produce this error.

    3. Try deactivating all your other plugins temporarily and then resync. Sometimes conflicts with other plugins can cause this to happen.

    Let me know if any of these help!

    Thanks Andrew-

    I tried these. To be specific, here is what I did:

    1) Removed all synced data in WPS
    2) Deactivated all plugins
    3) Re-Activated WPS
    4) Resynced all data

    The result was that my main navigation broke, and the items that were not working before are still not working. Any other ideas? It is strange because it is specific to these same 10 or so items. Everything else works fine.

    Thanks for any other advice. I do really need to get this working.

    Plugin Author andrewmrobbins

    (@andrewmrobbins)

    @creativepickle

    Do your products load if you temporarily switch to another theme?

    Yes, they do. In my custom theme I am using more or less the default wps template code, with a few different wrappers and some ACF custom field calls. My page code:

    <?php
    
    defined('ABSPATH') ?: die;
    
    get_header('wps');
    
    global $post;
    
    $Products = WP_Shopify\Factories\Render\Products\Products_Factory::build();
    
    $Products->products([
       'title' => $post->post_title,
       'dropzone_product_buy_button' => '#product_buy_button',
       'dropzone_product_title' => '#product_title',
       'dropzone_product_description' => '#product_description',
       'dropzone_product_pricing' => '#product_pricing',
       'dropzone_product_gallery' => '#product_gallery',
       'hide_wrapper' => true,
       'show_compare_at'=>'true',
       'add_to_cart_button_text' => 'Add to Cart'
    ]);
    
    ?>
    
    <section class="banner-section subpage scaler" style="background:url(<?php if(get_field('banner_image')){ $img = get_field('banner_image');echo $img['url'];} else{$images = get_field('default_banner_images', 'option');$rand = array_rand($images, 1);echo $images[$rand]['url'];} ?>) no-repeat center center;">
    			<div class="banner-content central centered">
    				<h1 class="banner-title"><?php the_title(); ?></h1>
    			</div>
    		</section>
    
    <div class="central content-wrap">
    	<div id="primary" class="content-area">
    		<main id="main" class="site-main">
    		
    <section class="wps-container">
    
       <?php do_action('wps_breadcrumbs') ?>
    
       <div class="wps-product-single row">
    
          <div class="wps-product-single-gallery col">
             <div id="product_gallery"></div>
          </div>
    
          <div class="wps-product-single-content col">
             <div id="product_title">
                <?php   
    
                // Renders title server-side for SEO
                $Products->title([
                   'post_id' => $post->ID,
                   'render_from_server' => true
                ]);
    			
    
                ?>
             </div>
             <div id="product_pricing"></div>
             <div id="product_description">
    
             <?php   
    
                // Renders description server-side for SEO
                $Products->description([
                   'post_id' => $post->ID,
                   'render_from_server' => true
                ]);
             ?>
    
             </div>
             <div id="product_buy_button"></div>
    
          </div>
    
       </div>
    
    </section>
    
    </main><!-- #main -->
    	</div><!-- #primary -->
    	
    
    </div>
    <?php
    
    get_footer('wps');
    Plugin Author andrewmrobbins

    (@andrewmrobbins)

    @creativepickle Thanks for sending this over. What plugin version are you using? 2.2.3?

    Yes. 2.2.3.

    Plugin Author andrewmrobbins

    (@andrewmrobbins)

    @creativepickle

    Ok I think I might see the problem here.

    Change these lines in your template:
    get_header('wps');
    get_footer('wps');

    To these:
    get_header('wpshopify');
    get_footer('wpshopify');

    Sorry, that didn’t do it. Also it seems like if that was the issue it would have affected more than just these few products. For example this one doesn’t load:

    https://shopredbird.com/products/c-small-plaza-letter/

    But this one loads fine:

    https://shopredbird.com/products/baroque-pearl-coin-choker/

    If it sheds any light, the ones that don’t load were all added to shopify together (like within a few minutes of each other) and were the most recent ones added.

    Thanks for your continued help with this!

    Hi Andrew- wondering if you had any more advice on this issue.

    Thanks!

    Plugin Author andrewmrobbins

    (@andrewmrobbins)

    @creativepickle

    I’m almost positive that the core issue here is coming from your wps-templates theme overrides.

    Can you try going into your theme and renaming the wps-templates folder to something like wps-templates-off? Doing this will temporarily turn off your template customizations.

    Now reload the product page, does the product load?

    Hi Andrew-

    I finally got it working by changing

    $Products->products([
       'title' => $post->post_title,
       'dropzone_product_buy_button' => '#product_buy_button',
       'dropzone_product_title' => '#product_title',
       'dropzone_product_description' => '#product_description',
       'dropzone_product_pricing' => '#product_pricing',
       'dropzone_product_gallery' => '#product_gallery',
       'hide_wrapper' => true,
       'show_compare_at'=>'true',
       'add_to_cart_button_text' => 'Add to Cart'
    ]);

    to this:

    $args = apply_filters('wps_products_single_args', [
       'product_id' => $DB_Products->get_product_ids_from_post_ids($post->ID),
       'dropzone_product_buy_button' => '#product_buy_button',
       'dropzone_product_title' => '#product_title',
       'dropzone_product_description' => '#product_description',
       'dropzone_product_pricing' => '#product_pricing',
       'dropzone_product_gallery' => '#product_gallery',
       'hide_wrapper' => true,
       'limit' => 1,
       'show_compare_at'=>'true',
       'add_to_cart_button_text' => 'Add to Cart'
    ]);
    
    $Products->products($args);

    Still not sure why it only affected certain items, but it works now, so I am moving on. Thanks for your help!

    Plugin Author andrewmrobbins

    (@andrewmrobbins)

    @creativepickle

    Excellent, glad you got it working! Looks like it was probably due to the product_id vs title lookup.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Products synced but not showing on product page’ is closed to new replies.