Aslında kodlarda sorun yok gibi gittigidiyor yazılım bölümüyle görüşmek istedim fakat hiç kimseye ulaşamadım ne telefonlara bakıyorlar ne maillere dönüş yapıyorlar anlamadık.
Kısaca Şöyle bir metod yazdım ürünleri excelden okuyor şimdilik test amaçlı yapacağız zaten şimdilik
public IslemDurum UrunEkle(string itemId, string urunadi, string aciklama, string kategori_kodu, string kargo_firmasi, string kargo_sehri, string kargo_tipi, string resim_url, double fiyat, GittiGidiyor.Category.categorySpecType spec = null, bool forceToSpecEntry = false, bool nextDateOption = false)
{
SetLoginConfig(); // Opsiyonel Tekrar Set Ediliyor...
GittiGidiyor.Product.productType productType = new GittiGidiyor.Product.productType();
productType.title = urunadi;
productType.buyNowPrice = fiyat;
productType.description = aciklama;
productType.format = "F";
productType.buyNowPriceSpecified = true;
productType.listingDays = 1;
productType.listingDaysSpecified = true;
productType.startPriceSpecified = false;
productType.categoryCode = kategori_kodu;
GittiGidiyor.Product.cargoDetailType kargo = new GittiGidiyor.Product.cargoDetailType();
kargo.city = kargo_sehri;
string[] kargolar = new string[1] { kargo_firmasi };
kargo.cargoCompanies = kargolar;
kargo.shippingPayment = kargo_tipi;
kargo.shippingWhere = "country";
productType.cargoDetail = kargo;
productType.pageTemplate = 1;
productType.pageTemplateSpecified = true;
productType.productCount = 2;
productType.productCountSpecified = true;
productType.vitrineOptionSpecified = true;
GittiGidiyor.Product.photoType photo = new GittiGidiyor.Product.photoType();
photo.photoId = 1;
photo.url = resim_url;
photo.photoIdSpecified = true;
productType.photos = new GittiGidiyor.Product.photoType[1] { photo };
//VARSAYLAN SPEC DEĞERLERİNİ ALIP ÜRÜNE ATIYOR
GittiGidiyor.Product.specType spctyp = null;
GittiGidiyor.Product.specType[] spectypes = null;
GittiGidiyor.Category.CategoryService categoryser = GittiGidiyor.ServiceProvider.getCategoryService();
GittiGidiyor.Category.categoryServiceResponse categoryresponse = categoryser.getCategory(kategori_kodu, true, true, true, "tr");
if (categoryresponse != null && categoryresponse.ackCode.Equals("success") == true)
{
GittiGidiyor.Category.categoryType[] cattype = categoryresponse.categories;
if (cattype != null)
{
foreach (GittiGidiyor.Category.categoryType item in cattype)
{
GittiGidiyor.Category.categorySpecType[] categoryspecs = item.specs;
spectypes = new GittiGidiyor.Product.specType[categoryspecs.Length];
int x = 0;
foreach (GittiGidiyor.Category.categorySpecType categoryspec in categoryspecs)
{
spctyp = new GittiGidiyor.Product.specType();
spctyp.name = categoryspec.name;
spctyp.value = categoryspec.values[0];
spctyp.type = categoryspec.type;
spctyp.required = true;
spctyp.requiredSpecified = true;
spectypes
x++;
}
}
}
}
//------------------------------------------------------------------------------
//Eğer varsayılan spec dışında bir değer girilecekse o burda atanıyor. Örnek: Marka değeri varsayılandan farklı
if (spec != null)
{
for (int x = 0; x < spectypes.Length; x++)
{
if (spectypes
{
spectypes
spectypes
spectypes
- .requiredSpecified = true;
spectypes
break;
}
}
}
productType.specs = spectypes;
System.Net.ServicePointManager.Expect100Continue = true;
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
IslemDurum Sonuc = new IslemDurum();
this.SureBaslat();
try
{
var Deger = new object();
GittiGidiyor.Product.ProductService ProductService = ServiceProvider.getProductService();
GittiGidiyor.Product.productServiceResponse productServiceResponse = ProductService.insertProduct(itemId, productType, forceToSpecEntry, nextDateOption, lang);
if (productServiceResponse != null && productServiceResponse.ackCode.ToString().Equals("success"))
{
Deger = productServiceResponse; //productServiceResponse rivayete göre sonucu ürün bilgisini döndürüyormuş
}
else
{
Deger = productServiceResponse.error.message;
}
Sonuc.Deger = Deger;
Sonuc.Durum = true;
Sonuc.Hata = null;
Sonuc.Mesaj = "İşlem Başarılı";
}
catch (Exception Hata)
{
Sonuc = new IslemDurum();
Sonuc.Deger = null;
Sonuc.Durum = false;
Sonuc.Hata = Hata;
Sonuc.Mesaj = "İşlem Başarısız";
}
finally
{
this.SureBitir();
}
return Sonuc;
}