protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     // ---------------------------------------
     //        $this->setChild('confirm', $this->getLayout()->createBlock('M2ePro/adminhtml_widget_dialog_confirm'));
     // ---------------------------------------
 }
Exemple #2
0
 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     // ---------------------------------------
     $data = array('class' => 'ok_button', 'label' => $this->__('Confirm'), 'onclick' => 'Dialog.okCallback();');
     $buttonBlock = $this->createBlock('Magento\\Button')->setData($data);
     $this->setChild('ok_button', $buttonBlock);
     // ---------------------------------------
 }
Exemple #3
0
 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     // ---------------------------------------
     $data = array('id' => 'done_button', 'class' => 'save done primary', 'label' => $this->__('Save'));
     $buttonBlock = $this->createBlock('Magento\\Button')->setData($data);
     $this->setChild('done', $buttonBlock);
     // ---------------------------------------
 }
Exemple #4
0
 protected function _beforeToHtml()
 {
     $helpBlock = $this->createBlock('HelpBlock', '', ['data' => ['content' => $this->__('If you cannot find necessary Category, try to
             <a href="javascript:void(0)"
                onclick="AmazonTemplateDescriptionCategoryChooserObj.refreshAmazonCategories()">
             Update Amazon Marketplaces data</a>.'), 'no_collapse' => true]]);
     $this->setChild('help_block', $helpBlock);
     $this->js->add("AmazonTemplateDescriptionCategoryChooserObj.renderTopLevelCategories('chooser_browser');");
     return parent::_beforeToHtml();
 }
 protected function _beforeToHtml()
 {
     $tableName = $this->getData('table_name');
     $actionIdsString = $this->getData('action_ids');
     $countField = 'product_id';
     if ($this->getData('type_log') == 'listing') {
         $countField = 'product_id';
     } else {
         if ($this->getData('type_log') == 'listing_other') {
             $countField = 'listing_other_id';
         }
     }
     $connection = $this->resourceConnection->getConnection();
     $fields = new \Zend_Db_Expr('COUNT(`' . $countField . '`) as `count_products`, `description`');
     $dbSelect = $connection->select()->from($tableName, $fields)->where('`action_id` IN (' . $actionIdsString . ')')->where('`type` = ?', \Ess\M2ePro\Model\Log\AbstractLog::TYPE_ERROR)->group('description')->order(array('count_products DESC'))->limit(100);
     $newErrors = array();
     $tempErrors = $connection->fetchAll($dbSelect);
     foreach ($tempErrors as $row) {
         $row['description'] = $this->getHelper('View')->getModifiedLogMessage($row['description']);
         $newErrors[] = $row;
     }
     $this->errors = $newErrors;
     return parent::_beforeToHtml();
 }
Exemple #6
0
 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     // ---------------------------------------
     $nick = $this->getTemplateNick();
     $data = array('class' => 'save-custom-template-' . $nick, 'label' => $this->getHelper('Module\\Translation')->__('Save as New Policy'), 'onclick' => 'EbayListingTemplateSwitcherHandlerObj.customSaveAsTemplate(\'' . $nick . '\');');
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
     $this->setChild('save_custom_as_template', $buttonBlock);
     // ---------------------------------------
 }
Exemple #7
0
 protected function _beforeToHtml()
 {
     $rows = $this->getRows();
     if (count($rows) == 0) {
         return parent::_beforeToHtml();
     }
     $lastActionRow = $rows[0];
     // ---------------------------------------
     // Get log icon
     // ---------------------------------------
     $icon = 'normal';
     $tip = $this->__('Last Action was completed successfully.');
     if (isset($lastActionRow['type'])) {
         $tip = $this->getTipByType($lastActionRow['type']);
         $icon = $this->getIconByType($lastActionRow['type']);
     }
     $this->tip = $this->getHelper('Data')->escapeHtml($tip);
     $this->iconSrc = $this->getViewFileUrl('Ess_M2ePro::images/log_statuses/' . $icon . '.png');
     $this->rows = $rows;
     // ---------------------------------------
     return parent::_beforeToHtml();
 }
Exemple #8
0
 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     // ---------------------------------------
     $nick = $this->getTemplateNick();
     $data = array('class' => 'action primary save-custom-template-' . $nick, 'label' => $this->__('Save as New Policy'), 'onclick' => 'EbayListingTemplateSwitcherObj.customSaveAsTemplate(\'' . $nick . '\');');
     $buttonBlock = $this->createBlock('Magento\\Button')->setData($data);
     $this->setChild('save_custom_as_template', $buttonBlock);
     // ---------------------------------------
 }