mirror of
https://github.com/retailcrm/prestashop-module.git
synced 2025-03-01 10:53:14 +03:00
This commit is contained in:
parent
f615979fc7
commit
6b7599ec64
14
.github/workflows/presta.yml
vendored
14
.github/workflows/presta.yml
vendored
@ -15,23 +15,13 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- php-version: '7.1'
|
- php-version: '7.1'
|
||||||
branch: '1.7.4.4'
|
branch: '1.7.7.0'
|
||||||
composerv1: 1
|
composerv1: 1
|
||||||
phpunit-version: 'phpunit:6.4.3'
|
phpunit-version: 'phpunit:6.4.3'
|
||||||
- php-version: '7.2'
|
- php-version: '7.2'
|
||||||
branch: '1.7.4.4'
|
branch: '1.7.7.0'
|
||||||
composerv1: 1
|
composerv1: 1
|
||||||
phpunit-version: 'phpunit:6.4.3'
|
phpunit-version: 'phpunit:6.4.3'
|
||||||
|
|
||||||
- php-version: '7.1'
|
|
||||||
branch: '1.7.6.9'
|
|
||||||
composerv1: 1
|
|
||||||
phpunit-version: 'phpunit:6.4.3'
|
|
||||||
- php-version: '7.2'
|
|
||||||
branch: '1.7.6.9'
|
|
||||||
composerv1: 1
|
|
||||||
phpunit-version: 'phpunit:6.4.3'
|
|
||||||
|
|
||||||
- php-version: '7.1'
|
- php-version: '7.1'
|
||||||
branch: '1.7.7.8'
|
branch: '1.7.7.8'
|
||||||
composerv1: 1
|
composerv1: 1
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
## v3.5.7
|
||||||
|
* Изменены минимально поддерживаемые версии PrestaShop и PHP
|
||||||
|
|
||||||
## v3.5.6
|
## v3.5.6
|
||||||
* Исправление передачи брошенных корзин
|
* Исправление передачи брошенных корзин
|
||||||
|
|
||||||
|
12
Makefile
12
Makefile
@ -14,7 +14,7 @@ delete_archive:
|
|||||||
rm -f $(ARCHIVE_NAME)
|
rm -f $(ARCHIVE_NAME)
|
||||||
rm -f /tmp/retailcrm.zip
|
rm -f /tmp/retailcrm.zip
|
||||||
|
|
||||||
composer: clone_prestashop clone_composer fix-version-bugs
|
composer: clone_prestashop clone_composer fix-version-lang-bugs
|
||||||
ifeq ($(COMPOSERV1),1)
|
ifeq ($(COMPOSERV1),1)
|
||||||
cd $(PRESTASHOP_DIR) && php composer.phar install --prefer-dist --no-interaction --no-progress
|
cd $(PRESTASHOP_DIR) && php composer.phar install --prefer-dist --no-interaction --no-progress
|
||||||
else
|
else
|
||||||
@ -56,18 +56,13 @@ else
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
fix-version-bugs:
|
# Required for versions 1.7.7.x
|
||||||
|
fix-version-lang-bugs:
|
||||||
ifeq ($(COMPOSERV1),1)
|
ifeq ($(COMPOSERV1),1)
|
||||||
cd $(PRESTASHOP_DIR) \
|
cd $(PRESTASHOP_DIR) \
|
||||||
&& sed -i 's/throw new Exception/#throw new Exception/g' src/PrestaShopBundle/Install/DatabaseDump.php
|
&& sed -i 's/throw new Exception/#throw new Exception/g' src/PrestaShopBundle/Install/DatabaseDump.php
|
||||||
endif
|
endif
|
||||||
ifeq ($(BRANCH), 1.7.4.4)
|
|
||||||
cd $(PRESTASHOP_DIR) \
|
|
||||||
&& sed -i 's/$$install->installModules();/$$install->setTranslator(\\Context::getContext()->getTranslator());\n\t$$install->installModules();/g' tests/PrestaShopBundle/Utils/DatabaseCreator.php
|
|
||||||
cat $(PRESTASHOP_DIR)/tests/PrestaShopBundle/Utils/DatabaseCreator.php | grep -A 3 -B 3 'install->installModules()'
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(BRANCH),$(filter $(BRANCH),1.7.6.9 1.7.7.8))
|
|
||||||
cd $(PRESTASHOP_DIR) \
|
cd $(PRESTASHOP_DIR) \
|
||||||
&& sed -i "s/SymfonyContainer::getInstance()->get('translator')/\\\\Context::getContext()->getTranslator()/g" classes/lang/DataLang.php
|
&& sed -i "s/SymfonyContainer::getInstance()->get('translator')/\\\\Context::getContext()->getTranslator()/g" classes/lang/DataLang.php
|
||||||
cat $(PRESTASHOP_DIR)/classes/lang/DataLang.php | grep -A 3 -B 3 'this->translator = '
|
cat $(PRESTASHOP_DIR)/classes/lang/DataLang.php | grep -A 3 -B 3 'this->translator = '
|
||||||
@ -75,7 +70,6 @@ ifeq ($(BRANCH),$(filter $(BRANCH),1.7.6.9 1.7.7.8))
|
|||||||
cd $(PRESTASHOP_DIR) \
|
cd $(PRESTASHOP_DIR) \
|
||||||
&& sed -i "s/SymfonyContainer::getInstance()->get('translator')/\\\\Context::getContext()->getTranslator()/g" classes/Language.php
|
&& sed -i "s/SymfonyContainer::getInstance()->get('translator')/\\\\Context::getContext()->getTranslator()/g" classes/Language.php
|
||||||
cat $(PRESTASHOP_DIR)/classes/Language.php | grep -A 3 -B 3 'translator = '
|
cat $(PRESTASHOP_DIR)/classes/Language.php | grep -A 3 -B 3 'translator = '
|
||||||
endif
|
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
php-cs-fixer fix --config=$(ROOT_DIR)/.php-cs-fixer.php -v
|
php-cs-fixer fix --config=$(ROOT_DIR)/.php-cs-fixer.php -v
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[](https://github.com/retailcrm/prestashop-module/actions)
|
[](https://github.com/retailcrm/prestashop-module/actions)
|
||||||
[](https://codecov.io/gh/retailcrm/prestashop-module)
|
[](https://codecov.io/gh/retailcrm/prestashop-module)
|
||||||
[](https://github.com/retailcrm/prestashop-module/releases)
|
[](https://github.com/retailcrm/prestashop-module/releases)
|
||||||
[](https://php.net/)
|
[](https://php.net/)
|
||||||
|
|
||||||
Prestashop module.
|
Prestashop module.
|
||||||
=================
|
=================
|
||||||
|
@ -48,7 +48,7 @@ require_once dirname(__FILE__) . '/bootstrap.php';
|
|||||||
|
|
||||||
class RetailCRM extends Module
|
class RetailCRM extends Module
|
||||||
{
|
{
|
||||||
const VERSION = '3.5.6';
|
const VERSION = '3.5.7';
|
||||||
|
|
||||||
const API_URL = 'RETAILCRM_ADDRESS';
|
const API_URL = 'RETAILCRM_ADDRESS';
|
||||||
const API_KEY = 'RETAILCRM_API_TOKEN';
|
const API_KEY = 'RETAILCRM_API_TOKEN';
|
||||||
@ -161,7 +161,7 @@ class RetailCRM extends Module
|
|||||||
$this->default_country = (int) Configuration::get('PS_COUNTRY_DEFAULT');
|
$this->default_country = (int) Configuration::get('PS_COUNTRY_DEFAULT');
|
||||||
$this->apiUrl = Configuration::get(static::API_URL);
|
$this->apiUrl = Configuration::get(static::API_URL);
|
||||||
$this->apiKey = Configuration::get(static::API_KEY);
|
$this->apiKey = Configuration::get(static::API_KEY);
|
||||||
$this->ps_versions_compliancy = ['min' => '1.6.1.0', 'max' => _PS_VERSION_];
|
$this->ps_versions_compliancy = ['min' => '1.7.7.0', 'max' => _PS_VERSION_];
|
||||||
$this->psVersion = Tools::substr(_PS_VERSION_, 0, 3);
|
$this->psVersion = Tools::substr(_PS_VERSION_, 0, 3);
|
||||||
$this->log = RetailcrmLogger::getLogFile();
|
$this->log = RetailcrmLogger::getLogFile();
|
||||||
$this->module_key = 'dff3095326546f5fe8995d9e86288491';
|
$this->module_key = 'dff3095326546f5fe8995d9e86288491';
|
||||||
@ -172,11 +172,6 @@ class RetailCRM extends Module
|
|||||||
$this->name .
|
$this->name .
|
||||||
'/views';
|
'/views';
|
||||||
|
|
||||||
if ('1.6' == $this->psVersion) {
|
|
||||||
$this->bootstrap = true;
|
|
||||||
$this->use_new_hooks = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->apiUrl && $this->apiKey) {
|
if ($this->apiUrl && $this->apiKey) {
|
||||||
$this->api = new RetailcrmProxy($this->apiUrl, $this->apiKey);
|
$this->api = new RetailcrmProxy($this->apiUrl, $this->apiKey);
|
||||||
$this->reference = new RetailcrmReferences($this->api);
|
$this->reference = new RetailcrmReferences($this->api);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user