Skip to content

Commit

Permalink
Merge pull request #4 from eminks/master
Browse files Browse the repository at this point in the history
Ürün ekleme fonksiyonu eklendi
  • Loading branch information
ismail0234 authored Feb 8, 2021
2 parents ec82b7d + 80a1173 commit 531dc12
Show file tree
Hide file tree
Showing 11 changed files with 172 additions and 30 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### Version 1.1.3
* SOAP istekleri ve ürün ekleme ile ilgili sorunlar giderildi

#### Version 1.1.2
* Webhook sqlite şişme sorunu düzeltildi.
* Helper namespace webhookservice dosyasında düzenlendi.
Expand Down
18 changes: 9 additions & 9 deletions IS/PazarYeri/N11/Services/CategoryService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public function getTopLevelCategories($client)
{

return $client->sendRequest('getTopLevelCategories');
return $client->sendRequest('GetTopLevelCategories');

}

Expand All @@ -30,10 +30,10 @@ public function getTopLevelCategories($client)
* ve bu özelliklere ait değerlerin listelenmesi için kullanılan metottur.
*
*/
public function getCategoryAttributes($client, $categoryId, $pagination = array())
public function GetCategoryAttributes($client, $categoryId, $pagination = array())
{

return $client->sendRequest('getCategoryAttributes', array('categoryId' => $categoryId, 'pagingData' => $pagination));
return $client->sendRequest('GetCategoryAttributes', array('categoryId' => $categoryId, 'pagingData' => $pagination));

}

