diff --git a/Block/Extensions.php b/Block/Extensions.php index 20400a6..c340cc1 100644 --- a/Block/Extensions.php +++ b/Block/Extensions.php @@ -18,37 +18,37 @@ class Extensions extends \Magento\Config\Block\System\Config\Form\Fieldset * @var \Magento\Framework\Module\ModuleListInterface */ protected $_moduleList; - + /** * @var \Magento\Framework\View\LayoutFactory */ protected $_layoutFactory; - + /** * @var \Magento\Framework\Module\Dir\Reader */ protected $_moduleReader; - + /** * @var DecoderInterface */ protected $_jsonDecoder; - + /** * @var \Magento\Framework\Filesystem\Driver\File */ protected $_filesystem; - + /** * @var \Mygento\Base\Helper\Module */ protected $_moduleHelper; - + /** * @var \Magento\Store\Api\Data\StoreInterface */ protected $_store; - + /** * * @param \Magento\Backend\Block\Context $context @@ -79,7 +79,7 @@ public function __construct( array $data = [] ) { parent::__construct($context, $authSession, $jsHelper, $data); - + $this->_moduleList = $moduleList; $this->_layoutFactory = $layoutFactory; $this->_moduleReader = $moduleReader; @@ -89,7 +89,7 @@ public function __construct( $this->_store = $store; $this->_scopeConfig = $context->getScopeConfig(); } - + /** * Render fieldset html * @@ -99,15 +99,15 @@ public function __construct( public function render(AbstractElement $element) { $html = $this->_getHeaderHtml($element); - + $site = 'https://www.mygento.net'; $email = 'connect@mygento.net'; - + if ($this->_store->getLocaleCode() == 'ru_RU') { $site = 'https://www.mygento.ru'; $email = 'connect@mygento.ru'; } - + $ticketUrl = "mailto:support@mygento.ru"; $url = __( 'Purchased extensions support is available through ' @@ -127,7 +127,7 @@ public function render(AbstractElement $element) ); $tender = __('Tender offer can be checked ' . 'here'); - + $html .= '' . ''; $html .= '' . @@ -142,12 +142,12 @@ public function render(AbstractElement $element) $site . '/services' ) . ''; $html .= '
' . __('Support') . ':
'; - + $modules = $this->_moduleList->getNames(); - + $dispatchResult = new \Magento\Framework\DataObject($modules); $modules = $dispatchResult->toArray(); - + $html .= '

' . __('Installed Extensions') . '

'; $html .= ''; - + $html .= $this->_getFooterHtml($element); - + return $html; } - + /** * @return \Magento\Framework\View\Element\BlockInterface */ @@ -174,15 +174,15 @@ protected function _getFieldRenderer() { if (empty($this->_fieldRenderer)) { $layout = $this->_layoutFactory->create(); - + $this->_fieldRenderer = $layout->createBlock( - \Magento\Config\Block\System\Config\Form\Field::class + 'Magento\Config\Block\System\Config\Form\Field' ); } - + return $this->_fieldRenderer; } - + /** * Read info about extension from composer json file * @param $moduleCode @@ -193,13 +193,13 @@ protected function _getModuleInfo($moduleCode) { $dir = $this->_moduleReader->getModuleDir('', $moduleCode); $file = $dir . DIRECTORY_SEPARATOR . 'composer.json'; - + $string = $this->_filesystem->fileGetContents($file); $json = $this->_jsonDecoder->decode($string); - + return $json; } - + /** * @param $fieldset * @param $moduleCode @@ -214,22 +214,22 @@ protected function _getFieldHtml($fieldset, $moduleCode) ) { return ''; } - + $currentVer = $module['version']; $moduleName = $module['description']; $status = ''; - + // in case if module output disabled if ($this->_scopeConfig->getValue('advanced/modules_disable_output/' . $moduleCode)) { $status = __('Output disabled'); } - + $field = $fieldset->addField($moduleCode, 'label', [ 'name' => 'dummy', 'label' => $moduleName, 'value' => $currentVer, ])->setRenderer($this->_getFieldRenderer()); - + return '
  • ' . $status . $field->toHtml() . '
  • '; } } diff --git a/Helper/Discount.php b/Helper/Discount.php index 6085a9f..416d9ce 100644 --- a/Helper/Discount.php +++ b/Helper/Discount.php @@ -33,14 +33,14 @@ public function __construct(\Mygento\Base\Helper\Data $baseHelper) $this->generalHelper = $baseHelper; } - /** Returns all items of the entity (order|invoice|creditmemo) - * with properly calculated discount and properly calculated Sum - * - * @param $entity Mage_Sales_Model_Order|Mage_Sales_Model_Order_Invoice|Mage_Sales_Model_Order_Creditmemo + /** + * @param mixed $entity * @param string $taxValue - * @param string $taxAttributeCode Set it if info about tax is stored in product in certain attr + * @param string $taxAttributeCode * @param string $shippingTaxValue - * @return array with calculated items and sum + * @param bool $spreadDiscOnAllUnits + * @return array|void + * @throws \Exception */ public function getRecalculated( $entity, diff --git a/Ui/Component/Listing/Actions.php b/Ui/Component/Listing/Actions.php index d2757ef..7139596 100644 --- a/Ui/Component/Listing/Actions.php +++ b/Ui/Component/Listing/Actions.php @@ -38,6 +38,7 @@ public function __construct( $this->urlBuilder = $urlBuilder; } + /** * Prepare Data Source * diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index 2d4cc93..87e18d3 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -6,19 +6,16 @@ * @package Mygento_Base */ --> - + -
    +
    mygento Mygento_Base::config - + Mygento\Base\Block\Extensions diff --git a/i18n/ru_RU.csv b/i18n/ru_RU.csv index ebd2cd8..8c01a08 100644 --- a/i18n/ru_RU.csv +++ b/i18n/ru_RU.csv @@ -11,4 +11,17 @@ "You can check all providable services on our website.","Со списком предоставляемых услуг вы можете ознакомиться на нашем сайте." "You can hire us for any Magento extension customization and development.
    Write us to %1","Вы можете нанять нашу команду для любых работ с модулями Magento.
    Пишите нам на %1" "Tender offer can be checked here","Ознакомиться с публичной офертой можно здесь" -"No usage","Не использовать" \ No newline at end of file +"No usage","Не использовать" +"VAT Free","НДС не облагается" +"VAT18","НДС 18%" +"VAT10","НДС 10%" +"VAT0","НДС 0%" +"VAT110","расчетный НДС 10/110" +"VAT118","расчетный НДС 18/118" +"Tax","Отправка 54-ФЗ" +"Shipping Tax","Налог на доставку" +"Same tax for all products","Единая ставка НДС на все товары" +"Product Tax Attribute","Атрибут налога в товаре" +"Tax value for all products","Ставка НДС для всех товаров" +"Default Shipping name in receipt","Использовать системное название доставки в чеке" +"Shipping name in receipt","Наименование доставки в чеке" \ No newline at end of file