URL: http://mirindadomo.ru/df-1c/cml2/index/?type=catalog&mode=import&filename=offers.xml Версия Magento: 2.38.0.2 (1.9.0.1) Версия PHP: 5.3.3 Время: 2014-09-25 18:49:01 MSK Cхема CommerceML: 2.04 *********************************** Модуль «1С:Управление торговлей» для Magento не нашёл в полученных из «1С:Управление торговлей» данных цены типового соглашения (типа) «Розничная цена». Именно это типовое соглашение (тип цен) указано администратором как основное в настройках модуля «1С:Управление торговлей» для Magento: («Система» -> «Настройки» -> «1С:Управление торговлей» -> «Российская сборка» -> «1С:Управление торговлей» -> «Цены» -> «Название основной цены или типового соглашения»). Вам сейчас нужно убедиться, что типовое соглашение (тип цен) с данным именем действительно присутствует в «1С:Управление торговлей» и указано в настройках задействованного для обмена данными с интернет-магазином узла обмена в «1С:Управление торговлей». Инструкция по настройке типового соглашения «1С:Управление торговлей» для обмена данными с интернет-магазином: http://magento-forum.ru/topic/3100/ *********************************** Файл: app/code/local/Df/1C/Model/Cml2/Import/Data/Collection/PriceTypes.php Строка: 30 Субъект: Df_1C_Model_Cml2_Import_Data_Collection_PriceTypes::getMain Объект: df_error Контекст: . ' и указано в настройках задействованного для обмена данными с интернет-магазином' . ' узла обмена в «1С:Управление торговлей».' . "\r\nИнструкция по настройке типового соглашения «1С:Управление торговлей»" . ' для обмена данными с интернет-магазином: http://magento-forum.ru/topic/3100/' ,array( '{название типового соглашения}' => df_cfg()->_1c()->product()->prices()->getMain() ) )); } } return $this->{__METHOD__}; } /** * @override * @return Df_Varien_Simplexml_Element ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Import/Data/Collection/OfferPart/Prices.php Строка: 6 Субъект: Df_1C_Model_Cml2_Import_Data_Collection_OfferPart_Prices::getMain Объект: Df_1C_Model_Cml2_Import_Data_Collection_PriceTypes::getMain Контекст: findByExternalId($this->getState()->getPriceTypes()->getMain()->getExternalId()); } /** * @override * @return string */ protected function getItemClass() {return Df_1C_Model_Cml2_Import_Data_Entity_OfferPart_Price::_CLASS;} /** * @override * @return string[] */ ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Import/Processor/Product/Type/Simple/Abstract.php Строка: 20 Субъект: Df_1C_Model_Cml2_Import_Processor_Product_Type_Simple_Abstract::getPrice Объект: Df_1C_Model_Cml2_Import_Data_Collection_OfferPart_Prices::getMain Контекст: * в то время как файл offers_*.xml цен не содержит. * @override * @return float|null */ protected function getPrice() { if (!isset($this->{__METHOD__})) { $this->{__METHOD__} = rm_n_set( is_null($this->getEntityOffer()->getPrices()->getMain()) ? null : $this->getEntityOffer()->getPrices()->getMain()->getPriceBase() ); } return rm_n_get($this->{__METHOD__}); } /** ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Import/Processor/Product/Type.php Строка: 76 Субъект: Df_1C_Model_Cml2_Import_Processor_Product_Type::getProductDataNewOrUpdateBase Объект: Df_1C_Model_Cml2_Import_Processor_Product_Type_Simple_Abstract::getPrice Контекст: $hasQuantity || !$this->getExistingMagentoProduct() ) { $result['qty'] = $hasQuantity ? $this->getEntityOffer()->getQuantity() : 0.0; } /** @var bool $hasPrice */ $hasPrice = $this->getDocumentCurrentAsOffers()->hasPrices() && !is_null($this->getPrice()); if ( // Обратите внимание, что 1С может вполне не передавать цену. // Это возможно в следующих ситуациях: // 1) Когда цена на товар отсутствует в 1С // 2) Когда передача цен отключена в настройках узла обмена // (а это возможно, как минимум, в новых версиях модуля 1С-Битрикс (ветка 4)). // 3) В новых версиях модуля 1С-Битрикс (ветка 4, CommerceML 2.0.8) // 1С передаёт цены не в файле offers.xml (как было в прежних версиях), ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Import/Processor/Product/Type.php Строка: 437 Субъект: Df_1C_Model_Cml2_Import_Processor_Product_Type::getProductDataNewOrUpdate Объект: Df_1C_Model_Cml2_Import_Processor_Product_Type::getProductDataNewOrUpdateBase Контекст: ); return $result; } /** @return array(string => string) */ private function getProductDataNewOrUpdate() { /** @var array(string => string) $result */ $result = $this->getProductDataNewOrUpdateBase(); /** * Нам не нужно заниматься товарными свойствами и опциями * при обработке файлов rests_*.xml, prices_*.xml и т.п. * Более того, такая обработка может привести к некоторым сбоям. */ if ($this->getDocumentCurrentAsOffers()->isBase()) { $result = array_merge($result ,$this->getProductDataNewOrUpdateAttributeValues( ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Import/Processor/Product/Type.php Строка: 40 Субъект: Df_1C_Model_Cml2_Import_Processor_Product_Type::getImporter Объект: Df_1C_Model_Cml2_Import_Processor_Product_Type::getProductDataNewOrUpdate Контекст: */ Df_Dataflow_Model_Importer_Product::P__SKIP_CUSTOM_OPTIONS => true ,Df_Dataflow_Model_Importer_Product::P__ROW => Df_Dataflow_Model_Import_Product_Row::i(array_merge( $this->getExistingMagentoProduct() ? $this->getProductDataUpdateOnly() : $this->getProductDataNewOnly() , $this->getProductDataNewOrUpdate() )) )); } return $this->{__METHOD__}; } /** @return array(string => string) */ protected function getProductDataNewOrUpdateBase() { ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Import/Processor/Product/Type/Simple.php Строка: 16 Субъект: Df_1C_Model_Cml2_Import_Processor_Product_Type_Simple::process Объект: Df_1C_Model_Cml2_Import_Processor_Product_Type::getImporter Контекст: if (!$this->getEntityOffer()->isTypeSimple()) { rm_1c_log( 'Пропускаем товарное предложение «%s» как не являющееся простым товаром.' ,$this->getEntityOffer()->getName() ); } else { $this->getImporter()->import(); /** @var Df_Catalog_Model_Product $product */ $product = $this->getImporter()->getProduct(); df_h()->_1c()->cml2()->reindexProduct($product); rm_1c_log( '%s товар «%s».' ,!is_null($this->getExistingMagentoProduct()) ? 'Обновлён' : 'Создан' ,$product->getName() ); ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Action/Catalog/Import.php Строка: 158 Субъект: Df_1C_Model_Cml2_Action_Catalog_Import::importProductsSimple Объект: Df_1C_Model_Cml2_Import_Processor_Product_Type_Simple::process Контекст: rm_1c_log('Простые товары отсутствуют.'); } else { rm_1c_log('Простых товаров: %d.', $count); rm_1c_log('Импорт простых товаров начат.'); foreach ($this->getCollections()->getOffersSimple() as $offer) { /** @var Df_1C_Model_Cml2_Import_Data_Entity_Offer $offer */ Df_1C_Model_Cml2_Import_Processor_Product_Type_Simple::i($offer)->process(); } rm_1c_log('Импорт простых товаров завершён.'); } return $this; } /** @return Df_1C_Model_Cml2_Action_Catalog_Import */ private function importProductsSimplePartImages() { ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Action/Catalog/Import.php Строка: 47 Субъект: Df_1C_Model_Cml2_Action_Catalog_Import::processInternal Объект: Df_1C_Model_Cml2_Action_Catalog_Import::importProductsSimple Контекст: /** @var int $count */ $count = count($this->getCollections()->getOffers()); if (0 === $count) { rm_1c_log('Товарные предложения отсутствуют.'); } else { rm_1c_log('Товарных предложений: %d.', $count); $this->importProductsSimple(); /** * Товарные изображения находятся в файле import.xml (import_*.xml). * Учитывая, что начиная с ветки 4 модуля 1С-Битрикс * мы получаем несколько файлов с тегом «ПакетПредложений» * вместо прежнего единого файла offers.xml, * то нам нет смысла по нескольку раз запускать импорт товарных изображений. * Импортируем товарные изображения толь один раз: * при наличии в файле offers_*.xml пути ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Action.php Строка: 36 Субъект: Df_1C_Model_Cml2_Action::process Объект: Df_1C_Model_Cml2_Action_Catalog_Import::processInternal Контекст: if (!df_cfg()->_1c()->general()->isEnabled()) { df_error(self::T__MODULE_IS_DISABLED); } df_h()->dataflow()->registry()->products()->addValidator(Df_1C_Validate_Product::s()); /** @var string|bool $output */ $output = null; ob_start(); $this->processInternal(); /** * Используем @, чтобы избежать сбоя «Failed to delete buffer zlib output compression». * Такой сбой у меня возник на сервере moysklad.magento-demo.ru * в другой точке программы при аналогичном вызове @see ob_get_clean. */ $output = @ob_get_clean(); if ($output) { ob_start(); ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Action/Front.php Строка: 86 Субъект: Df_1C_Model_Cml2_Action_Front::action_catalogImport Объект: Df_1C_Model_Cml2_Action::process Контекст: /** @return void */ private function action_catalogDeactivate() { Df_1C_Model_Cml2_Action_Catalog_Deactivate::i($this->getData())->process(); } /** @return void */ private function action_catalogImport() { Df_1C_Model_Cml2_Action_Catalog_Import::i($this->getData())->process(); } /** @return void */ private function action_catalogUpload() { Df_1C_Model_Cml2_Action_Catalog_Upload::i($this->getData())->process(); } /** @return void */ ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Action/Front.php Строка: 54 Субъект: Df_1C_Model_Cml2_Action_Front::processInternal Объект: Df_1C_Model_Cml2_Action_Front::action_catalogImport Контекст: case Df_1C_Model_Cml2_InputRequest_Generic::MODE__DEACTIVATE: $this->action_catalogDeactivate(); break; case Df_1C_Model_Cml2_InputRequest_Generic::MODE__FILE: $this->action_catalogUpload(); break; case Df_1C_Model_Cml2_InputRequest_Generic::MODE__IMPORT: $this->action_catalogImport(); break; } } else if ( Df_1C_Model_Cml2_InputRequest_Generic::TYPE__ORDERS === $this->getRmRequest()->getType() ) { ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Action.php Строка: 36 Субъект: Df_1C_Model_Cml2_Action::process Объект: Df_1C_Model_Cml2_Action_Front::processInternal Контекст: if (!df_cfg()->_1c()->general()->isEnabled()) { df_error(self::T__MODULE_IS_DISABLED); } df_h()->dataflow()->registry()->products()->addValidator(Df_1C_Validate_Product::s()); /** @var string|bool $output */ $output = null; ob_start(); $this->processInternal(); /** * Используем @, чтобы избежать сбоя «Failed to delete buffer zlib output compression». * Такой сбой у меня возник на сервере moysklad.magento-demo.ru * в другой точке программы при аналогичном вызове @see ob_get_clean. */ $output = @ob_get_clean(); if ($output) { ob_start(); ************************************ Файл: app/code/local/Df/1C/controllers/Cml2Controller.php Строка: 17 Субъект: Df_1C_Cml2Controller::indexAction Объект: Df_1C_Model_Cml2_Action::process Контекст: * надлежащим для 1C: Управление торговлей способом * (возвращает диагностическое сообщение в 1C: Управление торговлей * по стандарту CommerceML 2) */ if (df_is_it_my_local_pc()) { Mage::log(Mage::app()->getRequest()->getRequestUri()); } Df_1C_Model_Cml2_Action_Front::i($this)->process(); } /** * @override * @return Df_1C_Cml2Controller */ public function preDispatch() { /** ************************************ Файл: app/code/core/Mage/Core/Controller/Varien/Action.php Строка: 418 Субъект: Mage_Core_Controller_Varien_Action::dispatch Объект: Df_1C_Cml2Controller::indexAction Контекст: /** * preDispatch() didn't change the action, so we can continue */ if (!$this->getFlag('', self::FLAG_NO_DISPATCH)) { $_profilerKey = self::PROFILER_KEY.'::'.$this->getFullActionName(); Varien_Profiler::start($_profilerKey); $this->$actionMethodName(); Varien_Profiler::stop($_profilerKey); Varien_Profiler::start(self::PROFILER_KEY.'::postdispatch'); $this->postDispatch(); Varien_Profiler::stop(self::PROFILER_KEY.'::postdispatch'); } } } ************************************ Файл: app/code/core/Mage/Core/Controller/Varien/Router/Standard.php Строка: 250 Субъект: Mage_Core_Controller_Varien_Router_Standard::match Объект: Mage_Core_Controller_Varien_Action::dispatch Контекст: // set parameters from pathinfo for ($i = 3, $l = sizeof($p); $i < $l; $i += 2) { $request->setParam($p[$i], isset($p[$i+1]) ? urldecode($p[$i+1]) : ''); } // dispatch action $request->setDispatched(true); $controllerInstance->dispatch($action); return true; } /** * Get router default request path * @return string */ ************************************ Файл: app/code/core/Mage/Core/Controller/Varien/Front.php Строка: 172 Субъект: Mage_Core_Controller_Varien_Front::dispatch Объект: Mage_Core_Controller_Varien_Router_Standard::match Контекст: $this->_getRequestRewriteController()->rewrite(); Varien_Profiler::start('mage::dispatch::routers_match'); $i = 0; while (!$request->isDispatched() && $i++ < 100) { foreach ($this->_routers as $router) { /** @var $router Mage_Core_Controller_Varien_Router_Abstract */ if ($router->match($request)) { break; } } } Varien_Profiler::stop('mage::dispatch::routers_match'); if ($i>100) { Mage::throwException('Front controller reached 100 router match iterations'); } ************************************ Файл: app/code/core/Mage/Core/Model/App.php Строка: 354 Субъект: Mage_Core_Model_App::run Объект: Mage_Core_Controller_Varien_Front::dispatch Контекст: $scopeCode = isset($params['scope_code']) ? $params['scope_code'] : ''; $scopeType = isset($params['scope_type']) ? $params['scope_type'] : 'store'; $this->_initCurrentStore($scopeCode, $scopeType); $this->_initRequest(); Mage_Core_Model_Resource_Setup::applyAllDataUpdates(); } $this->getFrontController()->dispatch(); } return $this; } /** * Initialize PHP environment * * @return Mage_Core_Model_App ************************************ Файл: app/Mage.php Строка: 684 Субъект: Mage::run Объект: Mage_Core_Model_App::run Контекст: self::$_events = new Varien_Event_Collection(); self::_setIsInstalled($options); self::_setConfigModel($options); self::$_app->run(array( 'scope_code' => $code, 'scope_type' => $type, 'options' => $options, )); Varien_Profiler::stop('mage'); } catch (Mage_Core_Model_Session_Exception $e) { header('Location: ' . self::getBaseUrl()); die(); } catch (Mage_Core_Model_Store_Exception $e) { require_once(self::getBaseDir() . DS . 'errors' . DS . '404.php'); die(); } catch (Exception $e) { ************************************ Файл: index.php Строка: 87 Субъект: Объект: Mage::run Контекст: /* Store or website code */ $mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : ''; /* Run store or run website */ $mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store'; Mage::run($mageRunCode, $mageRunType); ************************************