/** * @return int|null */ public function getLocalDeliveryCost() { /** @var int|null $result */ $result = Mage::getStoreConfig('df_yandex_market/general/local_delivery_cost', df_helper()->yandexMarket()->getStoreProcessed()); /** * '' does not appear to be an integer */ if (df_empty($result)) { $result = 0; } if (!is_null($result)) { df_result_integer($result); } return $result; }
/** * @return array */ private function getDocumentData_Categories() { /** @var array $result */ $result = array(); foreach ($this->getCategories() as $category) { /** @var Mage_Catalog_Model_Category $category */ df_assert($category instanceof Mage_Catalog_Model_Category); if (0 < $category->getId()) { /** @var array $attributes */ $attributes = array('id' => $category->getId()); if (0 < $category->getParentId()) { $attributes['parentId'] = $category->getParentId(); } $result[] = array(Df_Varien_Simplexml_Element::KEY__ATTRIBUTES => $attributes, Df_Varien_Simplexml_Element::KEY__VALUE => Df_Varien_Simplexml_Element::markAsCData(df_empty($category->getName()) ? $category->getId() : $category->getName())); } } df_result_array($result); return $result; }