From 95c3e291f7550a55f2ecdee1f5c539435e70ce1a Mon Sep 17 00:00:00 2001 From: opheugene Date: Mon, 5 Apr 2021 16:44:15 +0300 Subject: [PATCH] Fixed url post in module settings --- .github/workflows/presta.yml | 2 +- CHANGELOG.md | 3 +++ VERSION | 2 +- retailcrm/lib/templates/RetailcrmAbstractTemplate.php | 6 ++++++ retailcrm/retailcrm.php | 2 +- 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/presta.yml b/.github/workflows/presta.yml index c69eca8a..8ec411ad 100644 --- a/.github/workflows/presta.yml +++ b/.github/workflows/presta.yml @@ -153,7 +153,7 @@ jobs: git fetch origin --unshallow --tags export LAST_TAG=`git describe --abbrev=0 --tags` export VERSION=`cat VERSION` - export ARCHIVE_NAME=retailcrm-$VERSION.ocmod.zip + export ARCHIVE_NAME=retailcrm-$VERSION.zip export ARCHIVE_PATH="/tmp/$ARCHIVE_NAME" export RELEASE_TAG=v$VERSION export LAST_COMMIT=`git log --oneline --format=%B -n 1 HEAD | head -n 1` diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c794656..769b4c6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v3.2.6 +* Исправлена ошибка при сохранении настроек модуля на старых версиях PrestaShop + ## v3.2.5 * Исправлена ошибка брошенных корзин для Prestashop версии ниже 1.7.1 * Исправлена ошибка при проверке адреса клиента diff --git a/VERSION b/VERSION index 5ae69bd5..34cde569 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.2.5 +3.2.6 diff --git a/retailcrm/lib/templates/RetailcrmAbstractTemplate.php b/retailcrm/lib/templates/RetailcrmAbstractTemplate.php index ea228fc8..c9e820ba 100644 --- a/retailcrm/lib/templates/RetailcrmAbstractTemplate.php +++ b/retailcrm/lib/templates/RetailcrmAbstractTemplate.php @@ -117,6 +117,12 @@ public function render($file) throw new \RuntimeException("Template not be blank"); } + // set url post for forms + if (empty($this->smarty->getTemplateVars('url_post'))) { + $this->data['url_post'] = $this->smarty->getTemplateVars('current') + .'&token='.$this->smarty->getTemplateVars('token'); + } + $this->smarty->assign(\array_merge($this->data, array( 'moduleErrors' => $this->errors, 'moduleWarnings' => $this->warnings, diff --git a/retailcrm/retailcrm.php b/retailcrm/retailcrm.php index 077d57bd..ad0f6154 100644 --- a/retailcrm/retailcrm.php +++ b/retailcrm/retailcrm.php @@ -117,7 +117,7 @@ public function __construct() { $this->name = 'retailcrm'; $this->tab = 'export'; - $this->version = '3.2.5'; + $this->version = '3.2.6'; $this->author = 'DIGITAL RETAIL TECHNOLOGIES SL'; $this->displayName = $this->l('retailCRM'); $this->description = $this->l('Integration module for retailCRM');