diff --git a/README.md b/README.md index 92968f5..6d8b3d5 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,4 @@ By default ICML file is being generated by module every 4 hours. You can find fi composer require retailcrm/api-client-php ~5.0 ``` -2) Unpack the archive with the module into the `app/code/Retailcrm/Retailcrm` directory. - -3) Change `app/etc/config.php` file by adding `'Retailcrm_Retailcrm' => 1` line into `modules` array - This module is compatible with Magento up to version 2.2.3 diff --git a/README.ru.md b/README.ru.md index a439a0c..4e1f9ab 100644 --- a/README.ru.md +++ b/README.ru.md @@ -33,11 +33,6 @@ Magento module composer require retailcrm/api-client-php ~5.0 ``` -2) Распакуйте архив с модулем в директорию "app/code/Retailcrm/Retailcrm". - -3) В файле "app/etc/config.php" в массив `modules` добавьте элемент `'Retailcrm_Retailcrm' => 1` - - В конфигурационный файл `composer.json` вашего проекта будет добавлена библиотека [retailcrm/api-client-php](https://github.com/retailcrm/api-client-php), которая будет установлена в директорию `vendor/`. diff --git a/src/Block/Adminhtml/System/Config/Form/Fieldset/Payment.php b/src/Block/Adminhtml/System/Config/Form/Fieldset/Payment.php index 7328b3d..9de6c0d 100644 --- a/src/Block/Adminhtml/System/Config/Form/Fieldset/Payment.php +++ b/src/Block/Adminhtml/System/Config/Form/Fieldset/Payment.php @@ -73,9 +73,11 @@ class Payment extends \Magento\Config\Block\System\Config\Form\Fieldset public function render(AbstractElement $element) { $html = ''; - $htmlError = ' -
' . __('Enter API of your URL and API key') . '
- '; + $htmlError = sprintf( + '
%s
', + __('Enter API of your URL and API key') + ); + $html .= $this->_getHeaderHtml($element); if ($this->client->isConfigured()) { diff --git a/src/Block/Adminhtml/System/Config/Form/Fieldset/Shipping.php b/src/Block/Adminhtml/System/Config/Form/Fieldset/Shipping.php index a30d143..8ba7999 100644 --- a/src/Block/Adminhtml/System/Config/Form/Fieldset/Shipping.php +++ b/src/Block/Adminhtml/System/Config/Form/Fieldset/Shipping.php @@ -79,9 +79,10 @@ class Shipping extends \Magento\Config\Block\System\Config\Form\Fieldset public function render(AbstractElement $element) { $html = ''; - $htmlError = ' -
' . __('Enter API of your URL and API key') . '
- '; + $htmlError = sprintf( + '
%s
', + __('Enter API of your URL and API key') + ); $html .= $this->_getHeaderHtml($element); diff --git a/src/Block/Adminhtml/System/Config/Form/Fieldset/Site.php b/src/Block/Adminhtml/System/Config/Form/Fieldset/Site.php index 5caabda..10e9872 100644 --- a/src/Block/Adminhtml/System/Config/Form/Fieldset/Site.php +++ b/src/Block/Adminhtml/System/Config/Form/Fieldset/Site.php @@ -76,9 +76,10 @@ class Site extends \Magento\Config\Block\System\Config\Form\Fieldset public function render(AbstractElement $element) { $html = ''; - $htmlError = ' -
' . __('Enter API of your URL and API key') . '
- '; + $htmlError = sprintf( + '
%s
', + __('Enter API of your URL and API key') + ); $html .= $this->_getHeaderHtml($element); if ($this->client->isConfigured()) { diff --git a/src/Block/Adminhtml/System/Config/Form/Fieldset/Sites.php b/src/Block/Adminhtml/System/Config/Form/Fieldset/Sites.php index 3267413..dfefd48 100644 --- a/src/Block/Adminhtml/System/Config/Form/Fieldset/Sites.php +++ b/src/Block/Adminhtml/System/Config/Form/Fieldset/Sites.php @@ -78,9 +78,10 @@ class Sites extends \Magento\Config\Block\System\Config\Form\Fieldset public function render(AbstractElement $element) { $html = ''; - $htmlError = ' -
' . __('Enter API of your URL and API key') . '
- '; + $htmlError = sprintf( + '
%s
', + __('Enter API of your URL and API key') + ); $html .= $this->_getHeaderHtml($element); if ($this->client->isConfigured()) { diff --git a/src/Block/Adminhtml/System/Config/Form/Fieldset/Status.php b/src/Block/Adminhtml/System/Config/Form/Fieldset/Status.php index 8bbe1b9..f141ee2 100644 --- a/src/Block/Adminhtml/System/Config/Form/Fieldset/Status.php +++ b/src/Block/Adminhtml/System/Config/Form/Fieldset/Status.php @@ -73,9 +73,10 @@ class Status extends \Magento\Config\Block\System\Config\Form\Fieldset public function render(AbstractElement $element) { $html = ''; - $htmlError = ' -
'. __('Enter API of your URL and API key') . '
- '; + $htmlError = sprintf( + '
%s
', + __('Enter API of your URL and API key') + ); $html .= $this->_getHeaderHtml($element); diff --git a/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/PaymentTest.php b/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/PaymentTest.php index 5f87fca..1d46690 100644 --- a/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/PaymentTest.php +++ b/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/PaymentTest.php @@ -69,9 +69,10 @@ class PaymentTest extends \Retailcrm\Retailcrm\Test\Helpers\FieldsetTest $this->assertContains($this->testFieldSetCss, $html); if (!$isConfigured) { - $expected = ' -
' . __('Enter API of your URL and API key') . '
- '; + $expected = sprintf( + '
%s
', + __('Enter API of your URL and API key') + ); $this->assertContains($expected, $html); } } diff --git a/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/ShippingTest.php b/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/ShippingTest.php index 4b3f7e8..63c9f96 100644 --- a/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/ShippingTest.php +++ b/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/ShippingTest.php @@ -69,9 +69,10 @@ class ShippingTest extends \Retailcrm\Retailcrm\Test\Helpers\FieldsetTest $this->assertContains($this->testFieldSetCss, $html); if (!$isConfigured) { - $expected = ' -
' . __('Enter API of your URL and API key') . '
- '; + $expected = sprintf( + '
%s
', + __('Enter API of your URL and API key') + ); $this->assertContains($expected, $html); } } diff --git a/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/SiteTest.php b/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/SiteTest.php index c71a441..930781d 100644 --- a/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/SiteTest.php +++ b/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/SiteTest.php @@ -60,9 +60,10 @@ class SiteTest extends \Retailcrm\Retailcrm\Test\Helpers\FieldsetTest $this->assertContains($this->testFieldSetCss, $html); if (!$isConfigured) { - $expected = ' -
' . __('Enter API of your URL and API key') . '
- '; + $expected = sprintf( + '
%s
', + __('Enter API of your URL and API key') + ); $this->assertContains($expected, $html); } } diff --git a/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/SitesTest.php b/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/SitesTest.php index ddfe761..8ce18ae 100644 --- a/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/SitesTest.php +++ b/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/SitesTest.php @@ -72,9 +72,10 @@ class SitesTest extends \Retailcrm\Retailcrm\Test\Helpers\FieldsetTest $this->assertContains($this->testFieldSetCss, $html); if (!$isConfigured) { - $expected = ' -
' . __('Enter API of your URL and API key') . '
- '; + $expected = sprintf( + '
%s
', + __('Enter API of your URL and API key') + ); $this->assertContains($expected, $html); } } diff --git a/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/StatusTest.php b/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/StatusTest.php index 66fc10b..e993c76 100644 --- a/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/StatusTest.php +++ b/src/Test/Unit/Block/Adminhtml/System/Config/Form/Fieldset/StatusTest.php @@ -69,9 +69,10 @@ class StatusTest extends \Retailcrm\Retailcrm\Test\Helpers\FieldsetTest $this->assertContains($this->testFieldSetCss, $html); if (!$isConfigured) { - $expected = ' -
' . __('Enter API of your URL and API key') . '
- '; + $expected = sprintf( + '
%s
', + __('Enter API of your URL and API key') + ); $this->assertContains($expected, $html); } }