mirror of
https://github.com/retailcrm/prestashop-module.git
synced 2025-03-03 11:43:16 +03:00
Fix for marketplace
This commit is contained in:
parent
12b133eaff
commit
83360e4c69
@ -732,7 +732,7 @@ class RetailCRM extends Module
|
|||||||
|
|
||||||
if ($response !== false) {
|
if ($response !== false) {
|
||||||
if (!$settings['clientId']) {
|
if (!$settings['clientId']) {
|
||||||
$clientId = hash('md5', date('Y-m-d H:i:s'));
|
$clientId = uniqid();
|
||||||
$result = $this->integrationModule($api, $clientId, $settings['version']);
|
$result = $this->integrationModule($api, $clientId, $settings['version']);
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
@ -773,14 +773,14 @@ class RetailCRM extends Module
|
|||||||
{
|
{
|
||||||
$scheme = isset($_SERVER['HTTPS']) ? 'https://' : 'http://';
|
$scheme = isset($_SERVER['HTTPS']) ? 'https://' : 'http://';
|
||||||
$logo = 'https://s3.eu-central-1.amazonaws.com/retailcrm-billing/images/5b845ce986911-prestashop2.svg';
|
$logo = 'https://s3.eu-central-1.amazonaws.com/retailcrm-billing/images/5b845ce986911-prestashop2.svg';
|
||||||
$code = 'prestashop';
|
$integrationCode = 'prestashop';
|
||||||
$name = 'PrestaShop';
|
$name = 'PrestaShop';
|
||||||
$accountUrl = $scheme . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
$accountUrl = $scheme . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||||
|
|
||||||
if ($apiVersion == 'v4') {
|
if ($apiVersion == 'v4') {
|
||||||
$configuration = array(
|
$configuration = array(
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'code' => $code,
|
'code' => $integrationCode . '-' . $clientId,
|
||||||
'logo' => $logo,
|
'logo' => $logo,
|
||||||
'configurationUrl' => $accountUrl,
|
'configurationUrl' => $accountUrl,
|
||||||
'active' => $active
|
'active' => $active
|
||||||
@ -790,8 +790,8 @@ class RetailCRM extends Module
|
|||||||
} else {
|
} else {
|
||||||
$configuration = array(
|
$configuration = array(
|
||||||
'clientId' => $clientId,
|
'clientId' => $clientId,
|
||||||
'code' => $code,
|
'code' => $integrationCode . '-' . $clientId,
|
||||||
'integrationCode' => $code,
|
'integrationCode' => $integrationCode,
|
||||||
'active' => $active,
|
'active' => $active,
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'logo' => $logo,
|
'logo' => $logo,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user