Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Impossible configure Alma if PS Account version is lower 5.0 #589

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: woding notification with update module
  • Loading branch information
Benjamin-Freoua-Alma committed Oct 29, 2024
commit 6c6cfceb3861d24b620d060d9ed46244c4ea080e
6 changes: 3 additions & 3 deletions alma/alma.php
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@
class Alma extends PaymentModule
{
const VERSION = '4.4.0';
const PS_ACCOUNT_VERSION_REQUIRED = '5.3.0';
const PS_ACCOUNTS_VERSION_REQUIRED = '5.3.0';

public $_path;
public $local_path;
@@ -166,8 +166,8 @@ public function checkPsAccountsCompatibility()
throw new \PrestaShop\PsAccountsInstaller\Installer\Exception\ModuleNotInstalledException('[Alma] PS Account is not installed');
}

if ($psAccountsModule->version < self::PS_ACCOUNT_VERSION_REQUIRED) {
throw new \PrestaShop\PsAccountsInstaller\Installer\Exception\ModuleNotInstalledException('[Alma] PS Account is not up to date, minimal version required ' . self::PS_ACCOUNT_VERSION_REQUIRED);
if ($psAccountsModule->version < self::PS_ACCOUNTS_VERSION_REQUIRED) {
throw new \PrestaShop\PsAccountsInstaller\Installer\Exception\ModuleNotInstalledException('[Alma] PS Account is not up to date, minimal version required ' . self::PS_ACCOUNTS_VERSION_REQUIRED);
}
}

2 changes: 1 addition & 1 deletion alma/translations/en.php
Original file line number Diff line number Diff line change
@@ -260,7 +260,7 @@
$_MODULE['<{alma}prestashop>notificationconfiguration_cf5ec9fb9f7214a3db82a5a39fec5b48'] = 'Enter your API key';
$_MODULE['<{alma}prestashop>notificationconfiguration_055f421849c2a1c32b885c95540f827c'] = 'Find your API live key on your %1$s Alma dashboard%2$s';
$_MODULE['<{alma}prestashop>notificationconfiguration_53b458e8453e3694811e61c96527d638'] = 'To use Test mode, retrieve your Test API key from your %1$ssandbox dashboard%2$s';
$_MODULE['<{alma}prestashop>notificationconfiguration_42deb316427c319fae8ef1e9a2ebfacb'] = 'We offer to download the PrestaShop Account module';
$_MODULE['<{alma}prestashop>notificationconfiguration_b040aba3ff898146cd8c1fb8cfd04daf'] = 'We offer to download or update the PrestaShop Account module (minimum required version %1$s)';
$_MODULE['<{alma}prestashop>notificationconfiguration_9700e091d54b8ff1fafcd27518c75b23'] = 'Link your store to your PrestaShop account to take full advantage of the modules offered by the PrestaShop Marketplace and optimize your experience.';
$_MODULE['<{alma}prestashop>notificationconfiguration_6997dde298b14fbf6a7c95bd39fe8dc4'] = 'You can find the module %1$shere%2$s';
$_MODULE['<{alma}prestashop>notificationshareofcheckout_a6b0ef107f0d278df612764187bbdece'] = ' Increase your performance & get insights !';
2 changes: 1 addition & 1 deletion alma/translations/fr.php
Original file line number Diff line number Diff line change
@@ -261,7 +261,7 @@
$_MODULE['<{alma}prestashop>notificationconfiguration_cf5ec9fb9f7214a3db82a5a39fec5b48'] = 'Entrez votre clé API';
$_MODULE['<{alma}prestashop>notificationconfiguration_055f421849c2a1c32b885c95540f827c'] = 'Trouvez votre clé API sur votre tableau de bord %1$s Alma%2$s';
$_MODULE['<{alma}prestashop>notificationconfiguration_53b458e8453e3694811e61c96527d638'] = 'Pour utiliser le mode test, récupérez votre clé API de test dans le tableau de bord de votre sandbox %1$s%2$s';
$_MODULE['<{alma}prestashop>notificationconfiguration_42deb316427c319fae8ef1e9a2ebfacb'] = 'Nous vous proposons de télécharger le module PrestaShop Account';
$_MODULE['<{alma}prestashop>notificationconfiguration_b040aba3ff898146cd8c1fb8cfd04daf'] = 'Nous vous proposons de télécharger ou de mettre à jour le module PrestaShop Account (version minimale requise %1$s)';
$_MODULE['<{alma}prestashop>notificationconfiguration_9700e091d54b8ff1fafcd27518c75b23'] = 'Liez votre boutique à votre compte PrestaShop pour profiter pleinement des modules proposés par PrestaShop Marketplace et optimiser votre expérience.';
$_MODULE['<{alma}prestashop>notificationconfiguration_6997dde298b14fbf6a7c95bd39fe8dc4'] = 'Vous pouvez trouver le module %1$sici%2$s';
$_MODULE['<{alma}prestashop>notificationshareofcheckout_a6b0ef107f0d278df612764187bbdece'] = ' Augmentez vos performances et obtenez des informations !';
2 changes: 1 addition & 1 deletion alma/views/templates/hook/notificationConfiguration.tpl
Original file line number Diff line number Diff line change
@@ -95,7 +95,7 @@
{if isset($suggestPSAccounts) && $suggestPSAccounts}
<div class="alma alert alert-dismissible alert-info">
<h2>
{l s='We offer to download the PrestaShop Account module' mod='alma'}
{l s='We offer to download or update the PrestaShop Account module (minimum required version %1$s)' sprintf=[Alma::PS_ACCOUNTS_VERSION_REQUIRED] mod='alma'}
</h2>
<p>
{l s='Link your store to your PrestaShop account to take full advantage of the modules offered by the PrestaShop Marketplace and optimize your experience.' mod='alma'}