-
Notifications
You must be signed in to change notification settings - Fork 15
/
index.php
98 lines (87 loc) · 2.79 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
include "n11.class.php";
$n11Params = [
'appKey' => 'API_BILGILERINIZDEN_DOLDURUN',
'appSecret' => 'API_BILGILERINIZDEN_DOLDURUN'
];
$n11 = new N11($n11Params);
$categories = $n11->GetTopLevelCategories();
var_dump($categories);
//* N11 Şehir Bilgileri
$cities = $n11->GetCities();
var_dump($cities);
//* N11 Ürün Listesini Çekme
$productList = $n11->GetProductList(5, 0);
var_dump($productList);
//* N11 Kayıtlı Ürünü Çekme
$getProductBySeller = $n11->GetProductBySellerCode('db0000');
var_dump($getProductBySeller);
//*N11 Ürün Kaydetme
$saveProduct = $n11->SaveProduct(
[
'productSellerCode' => 'az32897591',
'title' => 'Deneme üründür satın almayınız.',
'subtitle' => 'Api Test ürünü ',
'description' => 'Deneme ürünümüz.',
'attributes' =>
[
'attribute' => Array()
],
'category' =>
[
'id' => 1000038
],
'price' => 0.99,
'currencyType' => 'TL',
'images' =>
[
'image' =>
[
'url' => 'http://alyamedya.com/uploads/alya-medya-logo1.png',
'order' => 1
]
],
'saleStartDate' => '',
'saleEndDate' => '',
'productionDate' => '',
'expirationDate' => '',
'productCondition' => '1',
'preparingDay' => '3',
'discount' => 10,
'shipmentTemplate' => 'Alıcı Öder',
'stockItems' =>
[
'stockItem' =>
[
'quantity' => 1,
'sellerStockCode' => 'stokkodu',
'attributes' =>
[
'attribute' => []
],
'optionPrice' => 0.99
]
]
]
);
var_dump($saveProduct);
//* N11 Ürün Silme
$deleteProductBySeller = $n11->DeleteProductBySellerCode('az3289759');
var_dump($deleteProductBySeller);
//* N11 Sipariş Listesi
$orderList = $n11->OrderList (
[
"productId"=>'',
"status"=> 'New',
"buyerName"=> '',
"orderNumber"=> '',
"productSellerCode" =>'',
"recipient"=> '',
"period"=>[
"startDate"=> '?',
"endDate"=> '?'
]
]
);
var_dump($orderList);
?>