URL: http://euro-mebel.biz/df-1c/cml2/index/?type=sale&mode=query Версия Magento: 2.43.19 (1.9.1.0) Версия PHP: 5.6.7-1 Время: 2015-08-04 18:08:38 MSK Оформительская тема: default / default *********************************** Система не нашла в базе данных объект класса «Df_Catalog_Model_Product» с идентификатором «4». *********************************** Файл: app/code/local/Df/Core/lib/fp/other.php Строка: 219 Субъект: df_load Объект: df_error Контекст: $result = null; } else { df_error( 'Система не нашла в базе данных объект класса «%s» с идентификатором «%d».' ,get_class($result) ,$id ); } } if (!is_null($result)) { /** @var mixed $modelId */ $modelId = is_null($field) ? $result->getId() : $result->getData($field); /** * Обратите внимание, что мы намеренно используем !=, а не !== */ ************************************ Файл: app/code/local/Df/Catalog/Model/Product.php Строка: 950 Субъект: Df_Catalog_Model_Product::ld Объект: df_load Контекст: $sku = $id; $id = Df_Catalog_Helper_Product::s()->getIdBySku($sku); if (!$id) { df_error('Система не нашла в базе данных товар с артикулом «%s».', $sku); } df_assert_integer($id); } df_load($result, $id); rm_admin_end(); return $result; } /** * @see Df_Catalog_Model_Resource_Product_Collection::_construct() * @return string */ public static function mf() {static $r; return $r ? $r : $r = rm_class_mf(__CLASS__);} ************************************ Файл: app/code/local/Df/Core/lib/fp/catalog.php Строка: 58 Субъект: df_product Объект: Df_Catalog_Model_Product::ld Контекст: } else { if (!is_null($storeId) && !df_check_integer($storeId)) { /** @var Mage_Core_Model_Store $store */ $storeId = Mage::app()->getStore($storeId)->getId(); df_assert_integer($storeId); } $result = Df_Catalog_Model_Product::ld($id, $storeId); } return $result; } /** * @param array $resultValue * @param int $stackLevel[optional] * @return void ************************************ Файл: app/code/local/Df/1C/Model/Cml2/State/Export/Products.php Строка: 12 Субъект: Df_1C_Model_Cml2_State_Export_Products::getProductById Объект: df_product Контекст: * @return Df_Catalog_Model_Product */ public function getProductById($productId) { df_param_integer($productId, 0); /** @var Df_Catalog_Model_Product $result */ $result = $this->getItemById($productId); if (!$result) { $result = df_product($productId, rm_state()->getStoreProcessed()->getId()); $this->addItem($result); } return $result; } const _CLASS = __CLASS__; /** @return Df_1C_Model_Cml2_State_Export_Products */ public static function s() {static $r; return $r ? $r : $r = new self;} ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Export/Processor/Order/Item.php Строка: 196 Субъект: Df_1C_Model_Cml2_Export_Processor_Order_Item::getProduct Объект: Df_1C_Model_Cml2_State_Export_Products::getProductById Контекст: /** @return Df_Catalog_Model_Product */ private function getProduct() { if (!isset($this->{__METHOD__})) { $this->{__METHOD__} = Df_1C_Model_Cml2_State::s()->export()->getProducts()->getProductById( rm_nat($this->getOrderItem()->getProductId()) ) ; } return $this->{__METHOD__}; } /** @return string */ private function getProductExternalId() { /** ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Export/Processor/Order/Item.php Строка: 210 Субъект: Df_1C_Model_Cml2_Export_Processor_Order_Item::getProductExternalId Объект: Df_1C_Model_Cml2_Export_Processor_Order_Item::getProduct Контекст: private function getProductExternalId() { /** * У товара может отсутствовать внешний идентификатор, если товар был создан в Magento. * В таком случае мы не назначаем товару внешний идентификатор, * потому что 1С:Управление торговлей всё равно его проигнорирует * и назначит свой идентификатор. */ return df_nts($this->getProduct()->getData(Df_Eav_Const::ENTITY_EXTERNAL_ID)); } /** @return string */ private function getProductNameForExport() { if (!isset($this->{__METHOD__})) { /** @var string $result */ $result = $this->getProduct()->getName(); df_assert_string_not_empty($result); ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Export/Processor/Order/Item.php Строка: 9 Субъект: Df_1C_Model_Cml2_Export_Processor_Order_Item::getDocumentData Объект: Df_1C_Model_Cml2_Export_Processor_Order_Item::getProductExternalId Контекст: class Df_1C_Model_Cml2_Export_Processor_Order_Item extends Df_1C_Model_Cml2_Export_Processor { /** @return mixed[] */ public function getDocumentData() { if (!isset($this->{__METHOD__})) { /** @var mixed[] $result */ $result = array( 'Ид' => $this->getProductExternalId() ,'Наименование' => $this->getProductNameForExport() //$this->getProduct()->getName() ,'БазоваяЕдиница' => array( Df_Varien_Simplexml_Element::KEY__ATTRIBUTES => array( 'Код' => '796' ,'НаименованиеПолное' => 'Штука' ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Export/Processor/Order.php Строка: 280 Субъект: Df_1C_Model_Cml2_Export_Processor_Order::getDocumentData_OrderItems Объект: Df_1C_Model_Cml2_Export_Processor_Order_Item::getDocumentData Контекст: /** @return mixed[] */ private function getDocumentData_OrderItems() { /** @var mixed[] $result */ $result = array(); foreach ($this->getOrder()->getItemsCollection() as $item) { /** @var Mage_Sales_Model_Order_Item $item */ if (Mage_Catalog_Model_Product_Type::TYPE_SIMPLE === $item->getProductType()) { $result[]= Df_1C_Model_Cml2_Export_Processor_Order_Item::i($item)->getDocumentData(); } } if (0 < $this->getOrder()->getShippingAmount()) { /** * Используем тот же трюк, что и 1С-Битрикс: * указываем стоимость доставки отдельной строкой заказа */ $result[]= ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Export/Processor/Order.php Строка: 261 Субъект: Df_1C_Model_Cml2_Export_Processor_Order::getDocumentData_Order Объект: Df_1C_Model_Cml2_Export_Processor_Order::getDocumentData_OrderItems Контекст: ) ,'Скидки' => array( 'Скидка' => $this->getDocumentData_Discounts() ) ,'Товары' => array( 'Товар' => $this->getDocumentData_OrderItems() ) ,'ЗначенияРеквизитов' => array( 'ЗначениеРеквизита' => $this->getDocumentData_OrderProperties() ) ,'Комментарий' => $this->getOrderComments() ) ; ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Export/Processor/Order.php Строка: 7 Субъект: Df_1C_Model_Cml2_Export_Processor_Order::process Объект: Df_1C_Model_Cml2_Export_Processor_Order::getDocumentData_Order Контекст: getDocument() ->importArray( $this->getDocumentData_Order() ,$wrapInCData = array( 'Ид' ,'Комментарий' ,'Наименование' ,'Описание' ,'Представление' ) ************************************ Файл: app/code/local/Df/1C/Model/Cml2/SimpleXml/Generator/Document/Orders.php Строка: 13 Субъект: Df_1C_Model_Cml2_SimpleXml_Generator_Document_Orders::createElement Объект: Df_1C_Model_Cml2_Export_Processor_Order::process Контекст: * @return Df_Varien_Simplexml_Element */ protected function createElement() { /** @var Df_Varien_Simplexml_Element $result */ $result = parent::createElement(); foreach ($this->getOrders() as $order) { /** @var Df_Sales_Model_Order $order */ Df_1C_Model_Cml2_Export_Processor_Order::i($order, $result)->process(); } return $result; } /** @return Df_Sales_Model_Resource_Order_Collection */ private function getOrders() { return $this->cfg(self::P__ORDERS); } ************************************ Файл: app/code/local/Df/Core/Model/SimpleXml/Generator/Element.php Строка: 13 Субъект: Df_Core_Model_SimpleXml_Generator_Element::getElement Объект: Df_1C_Model_Cml2_SimpleXml_Generator_Document_Orders::createElement Контекст: * и единственное применение этого класса на данный момент — * служить родителем классу @see Df_Core_Model_SimpleXml_Generator_Document. */ abstract class Df_Core_Model_SimpleXml_Generator_Element extends Df_Core_Model_Abstract { /** @return Df_Varien_Simplexml_Element */ public function getElement() { if (!isset($this->{__METHOD__})) { $this->{__METHOD__} = $this->createElement(); } return $this->{__METHOD__}; } /** @return Df_Varien_Simplexml_Element */ protected function createElement() { return Df_Varien_Simplexml_Element::createNode($this->getTagName(), $this->getAttributes()); } ************************************ Файл: app/code/local/Df/Core/Model/SimpleXml/Generator/Document.php Строка: 10 Субъект: Df_Core_Model_SimpleXml_Generator_Document::getXml Объект: Df_Core_Model_SimpleXml_Generator_Element::getElement Контекст: /** @return string */ public function getXml() { if (!isset($this->{__METHOD__})) { /** @var string $result */ $result = $this->needSkipXmlHeader() ? $this->getElement()->asXMLPart() : $this->getElement()->asXML() ; // Убеждаемся, что asXML вернуло строку, а не false. df_assert_string($result); /** * символ 0xB (вертикальная табуляция) допустим в UTF-8, * но недопустим в XML * @link http://stackoverflow.com/a/10095901/254475 */ ************************************ Файл: app/code/local/Df/1C/Model/Cml2/SimpleXml/Generator/Document.php Строка: 13 Субъект: Df_1C_Model_Cml2_SimpleXml_Generator_Document::getXml Объект: Df_Core_Model_SimpleXml_Generator_Document::getXml Контекст: */ public function getXml() { /** * Документы в кодировке UTF-8 должны передаваться в 1С:Управление торговлей * с символом BOM в начале. * @link http://habrahabr.ru/company/bitrix/blog/129156/#comment_4277527 */ return df_text()->bomAdd(parent::getXml()); } /** * @override * @return array(string => string) */ protected function getAttributes() { return array( ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Action/GenericExport.php Строка: 13 Субъект: Df_1C_Model_Cml2_Action_GenericExport::processInternal Объект: Df_1C_Model_Cml2_SimpleXml_Generator_Document::getXml Контекст: /** * @override * @return void */ protected function processInternal() { rm_response_content_type($this->getResponse(), 'application/xml; charset=utf-8'); $this->logDocument(); $this->getResponse()->setBody($this->getDocument()->getXml()); } /** @return Df_1C_Model_Cml2_SimpleXml_Generator_Document */ private function createDocumentFake() { return Df_1C_Model_Cml2_SimpleXml_Generator_Document::i(); } /** @return Df_1C_Model_Cml2_SimpleXml_Generator_Document */ ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Action.php Строка: 36 Субъект: Df_1C_Model_Cml2_Action::process Объект: Df_1C_Model_Cml2_Action_GenericExport::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 Строка: 130 Субъект: Df_1C_Model_Cml2_Action_Front::action_ordersExport Объект: Df_1C_Model_Cml2_Action::process Контекст: $this->action_ordersExportSuccess(); break; } } /** @return void */ private function action_ordersExport() { Df_1C_Model_Cml2_Action_Orders_Export::i($this->getData())->process(); } /** @return void */ private function action_ordersExportSuccess() { $this->setResponseBodyAsArrayOfStrings(array('success', '')); } /** @return void */ ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Action/Front.php Строка: 120 Субъект: Df_1C_Model_Cml2_Action_Front::action_orders Объект: Df_1C_Model_Cml2_Action_Front::action_ordersExport Контекст: case Df_1C_Model_Cml2_InputRequest_Generic::MODE__FILE: $this->action_ordersImport(); break; case Df_1C_Model_Cml2_InputRequest_Generic::MODE__INIT: $this->action_init(); break; case Df_1C_Model_Cml2_InputRequest_Generic::MODE__QUERY: $this->action_ordersExport(); break; case Df_1C_Model_Cml2_InputRequest_Generic::MODE__SUCCESS: $this->action_ordersExportSuccess(); break; } } /** @return void */ ************************************ Файл: app/code/local/Df/1C/Model/Cml2/Action/Front.php Строка: 25 Субъект: Df_1C_Model_Cml2_Action_Front::processInternal Объект: Df_1C_Model_Cml2_Action_Front::action_orders Контекст: case Df_1C_Model_Cml2_InputRequest_Generic::TYPE__GET_CATALOG: $this->action_catalogExport(); break; case Df_1C_Model_Cml2_InputRequest_Generic::TYPE__CATALOG: $this->action_catalog(); break; case Df_1C_Model_Cml2_InputRequest_Generic::TYPE__ORDERS: $this->action_orders(); break; case Df_1C_Model_Cml2_InputRequest_Generic::TYPE__REFERENCE: $this->action_reference(); break; } } } ************************************ Файл: 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(rm_last(explode('?', 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 Строка: 254 Субъект: 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); ************************************