Bigcommerce::configure(array(
'client_id' => 'xxxxxx',
'auth_token' => 'xxxxx',
'store_hash' => 'xxxxxx'
));
$product = Bigcommerce::getProduct(3352);
echo $product->name;
echo $product->price;
$product->price = 28.95;
if($product->update()){
$product = Bigcommerce::getProduct(3352);
echo $product->name;
echo $product->price;
}
我有此代码,我们可以提取产品但未更新,请提供帮助
答案 0 :(得分:0)
我能够使此代码正常工作。
<?php
require "vendor/autoload.php";
use Bigcommerce\Api\Client as Bigcommerce;
Bigcommerce::configure(array(
'client_id' => 'XXXXXX',
'auth_token' => 'XXXXX',
'store_hash' => 'XXXXX'
));
$product = Bigcommerce::getProduct(119);
echo $product->name;
echo $product->price;
$product->price = 12.95;
$product->update();
echo $product->price;
?>