{"id":35336,"date":"2019-10-31T22:03:44","date_gmt":"2019-10-31T19:03:44","guid":{"rendered":"https:\/\/prohoster.info\/blog\/magento-2-import-produktov-pryamo-v-bazu\/"},"modified":"2021-02-15T18:58:36","modified_gmt":"2021-02-15T16:58:36","slug":"magento-2-import-produktov-pryamo-v-bazu","status":"publish","type":"post","link":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/magento-2-import-produktov-pryamo-v-bazu","title":{"rendered":"Magento 2: Produkte direkt in die Datenbank importieren","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>\u0412 <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/436020\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a><\/noindex> \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0432 Magento 2 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u2014 \u0447\u0435\u0440\u0435\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0438\u0437\u043a\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430 \u043c\u043e\u0451\u043c \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0438 \u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u2014 \u043f\u0440\u044f\u043c\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0432 \u0431\u0430\u0437\u0443, \u0432 \u043e\u0431\u0445\u043e\u0434 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 Magento 2 (\u043c\u043e\u0434\u0435\u043b\u0438, \u0444\u0430\u0431\u0440\u0438\u043a\u0438, \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438). \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0448\u0430\u0433\u043e\u0432, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u0438\u043c\u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u0434 \u043b\u044e\u0431\u043e\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 MySQL.<\/p>\n<p><em>Disclaimer<\/em>: \u0412 Magento \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u043e <noindex><a rel=\"nofollow\" href=\"https:\/\/docs.magento.com\/m2\/ce\/user_guide\/system\/data-import.html\">\u0438\u043c\u043f\u043e\u0440\u0442\u0443 \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/noindex> \u0438, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432\u0430\u043c \u0435\u0433\u043e \u0445\u0432\u0430\u0442\u0438\u0442. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0437\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0430, \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u043e\u0439 CSV-\u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u2014 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442.<\/p>\n<p><img decoding=\"async\" alt=\"Magento 2: \u0438\u043c\u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0430\u0437\u0443\" src=\"\/wp-content\/uploads\/9694e4021f64de8760b37b4f9ba8281c.jpg\" style=\"display:block;margin: 0 auto;\"><\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<p>\u041a\u043e\u0434, \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0431\u0435\u0438\u0445 \u0441\u0442\u0430\u0442\u0435\u0439, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 Magento-\u043c\u043e\u0434\u0443\u043b\u0435 &#171;<noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/flancer32\/mage2_ext_demo_import\">flancer32\/mage2_ext_demo_import<\/a><\/noindex>&#171;. \u0412\u043e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u0434 \u0434\u0435\u043c\u043e-\u043c\u043e\u0434\u0443\u043b\u044f:<\/p>\n<ul>\n<li>\u041f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f, \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f.<\/li>\n<li>\u041e\u0434\u0438\u043d \u0441\u043a\u043b\u0430\u0434<\/li>\n<li>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439, \u0431\u0435\u0437 \u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b<\/li>\n<li>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 2.3<\/li>\n<\/ul>\n<p>JSON \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430:<\/p>\n<pre><code class=\"json\">{\n  \"sku\": \"MVA20D-UBV-3\",\n  \"name\": \"\u0417\u0430\u0433\u043b\u0443\u0448\u043a\u0430 \u0434\u043b\u044f \u043f\u043b\u043e\u043c\u0431\u0438\u0440\u043e\u0432\u043a\u0438 \u0412\u041047-29 IEK\",\n  \"desc\": \"\u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c ...\",\n  \"desc_short\": \"\u0417\u0430\u0433\u043b\u0443\u0448\u043a\u0430 \u0434\u043b\u044f \u043f\u043b\u043e\u043c\u0431\u0438\u0440\u043e\u0432\u043a\u0438 \u0412\u041047-29 IEK \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f ...\",\n  \"price\": 5.00,\n  \"qty\": 25,\n  \"categories\": [\"\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f 1\", \"\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f 2\"],\n  \"image_path\": \"mva20d_ubv_3.png\"\n}<\/code><\/pre>\n<h1 id=\"obzor-osnovnyh-etapov-importa\">\u041e\u0431\u0437\u043e\u0440 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u044d\u0442\u0430\u043f\u043e\u0432 \u0438\u043c\u043f\u043e\u0440\u0442\u0430<\/h1>\n<ul>\n<li>\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430<\/li>\n<li>\u0441\u0432\u044f\u0437\u044c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0438 web-\u0441\u0430\u0439\u0442\u0430<\/li>\n<li>\u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 (EAV)<\/li>\n<li>\u0438\u0432\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u043d\u0430 \u0441\u043a\u043b\u0430\u0434\u0435)<\/li>\n<li>\u043c\u0435\u0434\u0438\u0430 (\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438)<\/li>\n<li>\u0441\u0432\u044f\u0437\u044c \u0441 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430<\/li>\n<\/ul>\n<h1 id=\"registraciya-produkta\">\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430<\/h1>\n<p>\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 <code>catalog_product_entity<\/code>:<\/p>\n<pre><code class=\"sql\">CREATE TABLE `catalog_product_entity` (\n  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',\n  `attribute_set_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Set ID',\n  `type_id` varchar(32) NOT NULL DEFAULT 'simple' COMMENT 'Type ID',\n  `sku` varchar(64) DEFAULT NULL COMMENT 'SKU',\n  `has_options` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Has Options',\n  `required_options` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Required Options',\n  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Creation Time',\n  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Update Time',\n  PRIMARY KEY (`entity_id`),\n  KEY `CATALOG_PRODUCT_ENTITY_ATTRIBUTE_SET_ID` (`attribute_set_id`),\n  KEY `CATALOG_PRODUCT_ENTITY_SKU` (`sku`)\n)<\/code><\/pre>\n<p>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0440\u0435\u0435\u0441\u0442\u0440\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432:<\/p>\n<ul>\n<li><code>attribute_set_id<\/code><\/li>\n<li><code>sku<\/code><\/li>\n<\/ul>\n<p>\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f:<\/p>\n<ul>\n<li><code>type_id<\/code> \u2014 \u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0436\u0435\u043c, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e &#8216;simple&#8217;<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u043f\u0440\u044f\u043c\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0431\u0430\u0437\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e DB-\u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u0441\u0430\u043c\u043e\u0439 Magento:<\/p>\n<pre><code class=\"php\">function create($sku, $typeId, $attrSetId)\n{\n    \/** @var MagentoFrameworkAppResourceConnection $this-&gt;resource *\/\n    \/** @var MagentoFrameworkDBAdapterPdoMysql $conn *\/\n    $conn = $this-&gt;resource-&gt;getConnection();\n    $table = $this-&gt;resource-&gt;getTableName('catalog_product_entity');\n    $bind = [\n        'sku' =&gt; $sku,\n        'type_id' =&gt; $typeId,\n        'attribute_set_id' =&gt; $attrSetId\n    ];\n    $conn-&gt;insert($table, $bind);\n    $result = $conn-&gt;lastInsertId($table);\n    return $result;\n}<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0432 <code>catalog_product_entity<\/code> \u043e\u043d \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0432\u0438\u0434\u0438\u043c\u044b\u043c \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435, \u0432 \u0433\u0440\u0438\u0434\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 (<em>Catalog \/ Products<\/em>).<\/p>\n<p><img decoding=\"async\" alt=\"Magento 2: \u0438\u043c\u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0430\u0437\u0443\" src=\"\/wp-content\/uploads\/8312546696a0ef815d4adcb7bd8fa483.jpg\" style=\"display:block;margin: 0 auto;\"><\/p>\n<h1 id=\"svyaz-produkta-i-web-sayta\">\u0421\u0432\u044f\u0437\u044c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0438 web-\u0441\u0430\u0439\u0442\u0430<\/h1>\n<p>\u0421\u0432\u044f\u0437\u044c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0441 \u0441\u0430\u0439\u0442\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0432 \u043a\u0430\u043a\u0438\u0445 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445 \u0438 \u043d\u0430 \u043a\u0430\u043a\u0438\u0445 \u0432\u0438\u0442\u0440\u0438\u043d\u0430\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435.<\/p>\n<pre><code class=\"php\">function linkToWebsite($prodId, $websiteId)\n{\n    \/** @var MagentoFrameworkAppResourceConnection $this-&gt;resource *\/\n    \/** @var MagentoFrameworkDBAdapterPdoMysql $conn *\/\n    $conn = $this-&gt;resource-&gt;getConnection();\n    $table = $this-&gt;resource-&gt;getTableName('catalog_product_website');\n    $bind = [\n        'product_id' =&gt; $prodId,\n        'website_id' =&gt; $websiteId\n    ];\n    $conn-&gt;insert($table, $bind);\n}<\/code><\/pre>\n<p><img decoding=\"async\" alt=\"Magento 2: \u0438\u043c\u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0430\u0437\u0443\" src=\"\/wp-content\/uploads\/e34cf53976092ce2e5e1b51d3f788b53.jpg\" style=\"display:block;margin: 0 auto;\"><\/p>\n<h1 id=\"bazovye-atributy-produkta\">\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430<\/h1>\n<p>\u0423 \u0441\u0432\u0435\u0436\u0435\u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u043f\u043e\u043a\u0430 \u043d\u0435\u0442 \u043d\u0438 \u0438\u043c\u0435\u043d\u0438, \u043d\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f. \u0412\u0441\u0451 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/441122\/\">EAV-\u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u044b<\/a><\/noindex>. \u0412\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0441\u044f \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435:<\/p>\n<ul>\n<li><code>name<\/code><\/li>\n<li><code>price<\/code><\/li>\n<li><code>description<\/code><\/li>\n<li><code>short_description<\/code><\/li>\n<li><code>status<\/code><\/li>\n<li><code>tax_class_id<\/code><\/li>\n<li><code>url_key<\/code><\/li>\n<li><code>visibility<\/code><\/li>\n<\/ul>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043a \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a (\u043e\u043f\u0443\u0449\u0435\u043d\u044b \u0434\u0435\u0442\u0430\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0438 \u0442\u0438\u043f\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u043f\u043e \u0435\u0433\u043e \u043a\u043e\u0434\u0443):<\/p>\n<pre><code class=\"php\">public function create($prodId, $attrCode, $attrValue)\n{\n    $attrId = \/* get attribute ID by attribute code *\/\n    $attrType = \/* get attribute type [datetime|decimal|int|text|varchar]) by attribute code *\/\n    if ($attrId) {\n        \/** @var MagentoFrameworkAppResourceConnection $this-&gt;resource *\/\n        \/** @var MagentoFrameworkDBAdapterPdoMysql $conn *\/\n        $conn = $this-&gt;resource-&gt;getConnection();\n        $tblName = 'catalog_product_entity_' . $attrType;\n        $table = $this-&gt;resource-&gt;getTableName($tblName);\n        $bind = [\n            'attribute_id' =&gt; $attrId,\n            'entity_id' =&gt; $prodId,\n            \/* put all attributes to default store view with id=0 (admin) *\/\n            'store_id' =&gt; 0,\n            'value' =&gt; $attrValue\n        ];\n        $conn-&gt;insert($table, $bind);\n    }\n}<\/code><\/pre>\n<p>\u041f\u043e \u043a\u043e\u0434\u0443 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0435\u0433\u043e id \u0438 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 (<code>datetime<\/code>, <code>decimal<\/code>, <code>int<\/code>, <code>text<\/code>, <code>varchar<\/code>), \u0437\u0430\u0442\u0435\u043c \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043f\u0438\u0448\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0432\u0438\u0442\u0440\u0438\u043d\u044b (<code>store_id = 0<\/code>).<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043a \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435:<\/p>\n<p><img decoding=\"async\" alt=\"Magento 2: \u0438\u043c\u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0430\u0437\u0443\" src=\"\/wp-content\/uploads\/9980b0393b34fdbd660bc5c0dfbf584a.jpg\" style=\"display:block;margin: 0 auto;\"><\/p>\n<h1 id=\"inventarnye-dannye\">\u0418\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 2.3 \u0432 Magento \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0432\u0430 \u043d\u0430\u0431\u043e\u0440\u0430 \u0442\u0430\u0431\u043b\u0438\u0446, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430):<\/p>\n<ul>\n<li><code>cataloginventory_*<\/code>: \u0441\u0442\u0430\u0440\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430;<\/li>\n<li><code>inventory_*<\/code>: \u043d\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 (MSI \u2014 Multi Source Inventory);<\/li>\n<\/ul>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0432 \u043e\u0431\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0442.\u043a. \u043d\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u043e\u043a\u0430 \u0435\u0449\u0451 \u043d\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0430 \u043e\u0442 \u0441\u0442\u0430\u0440\u043e\u0439 (\u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0435, \u0447\u0442\u043e \u0434\u043b\u044f <code>default<\/code> \u0441\u043a\u043b\u0430\u0434\u0430 \u0432 \u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 <code>cataloginventory_stock_status<\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <code>inventory_stock_1<\/code>).<\/p>\n<h2 id=\"cataloginventory_\">cataloginventory_<\/h2>\n<p>\u041f\u0440\u0438 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0438 Magneto 2.3 \u043c\u044b \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0438\u043c\u0435\u0435\u043c 2 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 <code>store_website<\/code>, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0432\u0443\u043c \u0441\u0430\u0439\u0442\u0430\u043c \u2014 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c\u0443 \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u043c\u0443:<\/p>\n<pre><code class=\"plaintext\">website_id|code |name        |sort_order|default_group_id|is_default|\n----------|-----|------------|----------|----------------|----------|\n         0|admin|Admin       |         0|               0|         0|\n         1|base |Main Website|         0|               1|         1|<\/code><\/pre>\n<p>\u0412 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 <code>cataloginventory_stock<\/code> \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c:<\/p>\n<pre><code class=\"plaintext\">stock_id|website_id|stock_name|\n--------|----------|----------|\n       1|         0|Default   |<\/code><\/pre>\n<p>\u0422.\u0435., \u0443 \u043d\u0430\u0441 \u0432 \u0441\u0442\u0430\u0440\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d &#171;\u0441\u043a\u043b\u0430\u0434&#187; (<code>stock<\/code>) \u0438 \u043e\u043d \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c\u0443 website&#8217;\u0443. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u0430\u0434\u043c\u0438\u043d\u043a\u0443 \u043d\u043e\u0432\u044b\u0445 <code>sources<\/code>\/<code>stocks<\/code> \u0432 MSI (\u043d\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443) \u043d\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 <code>cataloginventory_stock<\/code>.<\/p>\n<p>\u0418\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u0445 \u0432 \u0441\u0442\u0430\u0440\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445:<\/p>\n<ul>\n<li><code>cataloginventory_stock_item<\/code><\/li>\n<li><code>cataloginventory_stock_status<\/code><\/li>\n<\/ul>\n<h3 id=\"cataloginventory_stock_item\">cataloginventory_stock_item<\/h3>\n<pre><code class=\"php\">function createOldItem($prodId, $qty)\n{\n    $isQtyDecimal = (((int)$qty) != $qty);\n    $isInStock = ($qty &gt; 0);\n    \/** @var MagentoFrameworkAppResourceConnection $this-&gt;resource *\/\n    \/** @var MagentoFrameworkDBAdapterPdoMysql $conn *\/\n    $conn = $this-&gt;resource-&gt;getConnection();\n    $table = $this-&gt;resource-&gt;getTableName('cataloginventory_stock_item');\n    $bind = [\n        'product_id' =&gt; $prodId,\n        \/* we use one only stock in 'cataloginventory' structure by default *\/\n        'stock_id' =&gt; 1,\n        'qty' =&gt; $qty,\n        'is_qty_decimal' =&gt; $isQtyDecimal,\n        'is_in_stock' =&gt; $isInStock,\n        \/* default stock is bound to admin website (see `cataloginventory_stock`) *\/\n        'website_id' =&gt; 0\n    ];\n    $conn-&gt;insert($table, $bind);\n}<\/code><\/pre>\n<h3 id=\"cataloginventory_stock_status\">cataloginventory_stock_status<\/h3>\n<pre><code class=\"php\">function createOldStatus($prodId, $qty)\n{\n    $isInStock = ($qty &gt; 0);\n    \/** @var MagentoFrameworkAppResourceConnection $this-&gt;resource *\/\n    \/** @var MagentoFrameworkDBAdapterPdoMysql $conn *\/\n    $conn = $this-&gt;resource-&gt;getConnection();\n    $table = $this-&gt;resource-&gt;getTableName('cataloginventory_stock_status');\n    $bind = [\n        'product_id' =&gt; $prodId,\n        \/* we use one only stock in 'cataloginventory' structure by default *\/\n        'stock_id' =&gt; 1, \n        'qty' =&gt; $qty,\n        'stock_status' =&gt; MagentoCatalogInventoryApiDataStockStatusInterface::STATUS_IN_STOCK,\n        \/* default stock is bound to admin website (see `cataloginventory_stock`) *\/\n        'website_id' =&gt; 0 \n    ];\n    $conn-&gt;insert($table, $bind);\n}<\/code><\/pre>\n<h2 id=\"inventory_\">inventory_<\/h2>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043d\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 1 &#171;<em>\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/em>&#187; (<code>inventory_source<\/code>):<\/p>\n<pre><code class=\"plaintext\">source_code|name          |enabled|description   |latitude|longitude|country_id|...|\n-----------|--------------|-------|--------------|--------|---------|----------|...|\ndefault    |Default Source|      1|Default Source|0.000000| 0.000000|US        |...|<\/code><\/pre>\n<p>\u0438 \u043e\u0434\u0438\u043d &#171;<em>\u0441\u043a\u043b\u0430\u0434<\/em>&#187; (<code>inventory_stock<\/code>):<\/p>\n<pre><code class=\"plaintext\">stock_id|name         |\n--------|-------------|\n       1|Default Stock|<\/code><\/pre>\n<p>&#171;<em>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/em>&#187; \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 (\u0437\u0430\u043f\u0438\u0441\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0438 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441). &#171;<em>\u0421\u043a\u043b\u0430\u0434<\/em>&#187; \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 &#171;\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432&#187; (<code>inventory_source_stock_link<\/code>)<\/p>\n<pre><code class=\"plaintext\">link_id|stock_id|source_code|priority|\n-------|--------|-----------|--------|\n      1|       1|default    |       1|<\/code><\/pre>\n<p>\u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a \u043a\u0430\u043d\u0430\u043b\u0443 \u043f\u0440\u043e\u0434\u0430\u0436\u0438 (<code>inventory_stock_sales_channel<\/code>)<\/p>\n<pre><code class=\"plaintext\">type   |code|stock_id|\n-------|----|--------|\nwebsite|base|       1|<\/code><\/pre>\n<p>\u0421\u0443\u0434\u044f \u043f\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u043f\u0440\u043e\u0434\u0430\u0436, \u043d\u043e \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u044f\u0437\u044c &#171;<em>stock<\/em>&#171;-&#171;<em>website<\/em>&#187; (\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 web-\u0441\u0430\u0439\u0442 \u0438\u0434\u0451\u0442 \u043f\u043e \u043a\u043e\u0434\u0443 web-\u0441\u0430\u0439\u0442\u0430 \u2014 <code>base<\/code>).<\/p>\n<p>\u041e\u0434\u0438\u043d &#171;<em>\u0441\u043a\u043b\u0430\u0434<\/em>&#187; \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c &#171;<em>\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c<\/em>&#171;, \u0430 \u043e\u0434\u0438\u043d &#171;<em>\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/em>&#187; \u2014 \u043a \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c &#171;<em>\u0441\u043a\u043b\u0430\u0434\u0430\u043c<\/em>&#187; (\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 &#171;\u043c\u043d\u043e\u0433\u0438\u0435-\u043a\u043e-\u043c\u043d\u043e\u0433\u0438\u043c&#187;). \u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 default&#8217;\u043e\u0432\u044b\u0435 &#171;<em>\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/em>&#187; \u0438 &#171;<em>\u0441\u043a\u043b\u0430\u0434<\/em>&#171;. \u041e\u043d\u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c (\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043a\u043e\u0434\u0430 \u2014 \u0432\u044b\u043b\u0435\u0442\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 &#171;<em>Can not save link related to Default Source or Default Stock<\/em>&#171;). \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 MSI \u0432 Magento 2 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 &#171;<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/333678\/\">\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043a\u043b\u0430\u0434\u043e\u043c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c CQRS \u0438 Event Sourcing. \u041f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/a><\/noindex>&#171;.<\/p>\n<p>\u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c default&#8217;\u043e\u0432\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0441\u044e \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a <code>default<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d \u0432 \u043a\u0430\u043d\u0430\u043b\u0435 \u043f\u0440\u043e\u0434\u0430\u0436\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u043c \u0441 web-\u0441\u0430\u0439\u0442\u043e\u043c \u0441 \u043a\u043e\u0434\u043e\u043c <code>base<\/code> (\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 \u2014 \u0441\u043c. <code>store_website<\/code>):<\/p>\n<pre><code class=\"php\">function createNewItem($sku, $qty)\n{\n    \/** @var MagentoFrameworkAppResourceConnection $this-&gt;resource *\/\n    \/** @var MagentoFrameworkDBAdapterPdoMysql $conn *\/\n    $conn = $this-&gt;resource-&gt;getConnection();\n    $table = $this-&gt;resource-&gt;getTableName('inventory_source_item');\n    $bind = [\n        'source_code' =&gt; 'default',\n        'sku' =&gt; $sku,\n        'quantity' =&gt; $qty,\n        'status' =&gt; MagentoInventoryApiApiDataSourceItemInterface::STATUS_IN_STOCK\n    ];\n    $conn-&gt;insert($table, $bind);\n}<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443 \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430:<\/p>\n<p><img decoding=\"async\" alt=\"Magento 2: \u0438\u043c\u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0430\u0437\u0443\" src=\"\/wp-content\/uploads\/8a9e075d104e42f9080f31b0ce2ca7c8.jpg\" style=\"display:block;margin: 0 auto;\"><\/p>\n<h1 id=\"media\">\u041c\u0435\u0434\u0438\u0430<\/h1>\n<p>\u041f\u0440\u0438 &#171;\u0440\u0443\u0447\u043d\u043e\u043c&#187; \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043a \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0430\u0434\u043c\u0438\u043d\u043a\u0443 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445:<\/p>\n<ul>\n<li><code>catalog_product_entity_media_gallery<\/code>: \u043c\u0435\u0434\u0438\u0430-\u0440\u0435\u0435\u0441\u0442\u0440 (\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0432\u0438\u0434\u0435\u043e-\u0444\u0430\u0439\u043b\u044b);<\/li>\n<li><code>catalog_product_entity_media_gallery_value<\/code>: \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043c\u0435\u0434\u0438\u0430 \u043a \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u043c \u0438 \u0432\u0438\u0442\u0440\u0438\u043d\u0430\u043c (\u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f);<\/li>\n<li><code>catalog_product_entity_media_gallery_value_to_entity<\/code>: \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043c\u0435\u0434\u0438\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u043c (\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e, default \u043c\u0435\u0434\u0438\u0430-\u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430);<\/li>\n<li><code>catalog_product_entity_varchar<\/code>: \u0437\u0434\u0435\u0441\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0440\u043e\u043b\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435;<\/li>\n<\/ul>\n<p>\u0430 \u0441\u0430\u043c\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 <code>.\/pub\/media\/catalog\/product\/x\/y\/<\/code>, \u0433\u0434\u0435 <code>x<\/code> \u0438 <code>y<\/code> \u2014 \u043f\u0435\u0440\u0432\u0430\u044f \u0438 \u0432\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u043a\u0432\u044b \u0438\u043c\u0435\u043d\u0438 \u0444\u0430\u0439\u043b\u0430 \u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0444\u0430\u0439\u043b <code>image.png<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d \u043a\u0430\u043a <code>.\/pub\/media\/catalog\/product\/i\/m\/image.png<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043c\u043e\u0433\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430.<\/p>\n<h2 id=\"catalog_product_entity_media_gallery\">catalog_product_entity_media_gallery<\/h2>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u0439 \u0432 <code>.\/pub\/media\/catalog\/product\/<\/code> \u043c\u0435\u0434\u0438\u0430-\u0444\u0430\u0439\u043b (\u0441\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f):<\/p>\n<pre><code class=\"php\">function createMediaGallery($imgPathPrefixed)\n{\n    $attrId = \/* get attribute ID by attribute code 'media_gallery' *\/\n    \/** @var MagentoFrameworkAppResourceConnection $this-&gt;resource *\/\n    \/** @var MagentoFrameworkDBAdapterPdoMysql $conn *\/\n    $conn = $this-&gt;resource-&gt;getConnection();\n    $table = $this-&gt;resource-&gt;getTableName('catalog_product_entity_media_gallery');\n    $bind = [\n        'attribute_id' =&gt; $attrId,\n        'value' =&gt; $imgPathPrefixed,\n        \/* 'image' or 'video' *\/\n        'media_type' =&gt; 'image',\n        'disabled' =&gt; false\n    ];\n    $conn-&gt;insert($table, $bind);\n    $result = $conn-&gt;lastInsertId($table);\n    return $result;\n}<\/code><\/pre>\n<p>\u041f\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043d\u043e\u0432\u043e\u043c\u0443 \u043c\u0435\u0434\u0438\u0430-\u0444\u0430\u0439\u043b\u0443 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0442\u043e\u0440.<\/p>\n<h2 id=\"catalog_product_entity_media_gallery_value\">catalog_product_entity_media_gallery_value<\/h2>\n<p>\u0421\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0434\u0438\u0430-\u0444\u0430\u0439\u043b \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u043c \u0434\u043b\u044f default-\u0432\u0438\u0442\u0440\u0438\u043d\u044b:<\/p>\n<pre><code class=\"php\">function createGalleryValue($mediaId, $prodId)\n{\n    \/** @var MagentoFrameworkAppResourceConnection $this-&gt;resource *\/\n    \/** @var MagentoFrameworkDBAdapterPdoMysql $conn *\/\n    $conn = $this-&gt;resource-&gt;getConnection();\n    $table = $this-&gt;resource-&gt;getTableName('catalog_product_entity_media_gallery_value');\n    $bind = [\n        'value_id' =&gt; $mediaId,\n        \/* use admin store view by default *\/\n        'store_id' =&gt; 0,\n        'entity_id' =&gt; $prodId,\n        'label' =&gt; null,\n        \/* we have one only image *\/\n        'position' =&gt; 1,\n        'disabled' =&gt; false\n    ];\n    $conn-&gt;insert($table, $bind);\n}<\/code><\/pre>\n<h2 id=\"catalog_product_entity_media_gallery_value_to_entity\">catalog_product_entity_media_gallery_value_to_entity<\/h2>\n<p>\u0421\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0434\u0438\u0430-\u0444\u0430\u0439\u043b \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u043c \u0431\u0435\u0437 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043a \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0432\u0438\u0442\u0440\u0438\u043d\u0435. \u041d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0433\u0434\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043d\u043e \u0432\u043e\u0442 \u044d\u0442\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0435\u0451 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043a \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0442 \u0442\u0430\u043a.<\/p>\n<pre><code class=\"php\">function createGalleryValueToEntity($mediaId, $prodId)\n{\n    \/** @var MagentoFrameworkAppResourceConnection $this-&gt;resource *\/\n    \/** @var MagentoFrameworkDBAdapterPdoMysql $conn *\/\n    $conn = $this-&gt;resource-&gt;getConnection();\n    $table = $this-&gt;resource-&gt;getTableName('catalog_product_entity_media_gallery_value_to_entity');\n    $bind = [\n        'value_id' =&gt; $mediaId,\n        'entity_id' =&gt; $prodId\n    ];\n    $conn-&gt;insert($table, $bind);\n}<\/code><\/pre>\n<h2 id=\"catalog_product_entity_varchar\">catalog_product_entity_varchar<\/h2>\n<p>\u041c\u0435\u0434\u0438\u0430-\u0444\u0430\u0439\u043b \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0440\u043e\u043b\u044f\u043c\u0438 (\u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445 \u0443\u043a\u0430\u0437\u0430\u043d \u043a\u043e\u0434 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430):<\/p>\n<ul>\n<li>Base (<code>image<\/code>)<\/li>\n<li>Small Image (<code>small_image<\/code>)<\/li>\n<li>Thumbnail (<code>thumbnail<\/code>)<\/li>\n<li>Swatch Image (<code>swatch_image<\/code>)<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0435\u0439 \u043a \u043c\u0435\u0434\u0438\u0430-\u0444\u0430\u0439\u043b\u0443 \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 <code>catalog_product_entity_varchar<\/code>. \u041a\u043e\u0434 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d \u043a\u043e\u0434\u0443 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 &#171;<em>\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430<\/em>&#171;.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443 \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<p><img decoding=\"async\" alt=\"Magento 2: \u0438\u043c\u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0430\u0437\u0443\" src=\"\/wp-content\/uploads\/8d676e437917cbef1158a59dc043abd5.jpg\" style=\"display:block;margin: 0 auto;\"><\/p>\n<h1 id=\"kategorii\">\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438<\/h1>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c:<\/p>\n<ul>\n<li><code>catalog_category_entity<\/code>: \u0440\u0435\u0435\u0441\u0442\u0440 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439;<\/li>\n<li><code>catalog_category_product<\/code>: \u0441\u0432\u044f\u0437\u044c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439;<\/li>\n<li><code>catalog_category_entity_*<\/code>: \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f EAV-\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432;<\/li>\n<\/ul>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e, \u0432 \u043f\u0443\u0441\u0442\u043e\u043c Magento-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0432 \u0440\u0435\u0435\u0441\u0442\u0440\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f 2 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 (\u044f \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u043e\u043d\u043e\u043a: <code>crt<\/code> \u2014 <code>created_at<\/code>, <code>upd<\/code> \u2014 <code>updated_at<\/code>):<\/p>\n<pre><code class=\"plaintext\">entity_id|attribute_set_id|parent_id|crt|upd|path|position|level|children_count|\n---------|----------------|---------|---|---|----|--------|-----|--------------|\n        1|               3|        0|...|...|1   |       0|    0|             1|\n        2|               3|        1|...|...|1\/2 |       1|    1|             0|<\/code><\/pre>\n<p>\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f \u0441 id=1 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u043d\u0435\u043c \u0432\u0441\u0435\u0433\u043e Magento-\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0438 \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435, \u043d\u0438 \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435. \u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f \u0441 id=2 (<em>Default Category<\/em>) \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0435\u0439 \u0434\u043b\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 (<em>Main Website Store<\/em>), \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u0438 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u0441\u043c. <em>Admin \/ Stores \/ All Stores<\/em>). \u041f\u0440\u0438\u0447\u0451\u043c \u0441\u0430\u043c\u0430 \u043a\u043e\u0440\u043d\u0435\u0432\u0430\u044f \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0451 \u043f\u043e\u0434\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0442\u0435\u043c\u043e\u0439 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043c\u043f\u043e\u0440\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u043c, \u0442\u043e \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0431\u0430\u0437\u0443 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439, \u0430 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u043c\u0438 \u0441\u0430\u043c\u043e\u0439 Magento (\u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438). \u041f\u0440\u044f\u043c\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0431\u0430\u0437\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0441 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0435\u0439 (\u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0435\u0451 \u0438\u043c\u0435\u043d\u0438, \u043f\u0440\u0438 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442\u0441\u044f id \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438):<\/p>\n<pre><code class=\"php\">function create($prodId, $catId)\n{\n    \/** @var MagentoFrameworkAppResourceConnection $this-&gt;resource *\/\n    \/** @var MagentoFrameworkDBAdapterPdoMysql $conn *\/\n    $conn = $this-&gt;resource-&gt;getConnection();\n    $table = $this-&gt;resource-&gt;getTableName('catalog_category_product');\n    $bind = [\n        'category_id' =&gt; $catId,\n        'product_id' =&gt; $prodId,\n    ];\n    $conn-&gt;insert($table, $bind);\n}<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u044f\u0437\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0441 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c\u0438 &#171;\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f 1&#187; \u0438 &#171;\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f 2&#187; \u0434\u0435\u0442\u0430\u043b\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<p><img decoding=\"async\" alt=\"Magento 2: \u0438\u043c\u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0430\u0437\u0443\" src=\"\/wp-content\/uploads\/7ba69b87707e458309599ae0e270e1a0.jpg\" style=\"display:block;margin: 0 auto;\"><\/p>\n<h1 id=\"dopolnitelnye-deystviya\">\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/h1>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/p>\n<ul>\n<li>\u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445: \u0432\u044b\u0437\u043e\u0432 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 <code>.\/bin\/magento indexer:reindex<\/code>;<\/li>\n<li>\u0440\u0435\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f URL&#8217;\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\/\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439: \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 &#171;<noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/elgentos\/regenerate-catalog-urls\">elgentos\/regenerate-catalog-urls<\/a><\/noindex>&#171;<\/li>\n<\/ul>\n<p>\u041f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<\/p>\n<p><img decoding=\"async\" alt=\"Magento 2: \u0438\u043c\u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0430\u0437\u0443\" src=\"\/wp-content\/uploads\/88577f7543c213b2fc45260895b79ea9.jpg\" style=\"display:block;margin: 0 auto;\"><\/p>\n<p>\u0438 \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435:<\/p>\n<p><img decoding=\"async\" alt=\"Magento 2: \u0438\u043c\u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0430\u0437\u0443\" src=\"\/wp-content\/uploads\/64e8ffa9c27c5ab33f15a94e3de57ebd.jpg\" style=\"display:block;margin: 0 auto;\"><\/p>\n<h1 id=\"rezyume\">\u0420\u0435\u0437\u044e\u043c\u0435<\/h1>\n<p>\u0422\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 (10 \u0448\u0442\u0443\u043a), \u0447\u0442\u043e \u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0431\u044b\u0441\u0442\u0440\u0435\u0435 (1 \u0441\u0435\u043a\u0443\u043d\u0434\u0430 \u043f\u0440\u043e\u0442\u0438\u0432 10). \u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u2014 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0442\u0435\u043d, \u0430 \u043b\u0443\u0447\u0448\u0435 \u0442\u044b\u0441\u044f\u0447. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e Magento (\u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438), \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e (\u0430\u043a\u0446\u0435\u043d\u0442\u0438\u0440\u0443\u044e \u2014 <em>\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e<\/em>!) \u0443\u0441\u043a\u043e\u0440\u044f\u044e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e (\u0430\u043a\u0446\u0435\u043d\u0442\u0438\u0440\u0443\u044e \u2014 <em>\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e<\/em>!) \u0441\u043d\u0438\u0436\u0430\u044e\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0431\u0430\u0437\u0443.<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0432\u043e\u0434\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043c\u043e\u043a\u0440\u043e\u0439 \u0438 \u044d\u0442\u043e \u043d\u0438\u043a\u0430\u043a\u043e\u0435 \u043d\u0435 \u043e\u0442\u043a\u0440\u043e\u0432\u0435\u043d\u0438\u0435. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043a\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044b.<\/p>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/440262\/\">habr.com<\/a><\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0432 Magento 2 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u2014 \u0447\u0435\u0440\u0435\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0438\u0437\u043a\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430 \u043c\u043e\u0451\u043c \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0438 \u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u2014 \u043f\u0440\u044f\u043c\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0432 \u0431\u0430\u0437\u0443, \u0432 \u043e\u0431\u0445\u043e\u0434 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 Magento 2 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-35336","post","type-post","status-publish","format-standard","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0432 Magento 2 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u2014 \u0447\u0435\u0440\u0435\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0438\u0437\u043a\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430 \u043c\u043e\u0451\u043c \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0438 \u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u2014 \u043f\u0440\u044f\u043c\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0432 \u0431\u0430\u0437\u0443, \u0432 \u043e\u0431\u0445\u043e\u0434 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 Magento 2\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/magento-2-import-produktov-pryamo-v-bazu\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"de_DE\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47Magento 2: \u0438\u043c\u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0430\u0437\u0443 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0432 Magento 2 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u2014 \u0447\u0435\u0440\u0435\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0438\u0437\u043a\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430 \u043c\u043e\u0451\u043c \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0438 \u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u2014 \u043f\u0440\u044f\u043c\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0432 \u0431\u0430\u0437\u0443, \u0432 \u043e\u0431\u0445\u043e\u0434 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 Magento 2\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/magento-2-import-produktov-pryamo-v-bazu\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T19:03:44+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2021-02-15T16:58:36+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Magento 2: Produkte direkt in die Datenbank importieren | ProHoster","description":"In dem vorherigen Artikel habe ich den Prozess des Produktimports in Magento 2 auf herk\u00f6mmliche Weise beschrieben \u2013 \u00fcber Modelle und Repositories. Die regul\u00e4re Methode weist eine sehr niedrige Datenverarbeitungsgeschwindigkeit auf. Auf meinem Laptop ergab es etwa ein Produkt pro Sekunde. In diesem fortf\u00fchrenden Artikel betrachte ich eine alternative M\u00f6glichkeit, Produkte zu importieren \u2013 durch direkte Eingabe in die Datenbank, um die Standardmechanismen von Magento 2 zu umgehen.","canonical_url":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/magento-2-import-produktov-pryamo-v-bazu","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"de_DE","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47Magento 2: \u0438\u043c\u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0430\u0437\u0443 | ProHoster","og:description":"\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0432 Magento 2 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u2014 \u0447\u0435\u0440\u0435\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0438\u0437\u043a\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430 \u043c\u043e\u0451\u043c \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0438 \u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u2014 \u043f\u0440\u044f\u043c\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0432 \u0431\u0430\u0437\u0443, \u0432 \u043e\u0431\u0445\u043e\u0434 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 Magento 2","og:url":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/magento-2-import-produktov-pryamo-v-bazu","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T19:03:44+00:00","article:modified_time":"2021-02-15T16:58:36+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"35336","title":null,"description":"","keywords":"","keyphrases":null,"primary_term":null,"canonical_url":"","og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-21 22:50:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 02:06:23","updated":"2026-01-21 22:50:19"},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts\/35336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/comments?post=35336"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts\/35336\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/media?parent=35336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/categories?post=35336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/tags?post=35336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}