我需要在与 Bigcommerce 的 PHP 代码连接中有所了解,在此代码中它有一个输出“startupmiddlemiddle1”,但它无法输出产品。非常感谢您的帮助。谢谢!
<?php
echo "start";
require 'bigcommerce-api-php-master/bigcommerce.php';
use Bigcommerce\Api\Client as Bigcommerce;
echo "up";
Bigcommerce::configure(array(
'store_url' => 'https://store-h9a8oj.mybigcommerce.com/',
'username' => 'admin',
'api_key' => 'xxxxxxxxxxxxxxxxxxxxxxx'
));
echo "middle";
Bigcommerce::setCipher('RC4-SHA');
Bigcommerce::verifyPeer(false);
echo "middle1";
$products = Bigcommerce::getProducts();
foreach($products as $product) {
echo $product->name;
echo $product->price;
}
echo "end";
?>