• Hi,

    I wan’t to fetch images of product on products-single.php.

    $product = $db->get_product_from_product_id( {productID} );
    $images = unserialize($product[0]->images)

    I tried this code but it seems it only fetch single image which is the first image. What I basically want is to create a slider on product-single page instead of default gallery.

    Thanks!

Viewing 1 replies (of 1 total)
  • Plugin Author andrewmrobbins

    (@andrewmrobbins)

    @yvsjhndl14

    Hey there!

    There are two reasons why that code would only return one image. The first reason is if the product inside Shopify only has one image set. I’m assuming this isn’t the case.

    The second reason is because the syncing process only brought over 1 image for some reason. To test this, go into the plugin Tools and use the Remove all synced data button followed by Sync Product & Collection Detail Pages. Once the sync is finished, try running the above code again.

Viewing 1 replies (of 1 total)
  • The topic ‘Fetch Images’ is closed to new replies.