//product.saleStatus //1: Satış Öncesi(Before_Sale) //2: Satışta(On_Sale) //3: Stok yok(Out of_Stock) //4: Satışa kapalı(Sale_Closed) //product.approvalStatus Ürün onay durumu: //1: Aktif(Satışta) //2: Beklemede //3: Yasaklı public void ProducktGetir(string SaticiUrunKodu) // yani stok kodu olarak ne verdiysen o işte { try { String strSellerCode = SaticiUrunKodu; Authentication authentication = new Authentication(); authentication.appKey = strAppKey; authentication.appSecret = strAppSecret; GetProductBySellerCodeRequest request = new GetProductBySellerCodeRequest(); request.auth = authentication; request.sellerCode = strSellerCode; n11ProductService.ProductServicePortService port = new n11ProductService.ProductServicePortService(); //ProductServicePort port = new ProductServicePortService().getProductServicePortSoap11(); GetProductBySellerCodeResponse response = port.GetProductBySellerCode(request); this.title = response.product.title; this.subtitle = response.product.subtitle; this.category = response.product.category; this.description = response.product.description; // detay this.displayPrice = response.product.displayPrice; // Görüntülenen ürün fiyatı(Ürünün indirimler sonucu tanımlanan son fiyat hali) this.discount = response.product.discount; // indirim this.preparingDay = response.product.preparingDay; // hazırlama zamanı this.price = response.product.price; // Ürünün baz fiyatı this.approvalStatus = response.product.approvalStatus; // onay durumu this.attributes = response.product.attributes; // özellikleri biz değiştiremiyoruz n11 den kategoriye göre geliyor. attributes[0].name (bu hep marka) this.productSellerCode = response.product.productSellerCode; // bizdeki stok kodu this.shipmentTemplate = response.product.shipmentTemplate; this.Foto = response.product.images; //this.PreparingDay = Convert.ToInt32(response.product.preparingDay); productCondition = response.product.productCondition; stockItems = response.product.stockItems; //response.product.attributes = new ProductAttribute; } catch (Exception) { throw; } }
public Product GetProductBySellerCode(int urunID) { com.n11Product.api.Authentication authentication = new com.n11Product.api.Authentication { appKey = apiKey, appSecret = apiSecret }; GetProductBySellerCodeRequest getProductBySellerCodeRequest = new GetProductBySellerCodeRequest(); getProductBySellerCodeRequest.auth = authentication; getProductBySellerCodeRequest.sellerCode = urunID.ToString(); ProductServicePortService port = new ProductServicePortService(); GetProductBySellerCodeResponse getProductBySellerCodeResponse = port.GetProductBySellerCode(getProductBySellerCodeRequest); Product product = getProductBySellerCodeResponse.product; return(product); }