Get image url from BigCommerce API with PHP

寵の児 提交于 2019-12-02 08:54:24

From the code, it looks like the getProductImages has not been implemented. I added a quick patch. Use this pull request if it has not been merged yet (https://github.com/bigcommerce/bigcommerce-api-php/pull/61)

The code looks like this -

$images = Bigcommerce::getProductsImages(243);
print_r($images)

when iterating thru products you can grab the product ID and loop through this:

$images = BigCommerce_Api::getCollection('/products/'.$productID.'/images');

    foreach($images as $image) {
        $curImage=$image->image_file;
            echo '<img src="'.$storeURL.'/product_images/'.$curImage.'"/>';
        }

hope this helps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!