Expand All @@ -43,10 +43,10 @@ public function getCategoryAttributes($client, $categoryId, $pagination = array(
* bu kategorilere ait olan özelliklerin listelenmesi için kullanılan metoddur.
*
*/
public function getCategoryAttributesId($client, $categoryId)
public function GetCategoryAttributesId($client, $categoryId)
{

return $client->sendRequest('getCategoryAttributesId', array('categoryId' => $categoryId));
return $client->sendRequest('GetCategoryAttributesId', array('categoryId' => $categoryId));

}

Expand All @@ -56,10 +56,10 @@ public function getCategoryAttributesId($client, $categoryId)
* o özelliğe ait değerleri listeler.
*
*/
public function getCategoryAttributeValue($client, $attributeId, $pagination = array())
public function GetCategoryAttributeValue($client, $attributeId, $pagination = array())
{

return $client->sendRequest('getCategoryAttributeValue', array('categoryProductAttributeId' => $attributeId, 'pagingData' => $pagination));
return $client->sendRequest('GetCategoryAttributeValue', array('categoryProductAttributeId' => $attributeId, 'pagingData' => $pagination));

}

Expand All @@ -73,7 +73,7 @@ public function getCategoryAttributeValue($client, $attributeId, $pagination = a
public function getParentCategory($client, $categoryId)
{

return $client->sendRequest('getParentCategory', array('categoryId' => $categoryId));
return $client->sendRequest('GetParentCategory', array('categoryId' => $categoryId));

}

Expand All @@ -87,7 +87,7 @@ public function getParentCategory($client, $categoryId)
public function getSubCategories($client, $categoryId)
{

return $client->sendRequest('getSubCategories', array('categoryId' => $categoryId));
return $client->sendRequest('GetSubCategories', array('categoryId' => $categoryId));

}

Expand Down
8 changes: 4 additions & 4 deletions IS/PazarYeri/N11/Services/CityService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public function getCities($client)
{

return $client->sendRequest('getCities');
return $client->sendRequest('GetCities');

}

Expand All @@ -33,7 +33,7 @@ public function getCities($client)
public function getCity($client, $cityId)
{

return $client->sendRequest('getCity', array('cityCode' => $cityId));
return $client->sendRequest('GetCity', array('cityCode' => $cityId));

}

Expand All @@ -46,7 +46,7 @@ public function getCity($client, $cityId)
public function getDistrict($client, $cityId)
{

return $client->sendRequest('getDistrict', array('cityCode' => $cityId));
return $client->sendRequest('GetDistrict', array('cityCode' => $cityId));

}

Expand All @@ -59,7 +59,7 @@ public function getDistrict($client, $cityId)
public function getNeighborhoods($client, $districtId)
{

return $client->sendRequest('getNeighborhoods', array('districtId' => $districtId));
return $client->sendRequest('GetNeighborhoods', array('districtId' => $districtId));

}

Expand Down
4 changes: 2 additions & 2 deletions IS/PazarYeri/N11/Services/OrderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function orderList($client, $data = array())
$query['pagingData'] = $data['pagingData'];
}

return $client->sendRequest('orderList', $query);
return $client->sendRequest('OrderList', $query);

}

Expand All @@ -81,7 +81,7 @@ public function orderList($client, $data = array())
public function orderDetail($client, $Id)
{

return $client->sendRequest('orderDetail', array('orderRequest' => array('id' => $Id)));
return $client->sendRequest('OrderDetail', array('orderRequest' => array('id' => $Id)));

}

Expand Down
8 changes: 4 additions & 4 deletions IS/PazarYeri/N11/Services/ProductSellingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public function stopSellingProductByProductId($client, $productId)
{

return $client->sendRequest('stopSellingProductByProductId', array('productId' => $productId));
return $client->sendRequest('StopSellingProductByProductId', array('productId' => $productId));

}

Expand All @@ -32,7 +32,7 @@ public function stopSellingProductByProductId($client, $productId)
public function startSellingProductBySellerCode($client, $productSellerCode)
{

return $client->sendRequest('startSellingProductBySellerCode', array('productSellerCode' => $productSellerCode));
return $client->sendRequest('StartSellingProductBySellerCode', array('productSellerCode' => $productSellerCode));

}

Expand All @@ -44,7 +44,7 @@ public function startSellingProductBySellerCode($client, $productSellerCode)
public function startSellingProductByProductId($client, $productId)
{

return $client->sendRequest('startSellingProductByProductId', array('productId' => $productId));
return $client->sendRequest('StartSellingProductByProductId', array('productId' => $productId));

}

Expand All @@ -56,7 +56,7 @@ public function startSellingProductByProductId($client, $productId)
public function stopSellingProductBySellerCode($client, $productSellerCode)
{

return $client->sendRequest('stopSellingProductBySellerCode', array('productSellerCode' => $productSellerCode));
return $client->sendRequest('StopSellingProductBySellerCode', array('productSellerCode' => $productSellerCode));

}

Expand Down
24 changes: 18 additions & 6 deletions IS/PazarYeri/N11/Services/ProductService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public function getProductByProductId($client, $productId)
{

return $client->sendRequest('getProductByProductId', array('productId' => $productId));
return $client->sendRequest('GetProductByProductId', array('productId' => $productId));

}

Expand All @@ -32,7 +32,7 @@ public function getProductByProductId($client, $productId)
public function getProductBySellerCode($client, $sellerCode)
{

return $client->sendRequest('getProductBySellerCode', array('sellerCode' => $sellerCode));
return $client->sendRequest('GetProductBySellerCode', array('sellerCode' => $sellerCode));

}

Expand All @@ -44,9 +44,21 @@ public function getProductBySellerCode($client, $sellerCode)
public function getProductList($client, $pagination = array())
{

return $client->sendRequest('getProductList', array('pagingData' => $pagination));
return $client->sendRequest('GetProductList', array('pagingData' => $pagination));

}

/**
*
* @description Mağaza'ya yeni ürün eklemek için kullanılır
*
*/

public function SaveProduct($client, $product = array()) {
return $client->sendRequest('SaveProduct', array('product' => $product));

}


/**
*
Expand All @@ -56,7 +68,7 @@ public function getProductList($client, $pagination = array())
public function deleteProductById($client, $productId)
{

return $client->sendRequest('deleteProductById', array('productId' => $productId));
return $client->sendRequest('DeleteProductById', array('productId' => $productId));

}

Expand All @@ -68,7 +80,7 @@ public function deleteProductById($client, $productId)
public function deleteProductBySellerCode($client, $productSellerCode)
{

return $client->sendRequest('deleteProductBySellerCode', array('productSellerCode' => $productSellerCode));
return $client->sendRequest('DeleteProductBySellerCode', array('productSellerCode' => $productSellerCode));

}

Expand Down Expand Up @@ -111,4 +123,4 @@ public function deleteProductBySellerCode($client, $productSellerCode)
}*/

}
}
2 changes: 1 addition & 1 deletion IS/PazarYeri/N11/Services/ProductStockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
public function getProductStockByProductId($client, $productId)
{

return $client->sendRequest('getProductStockByProductId', array('productId' => $productId));
return $client->sendRequest('GetProductStockByProductId', array('productId' => $productId));

}

Expand Down
2 changes: 1 addition & 1 deletion IS/PazarYeri/N11/Services/ShipmentCompanyService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public function getShipmentCompanies($client)
{

return $client->sendRequest('getShipmentCompanies');
return $client->sendRequest('GetShipmentCompanies');

}

