Closed utsav closed 8 years ago
There is no need to edit the code. You will need to set it back to 'true'. The CustomCategory field is known in the API as a repeatable field. This means that more than one value can be assigned to it. The SDK treats repeatable fields as arrays.
You can therefore assign values as follows.
$storeCustomCategory->CustomCategory[] = $storeCustomCategoryType;
To be honest this is not explained in the SDK's docs or code.
You may also need to change $requests->StoreCategories = $StoreCategories;
to $requests->StoreCategories = $storeCustomCategory;
as the StoreCategories field is not repeatable and can only take one value.
i'm set unbound to true tryout about what you give and it work perfectly. Thank You @davidtsadler .
I've created some gists that show how to use the SDK using the examples from the API docs.
Add eBay store category Delete eBay store category Move eBay store category Move eBay store category to top Rename eBay store category
i think you have to add this to this repo in trading section. but appreciate for your support. thank you.
now i'm trying to store custom category to ebay store and i got this error
my code is like this.
`$siteId = Constants\SiteIds::US;
$config = config('configuration');
$service = new Services\TradingService(array( 'apiVersion' => $config['tradingApiVersion'], 'sandbox' => true, 'siteId' => $siteId, 'devId' => $config['sandbox']['devId'], 'appId' => $config['sandbox']['appId'], 'certId' => $config['sandbox']['certId'] ));
$requests = new Types\SetStoreCategoriesRequestType();
$requests->RequesterCredentials = new Types\CustomSecurityHeaderType(); $requests->RequesterCredentials->eBayAuthToken = $config['sandbox']['userToken'];
$requests->Action = 'add'; $requests->ItemDestinationCategoryID = intval(1); $requests->DestinationParentCategoryID = intval(0);
$storeCustomCategoryType = new Types\StoreCustomCategoryType(); $storeCustomCategoryType->Name = 'first 1 category testing'; $storeCustomCategoryType->Order = intval(1);
$storeCustomCategory = new Types\StoreCustomCategoryArrayType(); $storeCustomCategory->CustomCategory = $storeCustomCategoryType;
$StoreCategories[] = $storeCustomCategory;
$requests->StoreCategories = $StoreCategories;`
i can't understand this error please reply me with solution.