26 $this->assignProductToWebsite($sku, $this->getWebsiteId(
'test'));
28 $this->assertEquals(10,
$product[
'price']);
31 $this->saveProduct(
$product,
'fixture_second_store');
33 $product = $this->getProduct($sku,
'fixture_third_store');
34 $this->assertEquals(20,
$product[
'price']);
41 'resourcePath' =>
'/V1/products/' .
$product[
'sku'],
47 'operation' => self::PRODUCT_SERVICE_NAME .
'Save' 55 private function getProduct($sku,
$storeCode =
null)
59 'resourcePath' => self::PRODUCTS_RESOURCE_PATH .
'/' . $sku,
65 'operation' => self::PRODUCT_SERVICE_NAME .
'get' 83 'operation' => self::WEBSITES_SERVICE_NAME .
'GetList' 98 private function assignProductToWebsite($sku,
$websiteId)
102 'resourcePath' =>
'/V1/products/' . $sku .
'/websites',
108 'operation' => self::WEBSITE_LINK_SERVICE_NAME .
'save' 113 "productWebsiteLink" => [
const WEBSITE_LINK_SERVICE_NAME
_webApiCall( $serviceInfo, $arguments=[], $webApiAdapterCode=null, $storeCode=null, $integration=null)
const WEBSITES_SERVICE_NAME
const WEBSITES_RESOURCE_PATH
const PRODUCTS_RESOURCE_PATH
if(!isset($_GET['website_code'])) $websiteCode
const PRODUCT_SERVICE_NAME