Пример #1
0
 protected function _prepareLayout()
 {
     // TODO NOT SUPPORTED FEATURES
     /*        $this->view_ebay_feedbacks_notification_mode = (bool)(int)$this->cacheConfig->getGroupValue(
                         '/view/ebay/feedbacks/notification/','mode'
                     );
     
                     $this->is_ebay_feedbacks_enabled = $this->getHelper('View\Ebay')->isFeedbacksShouldBeShown();*/
     // TODO NOT SUPPORTED FEATURES
     /** @var \Ess\M2ePro\Helper\Component\Ebay\Motors $motorsHelper */
     /*      $motorsHelper = $this->getHelper('Component\Ebay\Motors');
     
                   $resource = Mage::getSingleton('core/resource');
                   $epidsDictionaryTable = $resource->getTableName('m2epro_ebay_dictionary_motor_epid');
                   $ktypeDictionaryTable = $resource->getTableName('m2epro_ebay_dictionary_motor_ktype');*/
     // ---------------------------------------
     /** @var \Ess\M2ePro\Model\ResourceModel\Marketplace\Collection $epidsMarketplaceCollection */
     /*$epidsMarketplaceCollection = Mage::getModel('M2ePro/Marketplace')->getCollection();
             $epidsMarketplaceCollection->addFieldToFilter(
                 'id',
                 array('in' => $motorsHelper->getEpidSupportedMarketplaces())
             );
             $epidsMarketplaceCollection->addFieldToFilter('status', Ess_M2ePro_Model_Marketplace::STATUS_ENABLE);
             $this->is_motors_epids_marketplace_enabled = (bool)$epidsMarketplaceCollection->getSize();
     
             $ebayDictionaryRecords = (int)$resource->getConnection('core_read')
                 ->select()
                 ->from($epidsDictionaryTable, array(new Zend_Db_Expr('COUNT(*)')))
                 ->where('is_custom = 0')
                 ->query()
                 ->fetchColumn();
     
             $customDictionaryRecords = (int)$resource->getConnection('core_read')
                 ->select()
                 ->from($epidsDictionaryTable, array(new Zend_Db_Expr('COUNT(*)')))
                 ->where('is_custom = 1')
                 ->query()
                 ->fetchColumn();
     
             $this->motors_epids_dictionary_ebay_count   = $ebayDictionaryRecords;
             $this->motors_epids_dictionary_custom_count = $customDictionaryRecords;*/
     // ---------------------------------------
     // ---------------------------------------
     /** @var \Ess\M2ePro\Model\ResourceModel\Marketplace\Collection $ktypeMarketplaceCollection */
     /*$ktypeMarketplaceCollection = Mage::getModel('M2ePro/Marketplace')->getCollection();
             $ktypeMarketplaceCollection->addFieldToFilter(
                 'id',
                 array('in' => $motorsHelper->getKtypeSupportedMarketplaces())
             );
             $ktypeMarketplaceCollection->addFieldToFilter('status', Ess_M2ePro_Model_Marketplace::STATUS_ENABLE);
             $this->is_motors_ktypes_marketplace_enabled = (bool)$ktypeMarketplaceCollection->getSize();
     
             $ebayDictionaryRecords = (int)$resource->getConnection('core_read')
                 ->select()
                 ->from($ktypeDictionaryTable, array(new Zend_Db_Expr('COUNT(*)')))
                 ->where('is_custom = 0')
                 ->query()
                 ->fetchColumn();
     
             $customDictionaryRecords = (int)$resource->getConnection('core_read')
                 ->select()
                 ->from($ktypeDictionaryTable, array(new Zend_Db_Expr('COUNT(*)')))
                 ->where('is_custom = 1')
                 ->query()
                 ->fetchColumn();
     
             $this->motors_ktypes_dictionary_ebay_count   = $ebayDictionaryRecords;
             $this->motors_ktypes_dictionary_custom_count = $customDictionaryRecords;*/
     // ---------------------------------------
     // ---------------------------------------
     /*$attributesForMotors = Mage::getResourceModel('catalog/product_attribute_collection')
                 ->addVisibleFilter()
                 ->addFieldToFilter('backend_type', array('eq' => 'text'))
                 ->addFieldToFilter('frontend_input', array('eq' => 'textarea'))
                 ->toArray();
     
             $this->attributes_for_motors = $attributesForMotors['items'];
     
             $this->motors_epids_attribute = $this->cacheConfig->getGroupValue('/ebay/motors/','epids_attribute');
             $this->motors_ktypes_attribute = $this->cacheConfig->getGroupValue('/ebay/motors/','ktypes_attribute');*/
     // ---------------------------------------
     return parent::_prepareLayout();
 }