1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-27 22:18:36 +02:00

OZON: Добавление товаров

This commit is contained in:
Anton
2024-08-21 22:07:46 +03:00
parent 45c65c0dd8
commit 967d406b51
25 changed files with 6624 additions and 4589 deletions

View File

@@ -0,0 +1,20 @@
 Video = "https://rutube.ru/video/c6cc4d620b1d4338901770a44b3e82f4/";
ItemStructure = New Structure;
ItemStructure.Insert("description_category_id", 17028922);
ItemStructure.Insert("name" , "Protective film set for X3 NFC. Dark cotton");
ItemStructure.Insert("offer_id" , "143210608");
ItemStructure.Insert("barcode" , "112772873170");
ItemStructure.Insert("price" , "1000");
ItemStructure.Insert("old_price" , "1100");
ItemStructure.Insert("vat" , "0.1");
ItemStructure.Insert("height" , 250);
ItemStructure.Insert("width" , 150);
ItemStructure.Insert("depth" , 10);
ItemStructure.Insert("dimension_unit" , "mm");
ItemStructure.Insert("weight" , 100);
ItemStructure.Insert("weight_unit" , "g");
// Video
OPI_Ozon.AddProductVideo(ItemStructure, Video, "viedo1");

View File

@@ -0,0 +1,20 @@
 Video = "https://rutube.ru/video/c6cc4d620b1d4338901770a44b3e82f4/";
ItemStructure = New Structure;
ItemStructure.Insert("description_category_id", 17028922);
ItemStructure.Insert("name" , "Protective film set for X3 NFC. Dark cotton");
ItemStructure.Insert("offer_id" , "143210608");
ItemStructure.Insert("barcode" , "112772873170");
ItemStructure.Insert("price" , "1000");
ItemStructure.Insert("old_price" , "1100");
ItemStructure.Insert("vat" , "0.1");
ItemStructure.Insert("height" , 250);
ItemStructure.Insert("width" , 150);
ItemStructure.Insert("depth" , 10);
ItemStructure.Insert("dimension_unit" , "mm");
ItemStructure.Insert("weight" , 100);
ItemStructure.Insert("weight_unit" , "g");
// Videocover
OPI_Ozon.AddProductVideoCover(ItemStructure, Video);

View File

@@ -0,0 +1,21 @@
 ItemStructure = New Structure;
ItemStructure.Insert("description_category_id", 17028922);
ItemStructure.Insert("name" , "Protective film set for X3 NFC. Dark cotton");
ItemStructure.Insert("offer_id" , "143210608");
ItemStructure.Insert("barcode" , "112772873170");
ItemStructure.Insert("price" , "1000");
ItemStructure.Insert("old_price" , "1100");
ItemStructure.Insert("vat" , "0.1");
ItemStructure.Insert("height" , 250);
ItemStructure.Insert("width" , 150);
ItemStructure.Insert("depth" , 10);
ItemStructure.Insert("dimension_unit" , "mm");
ItemStructure.Insert("weight" , 100);
ItemStructure.Insert("weight_unit" , "g");
CategoryAttribute1 = New Structure("dictionary_value_id,value", 971082156, "Speaker stand");
CategoryAttribute2 = New Structure("value", "Protective film set for X3 NFC. Dark cotton");
OPI_Ozon.CompleteComplexAttribute(ItemStructure, 5076 , 0, CategoryAttribute1);
OPI_Ozon.CompleteComplexAttribute(ItemStructure, 9048 , 0, CategoryAttribute2);

View File

@@ -0,0 +1,48 @@
 ClientID = "2128753";
APIKey = "7cc90d26-33e4-499b...";
Image1 = "https://openintegrations.dev/test_data/picture.jpg";
Image2 = "https://openintegrations.dev/test_data/picture2.jpg";
Video = "https://rutube.ru/video/c6cc4d620b1d4338901770a44b3e82f4/";
ImageArray = New Array;
ImageArray.Add(Image1);
ImageArray.Add(Image2);
// Common fields
ItemStructure = New Structure;
ItemStructure.Insert("description_category_id", 17028922);
ItemStructure.Insert("name" , "Protective film set for X3 NFC. Dark cotton");
ItemStructure.Insert("offer_id" , "143210608");
ItemStructure.Insert("barcode" , "112772873170");
ItemStructure.Insert("price" , "1000");
ItemStructure.Insert("old_price" , "1100");
ItemStructure.Insert("vat" , "0.1");
ItemStructure.Insert("height" , 250);
ItemStructure.Insert("width" , 150);
ItemStructure.Insert("depth" , 10);
ItemStructure.Insert("dimension_unit" , "mm");
ItemStructure.Insert("weight" , 100);
ItemStructure.Insert("weight_unit" , "g");
ItemStructure.Insert("images" , ImageArray);
// Video
OPI_Ozon.AddProductVideo(ItemStructure, Video, "viedo1");
// Attributes individualized for different categories
CategoryAttribute1 = New Structure("dictionary_value_id,value", 971082156, "Speaker stand");
CategoryAttribute2 = New Structure("dictionary_value_id,value", 5060050 , "Samsung");
CategoryAttribute3 = New Structure("dictionary_value_id,value", 61576 , "gray");
CategoryAttribute4 = New Structure("dictionary_value_id,value", 95911 , "Protective film set for X3 NFC. Dark cotton");
CategoryAttribute5 = New Structure("value", "Protective film set for X3 NFC. Dark cotton");
OPI_Ozon.CompleteComplexAttribute(ItemStructure, 5076 , 0, CategoryAttribute1);
OPI_Ozon.CompleteComplexAttribute(ItemStructure, 85 , 0, CategoryAttribute2);
OPI_Ozon.CompleteComplexAttribute(ItemStructure, 10096, 0, CategoryAttribute3);
OPI_Ozon.CompleteComplexAttribute(ItemStructure, 8229 , 0, CategoryAttribute4);
OPI_Ozon.CompleteComplexAttribute(ItemStructure, 9048 , 0, CategoryAttribute5);
Result = OPI_Ozon.CreateUpdateProducts(ClientID, APIKey, ItemStructure);

View File

@@ -0,0 +1,5 @@
 ClientID = "2128753";
APIKey = "7cc90d26-33e4-499b...";
TaskID = "";
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);