question

acmedealz2 avatar image
0 Likes"
acmedealz2 asked

GetCategorySpecifics returns nothing for EbayMotors categories.

GetCategorySpecifics returns nothing for EbayMotors categories. It's working fine for other categories like printer, Accessories or etc, but not get the response for motor categories. Please suggest me for this issue.
getcategoryspecifics
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

helios825 avatar image
0 Likes"
helios825 answered
You may have to use a different SiteID for eBay Motors. If you can show us some code samples, that would help.
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

acmedealz2 avatar image
0 Likes"
acmedealz2 answered
Hello @helios825 I already use this for US SiteID. Please see the attached screenshot. https://screenpresso.com/=oDorg And please suggest me for this issue.
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

helios825 avatar image
0 Likes"
helios825 answered
Please include your screenshot directly in your post. Or post a code sample.
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

acmedealz2 avatar image
0 Likes"
acmedealz2 answered
public List GetItemSpecifics(string CID) { List ItemSpecification = new List (); ApiContext context = new ApiContext(); context.SoapApiServerUrl = ConfigurationManager.AppSettings["SoapApiServerUrl"]; ApiCredential apiCredential = new ApiCredential(); apiCredential.eBayToken = ConfigurationManager.AppSettings["Ebay_Api_Token"]; context.Site = eBay.Service.Core.Soap.SiteCodeType.US; context.ApiCredential = apiCredential; GetCategoryFeaturesCall call = new GetCategoryFeaturesCall(context); call.CategoryID = CID; call.ViewAllNodes = true; call.DetailLevelList.Add(DetailLevelCodeType.ReturnAll); call.Execute(); if (call.CategoryList.Count > 0) { for (int i = 0; i < call.CategoryList.Count; i++) { CategoryFeatureType catFeature = call.CategoryList[0]; string catID = catFeature.CategoryID; if (catFeature.ConditionEnabledSpecified == true)// && catFeature.ConditionEnabled == ConditionEnabledCodeType.Enabled) { foreach (ConditionType condition in catFeature.ConditionValues.Condition) { //get the condition name and value KeyVal kv = new KeyVal(); kv.Key = condition.DisplayName; kv.val = condition.ID.ToString(); //ItemCondition.Add(kv); } } } } GetCategoriesCall gc = new GetCategoriesCall(context); List name = new List (); gc.ViewAllNodes = true; gc.DetailLevelList.Add(DetailLevelCodeType.ReturnAll); gc.CategoryParent = new StringCollection(); gc.CategoryParent.Add(CID); gc.Execute(); if (gc.ApiResponse.Ack == AckCodeType.Success) { Console.WriteLine(gc.ApiResponse.Ack + " : " + gc.ApiResponse.CategoryVersion); CategoryTypeCollection cats = gc.ApiResponse.CategoryArray; GetCategorySpecificsCall gcs = new GetCategorySpecificsCall(context); gcs.CategoryIDList = new StringCollection(); foreach (CategoryType category in cats) { if (category.LeafCategory == true) { gcs.CategoryIDList.Add(category.CategoryID); } } gcs.Execute(); if (gcs.ApiResponse.Ack == AckCodeType.Success) { //iterate through each recommendation if (gcs.RecommendationList != null) { foreach (RecommendationsType recommendations in gcs.RecommendationList) { string catID = recommendations.CategoryID; foreach (NameRecommendationType recommendation in recommendations.NameRecommendation) { name.Add(recommendation.Name); if (recommendation.ValueRecommendation.Count == 0) { } else { try { List vals = new List (); foreach (ValueRecommendationType value in recommendation.ValueRecommendation) { vals.Add(value.Value.ToString()); } ItemSpecKeyCal recom = new ItemSpecKeyCal(); recom.key = recommendation.Name; recom.val = vals; ItemSpecification.Add(recom); } catch (Exception ex) { continue; } } } } } } } return ItemSpecification; }
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

acmedealz2 avatar image
0 Likes"
acmedealz2 answered
@helios825 i have send full code. Please advise me what I do?
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

helios825 avatar image
0 Likes"
helios825 answered
Where in your code do you specify the SiteID ? I can't find it.
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

acmedealz2 avatar image
0 Likes"
acmedealz2 answered
@helios825 Using following : context.Site = eBay.Service.Core.Soap.SiteCodeType.US;
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

helios825 avatar image
0 Likes"
helios825 answered
Thanks for pointing that out. As I said in my original post, you may need to use a SiteID/SiteCode for eBay Motors instead of US. (But I'm not sure if that will help.)
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

acmedealz2 avatar image
0 Likes"
acmedealz2 answered
@helios825 Hello dude. It's working fine as per your suggestion. Thank you so much for help.
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.