Expand Down
4 changes: 2 additions & 2 deletions IS/PazarYeri/N11/Services/ShipmentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public function getShipmentTemplateList($client)
{

return $client->sendRequest('getShipmentTemplateList');
return $client->sendRequest('GetShipmentTemplateList');

}

Expand All @@ -32,7 +32,7 @@ public function getShipmentTemplateList($client)
public function getShipmentTemplate($client, $name)
{

return $client->sendRequest('getShipmentTemplate', array('name' => $name));
return $client->sendRequest('GetShipmentTemplate', array('name' => $name));

}

Expand Down
128 changes: 128 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,134 @@ $client->product->getProductBySellerCode('IS-20014');
*/
$client->product->getProductList(array('currentPage' => 0, 'pageSize' => 20));

/**
*
* @description Mağazaya yeni ürün eklemek için kullanılır.
* @param array eklenecek ürün bilgileri - Zorunlu
*
*/
$client->product->SaveProduct(
array(
'productSellerCode' => 'TF23094823',
'title' => 'Mavi Toparlayıcı Efekt Skinny Pantolon',
'subtitle' => 'Curabitur blandit consequat libero, ac suscipit leo luctusrfggfgf',
'description' => 'Curabitur blandit consequat libero, ac suscipit leo luctus eget. Etiam condimentum augue at quam sagittis bibendum. Quisque vitae malesuada urna. Proi',
'domestic' => 'false',
'category' => array(
'id' => '1002201'
),
'specialProductInfoList' => array(
'specialProductInfo' => array(
'key' => '?',
'value' => '?',
)
),
'price' => '185.00',
'currencyType' => '1',
'images' => array(
'image' => array(
array(
'url' => 'https://contents.mediadecathlon.com/p1058366/k20d731c11ef86aad6039daa20fb66dc3/1058366_default.jpg',
'order' => '1',
),
array(
'url' => 'https://contents.mediadecathlon.com/p1058366/k20d731c11ef86aad6039daa20fb66dc3/1058366_default.jpg',
'order' => '2',
),
array(
'url' => 'https://contents.mediadecathlon.com/p1058366/k20d731c11ef86aad6039daa20fb66dc3/1058366_default.jpg',
'order' => '3',
),
array(
'url' => 'https://contents.mediadecathlon.com/p1058366/k20d731c11ef86aad6039daa20fb66dc3/1058366_default.jpg',
'order' => '4',
),
array(
'url' => 'https://contents.mediadecathlon.com/p1058366/k20d731c11ef86aad6039daa20fb66dc3/1058366_default.jpg',
'order' => '5',
),
array(
'url' => 'https://contents.mediadecathlon.com/p1058366/k20d731c11ef86aad6039daa20fb66dc3/1058366_default.jpg',
'order' => '6',
)
)
),
'approvalStatus' => '1',
'attribute' => array(),
'saleStartDate' => '',
'saleEndDate' => '',
'productionDate' => '',
'expirationDate' => '',
'productCondition' => 1,
'preparingDay' => 3,
'discount' => array(
'startDate' => '',
'endDate' => '',
'type' => '',
'value' => '',
),
'shipmentTemplate' => 'termos',
'stockItems' => array(
'stockItem' => array(
array(
'bundle' => 'false',
'mpn' => '112',
'gtin' => '0190198066473',
'oem' => '',
'quantity' => '855',
'n11CatalogId' => '',
'sellerStockCode' => '112',
'optionPrice' => '185.00',
'attributes' => array(
'attribute' => array(
array(
'name' => 'Sezon',
'value' => '2013 Sonbahar-Kış'
),
array(
'name' => 'Cinsiyet',
'value' => 'Erkek',
),
array(
'name' => 'Beden',
'value' => '145',
),
array(
'name' => 'Desen',
'value' => 'Nakışlı',
),
array(
'name' => 'Ürün_Detayı',
'value' => 'Kapüşonlu',
),
array(
'name' => 'İçerik',
'value' => 'Brode,Brokar,İnterlok',
),
array(
'name' => 'Marka',
'value' => 'Esteem',
),
array(
'name' => 'Renk',
'value' => 'Gri',
)
)
)
)
)
),
'unitInfo' => array(
'unitType' => '',
'unitWeight' => ''
),
'maxPurchaseQuantity' => '122',
'groupAttribute' => '',
'groupItemCode' => '',
'itemName' => ''
)
);

/**
*
* @description Kayıtlı olan bir ürünü N11 Id si kullanarak silmek için kullanılır.
Expand Down
Loading

0 comments on commit 531dc12

Please sign in to comment.