ismail0234 / n11-php-api

Bu api n11 için yazılmıştır. N11 için yazılmış olan gelişmiş bir php apisi. Ekstra olarak n11 üzerinde mağazanıza gelen siparişleri websitenize aktaracak bir fonksiyonda mevcuttur.
https://ismail0234.github.io/n11-php-api/
MIT License
64 stars 36 forks source link

Merhaba Ürün yüklemeyi denerken SOAP-ERROR: Encoding: object has no 'images' property hatası alıyorum. #31

Closed scngnr closed 1 year ago

scngnr commented 1 year ago

$client->product->SaveProduct( array( 'productSellerCode' => "test", 'title' => "test1", 'subtitle' => "test1", 'description' => "11", 'attributes' => array( 'attribute' => array(

    )
  ),
  'category' => array(
    'id' => "11"
  ),
  'price' => 34,
  'currencyType' => '1',
  'images' => [
    'image' => [
      array(
      'url' => 'http://www.ewsyonetim.com/product-images-resized/2419_1.jpg',
      'order' => '1',
      )
      ]
    ],
  'saleStartDate' => '',
  'saleEndDate' => '',
  'productionDate' => '',
  'expirationDate' => '',
  'productCondition' => 1,
  'preparingDay' => 2,
  'discount' => array(
    'startDate' => '',
    'endDate' => '',
    'type' => '',
    'value' => '',
  ),
  'shipmentTemplate' => "Ews",
  'stockItems' => array(
    'stockItem' => array(
      'attributes' => array(
        'attribute' => array(
          'name' => '',
          'value' => '',
        )
      ),
        'bundle' => 'false',
        'mpn' => "1",
        'gtin' => "1",
        'oem' => '',
        'quantity' => "1",
        'n11CatalogId' => '',
        'sellerStockCode' => 'test',
        'optionPrice' => "",
      )
    ),
  'domestic' => 'false',
  'specialProductInfoList' => array(
    'specialProductInfo' => array(
      'key' => '?',
      'value' => '?',
    )
  ),
  'approvalStatus' => '1',
  'groupAttribute' => '',
  'groupItemCode' => '',
  'itemName' => '',
  'unitInfo' => '',
  'maxPurchaseQuantity' => "111",
  )

));

ufukseyithan commented 1 year ago

Bu sorunu çözebildiniz mi?

scngnr commented 1 year ago

Çözdüm, İlginiz için teşekkür ederim.

12 Haz 2023 Pzt 16:01 tarihinde Ufuk Seyithan Erdem < @.***> şunu yazdı:

Bu sorunu çözebildiniz mi?

— Reply to this email directly, view it on GitHub https://github.com/ismail0234/n11-php-api/issues/31#issuecomment-1587298099, or unsubscribe https://github.com/notifications/unsubscribe-auth/APHWVNJW3ADAQTI5PAHIOEDXK4HJ3ANCNFSM6AAAAAAUQSY6QU . You are receiving this because you modified the open/close state.Message ID: @.***>

ufukseyithan commented 1 year ago

Nasıl çözdüğünüzü öğrenebilir miyim? Aynı hatayla ben de karşılaşıyorum.

scngnr commented 1 year ago

N11e iletilen Array içerisinde Optionprice Sonrasına images.image.url, images.image.order Ekleyerek çözmüştüm.

3-4 aydır geliştirmeyi bıraktım. Farklı birşey eklenmediyse bu şekilde

12 Haz 2023 Pzt 16:07 tarihinde Ufuk Seyithan Erdem < @.***> şunu yazdı:

Nasıl çözdüğünüzü öğrenebilir miyim? Aynı hatayla ben de karşılaşıyorum.

— Reply to this email directly, view it on GitHub https://github.com/ismail0234/n11-php-api/issues/31#issuecomment-1587310840, or unsubscribe https://github.com/notifications/unsubscribe-auth/APHWVNKZ56HZWQLEICNUJETXK4ICVANCNFSM6AAAAAAUQSY6QU . You are receiving this because you modified the open/close state.Message ID: @.***>

ufukseyithan commented 1 year ago

Teşekkür ederim. Anlaşılan her bir stockItem için images alanı belirlenmesi gerekiyor. Yalnız gelin görün ki N11'in kendi dökümantasyonunda bu bilgi eksik.

scngnr commented 1 year ago

Karşılaştığınız hatayı xml formatında olmak şartıyla paylaşırsanız doğrudan n11 geliştiricilerinden de yardım alabilirsiniz bilginiz olsun.

12 Haz 2023 Pzt 16:22 tarihinde Ufuk Seyithan Erdem < @.***> şunu yazdı:

Teşekkür ederim. Anlaşılan her bir stockItem için images alanı belirlenmesi gerekiyor. Yalnız gelin görün ki N11'in kendi dökümantasyonunda bu bilgi eksik.

— Reply to this email directly, view it on GitHub https://github.com/ismail0234/n11-php-api/issues/31#issuecomment-1587335813, or unsubscribe https://github.com/notifications/unsubscribe-auth/APHWVNOSA66URGXHSI62E33XK4JYDANCNFSM6AAAAAAUQSY6QU . You are receiving this because you modified the open/close state.Message ID: @.***>