Update README, update tests
This commit is contained in:
parent
cc995b83f5
commit
e93d2e2018
@ -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
|
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
|
This module is compatible with Magento up to version 2.2.3
|
||||||
|
@ -33,11 +33,6 @@ Magento module
|
|||||||
composer require retailcrm/api-client-php ~5.0
|
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/`.
|
В конфигурационный файл `composer.json` вашего проекта будет добавлена библиотека [retailcrm/api-client-php](https://github.com/retailcrm/api-client-php), которая будет установлена в директорию `vendor/`.
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,9 +73,11 @@ class Payment extends \Magento\Config\Block\System\Config\Form\Fieldset
|
|||||||
public function render(AbstractElement $element)
|
public function render(AbstractElement $element)
|
||||||
{
|
{
|
||||||
$html = '';
|
$html = '';
|
||||||
$htmlError = '
|
$htmlError = sprintf(
|
||||||
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
|
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
|
||||||
';
|
__('Enter API of your URL and API key')
|
||||||
|
);
|
||||||
|
|
||||||
$html .= $this->_getHeaderHtml($element);
|
$html .= $this->_getHeaderHtml($element);
|
||||||
|
|
||||||
if ($this->client->isConfigured()) {
|
if ($this->client->isConfigured()) {
|
||||||
|
@ -79,9 +79,10 @@ class Shipping extends \Magento\Config\Block\System\Config\Form\Fieldset
|
|||||||
public function render(AbstractElement $element)
|
public function render(AbstractElement $element)
|
||||||
{
|
{
|
||||||
$html = '';
|
$html = '';
|
||||||
$htmlError = '
|
$htmlError = sprintf(
|
||||||
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
|
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
|
||||||
';
|
__('Enter API of your URL and API key')
|
||||||
|
);
|
||||||
|
|
||||||
$html .= $this->_getHeaderHtml($element);
|
$html .= $this->_getHeaderHtml($element);
|
||||||
|
|
||||||
|
@ -76,9 +76,10 @@ class Site extends \Magento\Config\Block\System\Config\Form\Fieldset
|
|||||||
public function render(AbstractElement $element)
|
public function render(AbstractElement $element)
|
||||||
{
|
{
|
||||||
$html = '';
|
$html = '';
|
||||||
$htmlError = '
|
$htmlError = sprintf(
|
||||||
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
|
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
|
||||||
';
|
__('Enter API of your URL and API key')
|
||||||
|
);
|
||||||
$html .= $this->_getHeaderHtml($element);
|
$html .= $this->_getHeaderHtml($element);
|
||||||
|
|
||||||
if ($this->client->isConfigured()) {
|
if ($this->client->isConfigured()) {
|
||||||
|
@ -78,9 +78,10 @@ class Sites extends \Magento\Config\Block\System\Config\Form\Fieldset
|
|||||||
public function render(AbstractElement $element)
|
public function render(AbstractElement $element)
|
||||||
{
|
{
|
||||||
$html = '';
|
$html = '';
|
||||||
$htmlError = '
|
$htmlError = sprintf(
|
||||||
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
|
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
|
||||||
';
|
__('Enter API of your URL and API key')
|
||||||
|
);
|
||||||
$html .= $this->_getHeaderHtml($element);
|
$html .= $this->_getHeaderHtml($element);
|
||||||
|
|
||||||
if ($this->client->isConfigured()) {
|
if ($this->client->isConfigured()) {
|
||||||
|
@ -73,9 +73,10 @@ class Status extends \Magento\Config\Block\System\Config\Form\Fieldset
|
|||||||
public function render(AbstractElement $element)
|
public function render(AbstractElement $element)
|
||||||
{
|
{
|
||||||
$html = '';
|
$html = '';
|
||||||
$htmlError = '
|
$htmlError = sprintf(
|
||||||
<div style="margin-left: 15px;"><b><i>'. __('Enter API of your URL and API key') . '</i></b></div>
|
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
|
||||||
';
|
__('Enter API of your URL and API key')
|
||||||
|
);
|
||||||
|
|
||||||
$html .= $this->_getHeaderHtml($element);
|
$html .= $this->_getHeaderHtml($element);
|
||||||
|
|
||||||
|
@ -69,9 +69,10 @@ class PaymentTest extends \Retailcrm\Retailcrm\Test\Helpers\FieldsetTest
|
|||||||
$this->assertContains($this->testFieldSetCss, $html);
|
$this->assertContains($this->testFieldSetCss, $html);
|
||||||
|
|
||||||
if (!$isConfigured) {
|
if (!$isConfigured) {
|
||||||
$expected = '
|
$expected = sprintf(
|
||||||
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
|
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
|
||||||
';
|
__('Enter API of your URL and API key')
|
||||||
|
);
|
||||||
$this->assertContains($expected, $html);
|
$this->assertContains($expected, $html);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,9 +69,10 @@ class ShippingTest extends \Retailcrm\Retailcrm\Test\Helpers\FieldsetTest
|
|||||||
$this->assertContains($this->testFieldSetCss, $html);
|
$this->assertContains($this->testFieldSetCss, $html);
|
||||||
|
|
||||||
if (!$isConfigured) {
|
if (!$isConfigured) {
|
||||||
$expected = '
|
$expected = sprintf(
|
||||||
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
|
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
|
||||||
';
|
__('Enter API of your URL and API key')
|
||||||
|
);
|
||||||
$this->assertContains($expected, $html);
|
$this->assertContains($expected, $html);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,9 +60,10 @@ class SiteTest extends \Retailcrm\Retailcrm\Test\Helpers\FieldsetTest
|
|||||||
$this->assertContains($this->testFieldSetCss, $html);
|
$this->assertContains($this->testFieldSetCss, $html);
|
||||||
|
|
||||||
if (!$isConfigured) {
|
if (!$isConfigured) {
|
||||||
$expected = '
|
$expected = sprintf(
|
||||||
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
|
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
|
||||||
';
|
__('Enter API of your URL and API key')
|
||||||
|
);
|
||||||
$this->assertContains($expected, $html);
|
$this->assertContains($expected, $html);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,9 +72,10 @@ class SitesTest extends \Retailcrm\Retailcrm\Test\Helpers\FieldsetTest
|
|||||||
$this->assertContains($this->testFieldSetCss, $html);
|
$this->assertContains($this->testFieldSetCss, $html);
|
||||||
|
|
||||||
if (!$isConfigured) {
|
if (!$isConfigured) {
|
||||||
$expected = '
|
$expected = sprintf(
|
||||||
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
|
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
|
||||||
';
|
__('Enter API of your URL and API key')
|
||||||
|
);
|
||||||
$this->assertContains($expected, $html);
|
$this->assertContains($expected, $html);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,9 +69,10 @@ class StatusTest extends \Retailcrm\Retailcrm\Test\Helpers\FieldsetTest
|
|||||||
$this->assertContains($this->testFieldSetCss, $html);
|
$this->assertContains($this->testFieldSetCss, $html);
|
||||||
|
|
||||||
if (!$isConfigured) {
|
if (!$isConfigured) {
|
||||||
$expected = '
|
$expected = sprintf(
|
||||||
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
|
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
|
||||||
';
|
__('Enter API of your URL and API key')
|
||||||
|
);
|
||||||
$this->assertContains($expected, $html);
|
$this->assertContains($expected, $html);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user