From 9777ae08171a0e3b5fee07b776cdbdc5c2db2046 Mon Sep 17 00:00:00 2001 From: "alexis.hermanns" Date: Tue, 16 Jul 2024 16:12:58 +0200 Subject: [PATCH 01/31] ECP-96: nb days sync could be inf at 1 --- .gitignore | 3 +++ classes/models/LengowConfiguration.php | 15 ++++++++++++++- classes/models/LengowImport.php | 21 +++++++++++++-------- classes/models/LengowImportOrder.php | 6 +++--- webservice/cron.php | 2 +- 5 files changed, 34 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index e7f91a9e..25617dca 100755 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ config_fr.xml **/.DS_Store config/marketplaces.json tools/vars.sh +.php_cs.cache +.php-cs-fixer.cache +.php-cs-fixer.dist.php diff --git a/classes/models/LengowConfiguration.php b/classes/models/LengowConfiguration.php index b870c780..2216cd58 100755 --- a/classes/models/LengowConfiguration.php +++ b/classes/models/LengowConfiguration.php @@ -107,6 +107,7 @@ class LengowConfiguration extends Configuration public const RETURN_TYPE_INTEGER = 'integer'; public const RETURN_TYPE_ARRAY = 'array'; public const RETURN_TYPE_STRING = 'string'; + public const RETURN_TYPE_FLOAT = 'float'; /** * @var array params correspondence keys for toolbox @@ -436,7 +437,7 @@ public static function getKeys($key = null) self::PARAM_LABEL => $locale->t('lengow_setting.lengow_import_days_title'), self::PARAM_DEFAULT_VALUE => 3, self::PARAM_UPDATE => true, - self::PARAM_RETURN => self::RETURN_TYPE_INTEGER, + self::PARAM_RETURN => self::RETURN_TYPE_FLOAT, ], self::ANONYMIZE_EMAIL => [ self::PARAM_TYPE => LengowConfigurationForm::TYPE_CHECKBOX, @@ -1000,6 +1001,16 @@ public static function isProductionMode() return self::getPluginEnvironment() === 'prod'; } + /** + * Will return the global the typed global value + * @return mixed + */ + public static function getTypedGlobalValue($key) + { + $value = self::get($key); + return self::getValueWithCorrectType($key, $value); + } + /** * Get configuration value in correct type * @@ -1023,6 +1034,8 @@ private static function getValueWithCorrectType($key, $value = null) : []; case self::RETURN_TYPE_STRING: return (string) $value; + case self::RETURN_TYPE_FLOAT: + return (float) $value; } } diff --git a/classes/models/LengowImport.php b/classes/models/LengowImport.php index c86b73ac..d33610f8 100755 --- a/classes/models/LengowImport.php +++ b/classes/models/LengowImport.php @@ -280,7 +280,7 @@ class LengowImport * integer delivery_address_id Lengow delivery address id to synchronize * integer id_order_lengow Lengow order id in PrestaShop * integer shop_id Shop id for current synchronization - * integer days Synchronization interval time + * float days Synchronization interval time * integer limit Maximum number of new orders created * boolean log_output Display log messages * boolean debug_mode Activate debug mode @@ -322,7 +322,7 @@ public function __construct($params = []) $this->marketplaceSku = null; // set the time interval $this->setIntervalTime( - isset($params[self::PARAM_DAYS]) ? (int) $params[self::PARAM_DAYS] : null, + isset($params[self::PARAM_DAYS]) ? (float) $params[self::PARAM_DAYS] : null, isset($params[self::PARAM_CREATED_FROM]) ? $params[self::PARAM_CREATED_FROM] : null, isset($params[self::PARAM_CREATED_TO]) ? $params[self::PARAM_CREATED_TO] : null ); @@ -459,7 +459,7 @@ public static function restTimeToImport() /** * Set interval time for order synchronisation * - * @param int|null $days Import period + * @param float|null $days Import period * @param string|null $createdFrom Import of orders since * @param string|null $createdTo Import of orders until */ @@ -468,7 +468,12 @@ private function setIntervalTime($days = null, $createdFrom = null, $createdTo = if ($createdFrom && $createdTo) { // retrieval of orders created from ... until ... $this->createdFrom = strtotime($createdFrom); - $createdToTimestamp = strtotime($createdTo) + 86399; + if ($createdFrom === $createdTo) { + $createdToTimestamp = strtotime($createdTo) + self::MIN_INTERVAL_TIME - 1; + } else { + $createdToTimestamp = strtotime($createdTo); + } + $intervalTime = $createdToTimestamp - $this->createdFrom; $this->createdTo = $intervalTime > self::MAX_INTERVAL_TIME ? $this->createdFrom + self::MAX_INTERVAL_TIME @@ -477,20 +482,20 @@ private function setIntervalTime($days = null, $createdFrom = null, $createdTo = return; } if ($days) { - $intervalTime = $days * 86400; + $intervalTime = $days * self::MIN_INTERVAL_TIME; $intervalTime = $intervalTime > self::MAX_INTERVAL_TIME ? self::MAX_INTERVAL_TIME : $intervalTime; } else { // order recovery updated since ... days - $importDays = (int) LengowConfiguration::getGlobalValue( + $importDays = LengowConfiguration::getTypedGlobalValue( LengowConfiguration::SYNCHRONIZATION_DAY_INTERVAL ); - $intervalTime = $importDays * 86400; + $intervalTime = $importDays * self::MIN_INTERVAL_TIME; // add security for older versions of the plugin $intervalTime = $intervalTime < self::MIN_INTERVAL_TIME ? self::MIN_INTERVAL_TIME : $intervalTime; $intervalTime = $intervalTime > self::MAX_INTERVAL_TIME ? self::MAX_INTERVAL_TIME : $intervalTime; // get dynamic interval time for cron synchronisation $lastImport = LengowMain::getLastImport(); - $lastSettingUpdate = (int) LengowConfiguration::getGlobalValue( + $lastSettingUpdate = LengowConfiguration::getTypedGlobalValue( LengowConfiguration::LAST_UPDATE_SETTING ); if ($this->typeImport === self::TYPE_CRON diff --git a/classes/models/LengowImportOrder.php b/classes/models/LengowImportOrder.php index d2d8dadf..78f73a64 100755 --- a/classes/models/LengowImportOrder.php +++ b/classes/models/LengowImportOrder.php @@ -1219,11 +1219,11 @@ private function getCartData() // generation of fictitious email $billingData['email'] = $this->getCustomerEmail(); - if ((bool) LengowConfiguration::getGlobalValue(LengowConfiguration::ANONYMIZE_EMAIL)) { + if ((LengowConfiguration::getTypedGlobalValue(LengowConfiguration::ANONYMIZE_EMAIL)) { $domain = !LengowMain::getHost() ? 'prestashop.shop' : LengowMain::getHost(); - if ((int) LengowConfiguration::getGlobalValue(LengowConfiguration::TYPE_ANONYMIZE_EMAIL) === 0) { + if (LengowConfiguration::getTypedGlobalValue(LengowConfiguration::TYPE_ANONYMIZE_EMAIL) === 0) { $billingData['email'] = md5($this->marketplaceSku . '-' . $this->marketplace->name) . '@' . strtolower($domain); - } elseif ((int) LengowConfiguration::getGlobalValue(LengowConfiguration::TYPE_ANONYMIZE_EMAIL) === 1) { + } elseif (LengowConfiguration::getTypedGlobalValue(LengowConfiguration::TYPE_ANONYMIZE_EMAIL) === 1) { $billingData['email'] = $this->marketplaceSku . '-' . $this->marketplace->name . '@' . $domain; } } diff --git a/webservice/cron.php b/webservice/cron.php index dcb04724..38a1677d 100755 --- a/webservice/cron.php +++ b/webservice/cron.php @@ -107,7 +107,7 @@ $params[LengowImport::PARAM_DEBUG_MODE] = (bool) Tools::getValue(LengowImport::PARAM_DEBUG_MODE); } if (Tools::getIsset(LengowImport::PARAM_DAYS) && is_numeric(Tools::getValue(LengowImport::PARAM_DAYS))) { - $params[LengowImport::PARAM_DAYS] = (int) Tools::getValue(LengowImport::PARAM_DAYS); + $params[LengowImport::PARAM_DAYS] = (float) Tools::getValue(LengowImport::PARAM_DAYS); } if (Tools::getIsset(LengowImport::PARAM_CREATED_FROM)) { $params[LengowImport::PARAM_CREATED_FROM] = Tools::getValue(LengowImport::PARAM_CREATED_FROM); From ead64539f14c5340d90168deae92909fb2cc024f Mon Sep 17 00:00:00 2001 From: "alexis.hermanns" Date: Tue, 16 Jul 2024 16:27:49 +0200 Subject: [PATCH 02/31] ECP-96: floor for nb_days --- classes/models/LengowImport.php | 2 +- tools/vars.enc | Bin 295 -> 297 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/models/LengowImport.php b/classes/models/LengowImport.php index d33610f8..22ba325d 100755 --- a/classes/models/LengowImport.php +++ b/classes/models/LengowImport.php @@ -489,7 +489,7 @@ private function setIntervalTime($days = null, $createdFrom = null, $createdTo = $importDays = LengowConfiguration::getTypedGlobalValue( LengowConfiguration::SYNCHRONIZATION_DAY_INTERVAL ); - $intervalTime = $importDays * self::MIN_INTERVAL_TIME; + $intervalTime = floor($importDays * self::MIN_INTERVAL_TIME); // add security for older versions of the plugin $intervalTime = $intervalTime < self::MIN_INTERVAL_TIME ? self::MIN_INTERVAL_TIME : $intervalTime; $intervalTime = $intervalTime > self::MAX_INTERVAL_TIME ? self::MAX_INTERVAL_TIME : $intervalTime; diff --git a/tools/vars.enc b/tools/vars.enc index 24518bc463bb5505bd3ed8e4724acd0413071e2a..b08f0c6ecf25210f27927893c5e2dfa7c3a95b13 100644 GIT binary patch literal 297 zcmV+^0oMME4Fm}T0unpY2Jy~`+W*qPR{=BKfBas`a_|~MNsimFL49n?(l6i+1yopJ z8EC-sUYM+)vaOJjDe@{Q%ycV+JKPB;FG@us!EI7cnT`RXAW*4-K}-EMYs_SQ9d86> z`!tq2#7MV@E74{pF{=axY62gQyHMK7I{MQC<@jhNtCfjloulhW5}YG8p_rzRmC)31teq)%`S>$ThFU zQcUlTt6rr4&jsqhCjI2M!ft|#CwS`)D?d)B^J0f@V@27~x}{-4A^BxTbx4k3`*J24 vfDXdvzFH7WawAnm5_rSh+9W$?aA%3w(u!oUjjU(jy+5hg#`U#Rp)7wD*wT%< literal 295 zcmV+?0oeYG4Fm}T0z-BixIEvOg#XgORRMn=Sb*pDr&=)wRWVSTwJHwU)D! zIyRLrv5i_d7Tg5hDw;jnMLJ(VL6zYvioRX>+g}V3RMq`Wm=l*D^-lzO-T4B-8K+yy z$-L4d;4=jRMqr1_2Jso-uy;lW_X49j7s+~V>yHH;oqPCn3&RQ84D<{Qs4-HBm$fR= zX@T4#xQ$_AWdRLk08#S{1{EiAj#kqlkr$yoUP|{zuFVV2iND%sJYP{`kQ}?_Xry6J z0vWR#1*$S3C?|C*ZGQhieCL;;CfrYi;%|8)e=$OUECg#}2N4;Qt`SELpbcLygD#1$ tBB9?{57P&XrRY# Date: Tue, 16 Jul 2024 17:06:36 +0200 Subject: [PATCH 03/31] ECP-96 floor --- classes/models/LengowImport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/models/LengowImport.php b/classes/models/LengowImport.php index 22ba325d..8b2ae66d 100755 --- a/classes/models/LengowImport.php +++ b/classes/models/LengowImport.php @@ -482,7 +482,7 @@ private function setIntervalTime($days = null, $createdFrom = null, $createdTo = return; } if ($days) { - $intervalTime = $days * self::MIN_INTERVAL_TIME; + $intervalTime = floor($days * self::MIN_INTERVAL_TIME); $intervalTime = $intervalTime > self::MAX_INTERVAL_TIME ? self::MAX_INTERVAL_TIME : $intervalTime; } else { // order recovery updated since ... days From acb2446210e2ee478a85e7f03986f401a630596f Mon Sep 17 00:00:00 2001 From: "alexis.hermanns" Date: Wed, 17 Jul 2024 14:38:45 +0200 Subject: [PATCH 04/31] PST-21540: Prestashop hook callable in main class --- lengow.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lengow.php b/lengow.php index 4c79ee66..2d71a1cc 100755 --- a/lengow.php +++ b/lengow.php @@ -178,6 +178,15 @@ public function hookUpdateOrderStatus($args) $this->hookClass->hookUpdateOrderStatus($args); } + /** + * Order status update + * Event This hook launches modules when the status of an order changes + */ + public function hookActionOrderStatusUpdate($args) + { + $this->hookClass->hookUpdateOrderStatus($args); + } + /** * Hook after an status update to synchronize status with lengow * From 8de9be1120fc05635f6c9987b0f388662bf97a1a Mon Sep 17 00:00:00 2001 From: "alexis.hermanns" Date: Wed, 17 Jul 2024 14:40:15 +0200 Subject: [PATCH 05/31] PST-21540: function params comment --- lengow.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lengow.php b/lengow.php index 2d71a1cc..614351a5 100755 --- a/lengow.php +++ b/lengow.php @@ -181,6 +181,8 @@ public function hookUpdateOrderStatus($args) /** * Order status update * Event This hook launches modules when the status of an order changes + * + * @param array $args Arguments of hook */ public function hookActionOrderStatusUpdate($args) { From 8d6d7f9df988b7ee616e18e25f12db25786becd2 Mon Sep 17 00:00:00 2001 From: "alexis.hermanns" Date: Wed, 17 Jul 2024 15:14:26 +0200 Subject: [PATCH 06/31] PST-21540: lengow module hook from backend --- classes/models/LengowHook.php | 28 +++++++++++++++++++- lengow.php | 50 ++++++++++++++++++++++++++++++++--- 2 files changed, 74 insertions(+), 4 deletions(-) diff --git a/classes/models/LengowHook.php b/classes/models/LengowHook.php index d4562ba5..bc5a6a85 100755 --- a/classes/models/LengowHook.php +++ b/classes/models/LengowHook.php @@ -117,7 +117,7 @@ public function registerHooks() 'displayBackOfficeHeader' => '1.6', ]; foreach ($lengowHooks as $hook => $version) { - if ($version <= Tools::substr(_PS_VERSION_, 0, 3)) { + if ((float) $version <= (float) Tools::substr(_PS_VERSION_, 0, 3)) { if ($this->module->isRegisteredInHook($hook)) { continue; } @@ -178,9 +178,14 @@ public function hookFooter() * Hook on order confirmation page to init order's product list * * @param array $args arguments of hook + * + * @return mixed null|void */ public function hookOrderConfirmation($args) { + if (!isset($args['objOrder']) && !isset($args['order'])) { + return; + } $i = 0; $productsCart = []; $order = isset($args['objOrder']) ? $args['objOrder'] : $args['order']; @@ -234,6 +239,9 @@ public function hookOrderConfirmation($args) */ public function hookAdminOrder($args) { + if (!isset($args['id_order'])) { + return; + } if (LengowOrder::isFromLengow($args['id_order'])) { $lengowLink = new LengowLink(); $locale = new LengowTranslation(); @@ -301,9 +309,14 @@ public function hookAdminOrder($args) * Hook before an status' update to synchronize status with lengow * * @param array $args arguments of hook + * + * @return mixed null|void */ public function hookUpdateOrderStatus($args) { + if (!isset($args['id_order'])) { + return; + } $lengowOrder = new LengowOrder($args['id_order']); // not send state if we are on lengow import module if (LengowImport::$currentOrder !== $lengowOrder->lengowMarketplaceSku @@ -317,9 +330,14 @@ public function hookUpdateOrderStatus($args) * Hook after an status' update to synchronize status with lengow * * @param array $args arguments of hook + * + * @return mixed null|void */ public function hookPostUpdateOrderStatus($args) { + if (!isset($args['id_order'])) { + return; + } $lengowOrder = new LengowOrder($args['id_order']); // do nothing if order is not from Lengow or is being imported if (LengowImport::$currentOrder !== $lengowOrder->lengowMarketplaceSku @@ -344,9 +362,17 @@ public function hookPostUpdateOrderStatus($args) * Update, if isset tracking number * * @param array $args arguments of hook + * + * @return mixed null|void */ public function hookActionObjectUpdateAfter($args) { + if (!isset($args['object']->id)) { + return; + } + if (! $args['object'] instanceof Order) { + return; + } if (($args['object'] instanceof Order) && LengowOrder::isFromLengow($args['object']->id)) { $lengowOrder = new LengowOrder($args['object']->id); diff --git a/lengow.php b/lengow.php index 614351a5..6ea2f865 100755 --- a/lengow.php +++ b/lengow.php @@ -140,6 +140,14 @@ public function hookHome() $this->hookClass->hookHome(); } + /** + * Hook on Home page + */ + public function hookDisplayHome() + { + $this->hookClass->hookHome(); + } + /** * Hook on Payment page */ @@ -148,6 +156,14 @@ public function hookPaymentTop() $this->hookClass->hookPaymentTop(); } + /** + * Hook on Payment page + */ + public function hookDisplayPaymentTop() + { + $this->hookClass->hookPaymentTop(); + } + /** * Hook for generate tracker on front footer page * @@ -158,6 +174,16 @@ public function hookFooter() return $this->hookClass->hookFooter(); } + /** + * Hook for generate tracker on front footer page + * + * @return mixed + */ + public function hookDisplayFooter() + { + return $this->hookClass->hookFooter(); + } + /** * Hook on order confirmation page to init order's product list * @@ -168,6 +194,16 @@ public function hookOrderConfirmation($args) $this->hookClass->hookOrderConfirmation($args); } + /** + * Hook on order confirmation page to init order's product list + * + * @param array $args Arguments of hook + */ + public function hookDisplayOrderConfirmation($args) + { + $this->hookClass->hookOrderConfirmation($args); + } + /** * Hook before an status update to synchronize status with lengow * @@ -181,14 +217,22 @@ public function hookUpdateOrderStatus($args) /** * Order status update * Event This hook launches modules when the status of an order changes - * - * @param array $args Arguments of hook */ public function hookActionOrderStatusUpdate($args) { $this->hookClass->hookUpdateOrderStatus($args); } + /** + * Order status post update + * @param array $args Arguments of hook + */ + public function hookActionOrderStatusPostUpdate($args) + { + $this->hookClass->hookPostUpdateOrderStatus($args); + } + + /** * Hook after an status update to synchronize status with lengow * @@ -220,4 +264,4 @@ public function hookAdminOrder($args) { return $this->hookClass->hookAdminOrder($args); } -} +} \ No newline at end of file From 973708cf6aa1777260d1d897fef269775a7d5461 Mon Sep 17 00:00:00 2001 From: "alexis.hermanns" Date: Fri, 19 Jul 2024 10:49:46 +0200 Subject: [PATCH 07/31] PST-21540: config for disable email and order status change --- classes/controllers/LengowOrderSettingController.php | 2 ++ classes/models/LengowConfiguration.php | 10 ++++++++++ classes/models/LengowHook.php | 4 ++++ translations/en.csv | 2 ++ translations/es.csv | 2 ++ translations/fr.csv | 2 ++ translations/it.csv | 2 ++ translations/yml/en.yml | 2 ++ translations/yml/es.yml | 2 ++ translations/yml/fr.yml | 2 ++ translations/yml/it.yml | 2 ++ 11 files changed, 32 insertions(+) diff --git a/classes/controllers/LengowOrderSettingController.php b/classes/controllers/LengowOrderSettingController.php index fa7d1316..c0f21f23 100755 --- a/classes/controllers/LengowOrderSettingController.php +++ b/classes/controllers/LengowOrderSettingController.php @@ -42,6 +42,7 @@ public function display() LengowConfiguration::SHIPPED_ORDER_ID, LengowConfiguration::CANCELED_ORDER_ID, LengowConfiguration::SHIPPED_BY_MARKETPLACE_ORDER_ID, + LengowConfiguration::SEND_EMAIL_DISABLED ] ); $importParams = $form->buildInputs( @@ -184,3 +185,4 @@ public function postProcess() } } } + diff --git a/classes/models/LengowConfiguration.php b/classes/models/LengowConfiguration.php index b870c780..45bc2855 100755 --- a/classes/models/LengowConfiguration.php +++ b/classes/models/LengowConfiguration.php @@ -85,6 +85,7 @@ class LengowConfiguration extends Configuration public const LAST_UPDATE_PLUGIN_DATA = 'LENGOW_PLUGIN_DATA_UPDATE'; public const LAST_UPDATE_AUTHORIZATION_TOKEN = 'LENGOW_LAST_AUTH_TOKEN_UPDATE'; public const LAST_UPDATE_PLUGIN_MODAL = 'LENGOW_LAST_PLUGIN_MODAL'; + public const SEND_EMAIL_DISABLED = 'LENGOW_SEND_EMAIL_DISABLED'; /* Configuration parameters */ public const PARAM_COLLECTION = 'collection'; @@ -168,6 +169,7 @@ class LengowConfiguration extends Configuration self::LAST_UPDATE_PLUGIN_DATA => 'last_update_plugin_data', self::LAST_UPDATE_AUTHORIZATION_TOKEN => 'last_update_authorization_token', self::LAST_UPDATE_PLUGIN_MODAL => 'last_update_plugin_modal', + self::SEND_EMAIL_DISABLED => 'send_email_disabled', ]; /** @@ -575,6 +577,13 @@ public static function getKeys($key = null) self::PARAM_GLOBAL => true, self::PARAM_RETURN => self::RETURN_TYPE_INTEGER, ], + self::SEND_EMAIL_DISABLED => [ + self::PARAM_TYPE => LengowConfigurationForm::TYPE_CHECKBOX, + self::PARAM_GLOBAL => true, + self::PARAM_RETURN => self::RETURN_TYPE_BOOLEAN, + self::PARAM_LABEL => $locale->t('lengow_setting.lengow_disable_send_email_title'), + self::PARAM_LEGEND => $locale->t('lengow_setting.lengow_disable_send_email_legend'), + ], ]; } @@ -1029,3 +1038,4 @@ private static function getValueWithCorrectType($key, $value = null) return $value; } } + diff --git a/classes/models/LengowHook.php b/classes/models/LengowHook.php index bc5a6a85..5cc21d80 100755 --- a/classes/models/LengowHook.php +++ b/classes/models/LengowHook.php @@ -317,6 +317,9 @@ public function hookUpdateOrderStatus($args) if (!isset($args['id_order'])) { return; } + if (!(bool) LengowConfiguration::get(LengowConfiguration::SEND_EMAIL_DISABLED)) { + return; + } $lengowOrder = new LengowOrder($args['id_order']); // not send state if we are on lengow import module if (LengowImport::$currentOrder !== $lengowOrder->lengowMarketplaceSku @@ -392,3 +395,4 @@ public function hookActionObjectUpdateAfter($args) } } } + diff --git a/translations/en.csv b/translations/en.csv index d250b068..ed8c9ff5 100755 --- a/translations/en.csv +++ b/translations/en.csv @@ -381,6 +381,8 @@ lengow_setting.lengow_tracking_id_legend|The name of the unique identifier enter lengow_setting.lengow_currency_conversion_title|Convert the currency of your order lengow_setting.lengow_currency_conversion_legend|All orders imported into PrestaShop will be automatically converted into the currency you've selected in Lengow lengow_setting.lengow_currency_conversion_switch|Activate conversion +lengow_setting.lengow_disable_send_email_title|Disable sending emails +lengow_setting.lengow_disable_send_email_legend|Activate this option if you do not want to send emails to customers when order's statuses change lengow_log.error.nb_order_imported|%{nb_order} order(s) imported lengow_log.error.nb_order_updated|%{nb_order} order(s) updated lengow_log.error.nb_order_with_error|%{nb_order} order(s) with errors diff --git a/translations/es.csv b/translations/es.csv index b18c5340..521b5098 100755 --- a/translations/es.csv +++ b/translations/es.csv @@ -381,6 +381,8 @@ lengow_setting.lengow_tracking_id_legend|El nombre del identificador único indi lengow_setting.lengow_currency_conversion_title|Convierte la divisa de tu pedido lengow_setting.lengow_currency_conversion_legend|Todos los pedidos importados a Magento serán transformados automáticamente con la moneda que seleccionaste en Lengow lengow_setting.lengow_currency_conversion_switch|Activa la conversion +lengow_setting.lengow_disable_send_email_title|Deshabilitar el envío de email +lengow_setting.lengow_disable_send_email_legend|Deshabilitar el envío de email al cambiar el estado del pedido lengow_log.error.nb_order_imported|%{nb_order} pedido(s) importada lengow_log.error.nb_order_updated|%{nb_order} pedido(s) actualizado lengow_log.error.nb_order_with_error|%{nb_order} pedido(s) con errores diff --git a/translations/fr.csv b/translations/fr.csv index 4f58015c..6c981cca 100755 --- a/translations/fr.csv +++ b/translations/fr.csv @@ -381,6 +381,8 @@ lengow_setting.lengow_tracking_id_legend|Le nom de l'identifiant unique indiqué lengow_setting.lengow_currency_conversion_title|Convertir la devise de vos commandes lengow_setting.lengow_currency_conversion_legend|Toutes les commandes importées dans PrestaShop seront automatiquement converties dans la devise choisie dans Lengow lengow_setting.lengow_currency_conversion_switch|Activer la conversion de devises +lengow_setting.lengow_disable_send_email_title|Désactiver l'envoi d'email +lengow_setting.lengow_disable_send_email_legend|Désactive l'envoi d'email lors des changements de statut de commande lengow_log.error.nb_order_imported|%{nb_order} commande(s) importée(s) lengow_log.error.nb_order_updated|%{nb_order} commande(s) mise(s) à jour lengow_log.error.nb_order_with_error|%{nb_order} commande(s) avec erreurs diff --git a/translations/it.csv b/translations/it.csv index 195e1720..af62f041 100755 --- a/translations/it.csv +++ b/translations/it.csv @@ -381,6 +381,8 @@ lengow_setting.lengow_tracking_id_legend|Il numero degli id unici indicati in Le lengow_setting.lengow_currency_conversion_title|Converti la divisa del tuo ordine lengow_setting.lengow_currency_conversion_legend|Tutti gli ordini importati in PrestaShop saranno automaticamente importati nella Divisa che hai selezionato in Lengow lengow_setting.lengow_currency_conversion_switch|Attivare la conversione +lengow_setting.lengow_disable_send_email_title|Disabilita l'invio di email +lengow_setting.lengow_disable_send_email_legend|Disabilita l'invio di email al cambiamento dello stato dell'ordine lengow_log.error.nb_order_imported|%{nb_order} ordine importato lengow_log.error.nb_order_updated|%{nb_order} ordine aggiornato lengow_log.error.nb_order_with_error|%{nb_order} errore numero ordine diff --git a/translations/yml/en.yml b/translations/yml/en.yml index 75a289e9..c80eaa85 100755 --- a/translations/yml/en.yml +++ b/translations/yml/en.yml @@ -412,6 +412,8 @@ en: lengow_currency_conversion_title: "Convert the currency of your order" lengow_currency_conversion_legend: "All orders imported into PrestaShop will be automatically converted into the currency you've selected in Lengow" lengow_currency_conversion_switch: "Activate conversion" + lengow_disable_send_email_title: "Disable sending emails" + lengow_disable_send_email_legend: "Activate this option if you do not want to send emails to customers when order's statuses change" lengow_log: error: nb_order_imported: "%{nb_order} order(s) imported" diff --git a/translations/yml/es.yml b/translations/yml/es.yml index 3d43786e..7a919137 100755 --- a/translations/yml/es.yml +++ b/translations/yml/es.yml @@ -412,6 +412,8 @@ es: lengow_currency_conversion_title: "Convierte la divisa de tu pedido" lengow_currency_conversion_legend: "Todos los pedidos importados a Magento serán transformados automáticamente con la moneda que seleccionaste en Lengow" lengow_currency_conversion_switch: "Activa la conversion" + lengow_disable_send_email_title: "Deshabilitar el envío de email" + lengow_disable_send_email_legend: "Deshabilitar el envío de email al cambiar el estado del pedido" lengow_log: error: nb_order_imported: "%{nb_order} pedido(s) importada" diff --git a/translations/yml/fr.yml b/translations/yml/fr.yml index aa00682a..cc60f1f7 100755 --- a/translations/yml/fr.yml +++ b/translations/yml/fr.yml @@ -412,6 +412,8 @@ fr: lengow_currency_conversion_title: "Convertir la devise de vos commandes" lengow_currency_conversion_legend: "Toutes les commandes importées dans PrestaShop seront automatiquement converties dans la devise choisie dans Lengow" lengow_currency_conversion_switch: "Activer la conversion de devises" + lengow_disable_send_email_title: "Désactiver l'envoi d'email" + lengow_disable_send_email_legend: "Désactive l'envoi d'email lors des changements de statut de commande" lengow_log: error: nb_order_imported: "%{nb_order} commande(s) importée(s)" diff --git a/translations/yml/it.yml b/translations/yml/it.yml index 4f3f7068..f1d8a479 100755 --- a/translations/yml/it.yml +++ b/translations/yml/it.yml @@ -412,6 +412,8 @@ it: lengow_currency_conversion_title: "Converti la divisa del tuo ordine" lengow_currency_conversion_legend: "Tutti gli ordini importati in PrestaShop saranno automaticamente importati nella Divisa che hai selezionato in Lengow" lengow_currency_conversion_switch: "Attivare la conversione" + lengow_disable_send_email_title: "Disabilita l'invio di email" + lengow_disable_send_email_legend: "Disabilita l'invio di email al cambiamento dello stato dell'ordine" lengow_log: error: nb_order_imported: "%{nb_order} ordine importato" From 787e045c61804ac0bd650b0d7358f2d199a55ccb Mon Sep 17 00:00:00 2001 From: Michael Mas Date: Wed, 7 Aug 2024 12:24:03 +0200 Subject: [PATCH 08/31] release-3.5.4: fix filter catalog export dor multi shop --- views/css/lengow-pages.css | 11 +- views/js/lengow/feed.js | 203 +++--------------- .../admin/lengow_feed/helpers/view/view.tpl | 26 +-- 3 files changed, 44 insertions(+), 196 deletions(-) diff --git a/views/css/lengow-pages.css b/views/css/lengow-pages.css index 5a2a5884..d0d1d6b4 100755 --- a/views/css/lengow-pages.css +++ b/views/css/lengow-pages.css @@ -381,9 +381,6 @@ } .sticky-icon { - position: fixed; - top: 170px; - transform: translateY(-50%); z-index: 999; padding: 10px; cursor: pointer; @@ -394,13 +391,12 @@ } .sticky-switch { + position: absolute; display: flex; justify-content: center; flex-direction: column; visibility: hidden; - position: fixed; - top: 275px; - transform: translateY(-50%); + top: 10px; padding: 10px; width: 25%; max-height: 100vh; @@ -419,7 +415,8 @@ .filter-column { float: left; - width: 50px; + margin-top: 10px; + width: 80px; display: flex; justify-content: center; } diff --git a/views/js/lengow/feed.js b/views/js/lengow/feed.js index 13c9ee1d..bf3634f9 100755 --- a/views/js/lengow/feed.js +++ b/views/js/lengow/feed.js @@ -17,50 +17,39 @@ * @copyright 2017 Lengow SAS * @license http://www.apache.org/licenses/LICENSE-2.0 */ - document.addEventListener('DOMContentLoaded', function() { - const stickyIcon = document.getElementById('sticky-icon'); - const stickySwitches = document.querySelectorAll('.sticky-switch'); - const lengowBoxes = document.querySelectorAll('.lgw-box'); - if (lengowBoxes && lengowBoxes.length > 1) { - stickyIcon.style.display = 'none'; - } - - stickyIcon.addEventListener('click', function() { - stickySwitches.forEach(function(switchElem) { - const isSwitchVisible = switchElem.classList.contains('show-switch'); - if (isSwitchVisible) { - switchElem.classList.remove('show-switch'); - } else { - switchElem.classList.add('show-switch'); - } + document.querySelectorAll('.sticky-icon').forEach(icon => { + icon.addEventListener('click', function() { + const shopId = this.dataset.shopId; // Assurez-vous que cet attribut est bien présent dans le HTML + const stickySwitches = document.querySelectorAll(`.sticky-switch${shopId}`); + + stickySwitches.forEach(function(switchElem) { + const isSwitchVisible = switchElem.classList.contains('show-switch'); + if (isSwitchVisible) { + switchElem.classList.remove('show-switch'); + } else { + switchElem.classList.add('show-switch'); + } + }); }); }); document.addEventListener('click', function(event) { const clickedElement = event.target; const isStickySwitch = clickedElement.closest('.sticky-switch'); - const isStickyIcon = clickedElement.closest('#sticky-icon'); + const isStickyIcon = clickedElement.closest('.sticky-icon'); if (!isStickySwitch && !isStickyIcon) { - stickySwitches.forEach(function(switchElem) { + document.querySelectorAll('.sticky-switch.show-switch').forEach(function(switchElem) { switchElem.classList.remove('show-switch'); }); } }); }); - - (function ($) { $(document).ready(function () { - - /** - * Refresh total product/product exported - * @param data Number of products exported and total products - * @param idShop Shop id - */ function reloadTotal(data, idShop) { lengow_jquery("#block_" + idShop + " .lengow_exported").html(data['total_export_product']); lengow_jquery("#block_" + idShop + " .lengow_total").html(data['total_product']); @@ -71,10 +60,9 @@ document.addEventListener('DOMContentLoaded', function() { var action = $(this).attr('data-action'); var idShop = $(this).attr('data-id_shop'); + var className = $(this).attr('class').replace('lengow_switch_option ', ''); - var className = $(this).attr('class').replace('lengow_switch_option ',''); - switch(className) - { + switch(className) { case 'option-selection': lengow_jquery('.option-out-of-stock').prop('checked', true); lengow_jquery('.option-variation').prop('checked', true); @@ -85,44 +73,38 @@ document.addEventListener('DOMContentLoaded', function() { break; } - var state_selection = lengow_jquery('.option-selection').prop('checked'); - var state_out_of_stock = lengow_jquery('.option-out-of-stock').prop('checked'); - var state_variation = lengow_jquery('.option-variation').prop('checked'); - var state_inactive = lengow_jquery('.option-inactive').prop('checked'); - + var state_selection = lengow_jquery(`.option-selection-${idShop}`).prop('checked'); + var state_out_of_stock = lengow_jquery(`.option-out-of-stock-${idShop}`).prop('checked'); + var state_variation = lengow_jquery(`.option-variation-${idShop}`).prop('checked'); + var state_inactive = lengow_jquery(`.option-inactive-${idShop}`).prop('checked'); var data = { state_selection: state_selection ? 1 : 0, state_variation: state_variation ? 1 : 0, - state_out_of_stock : state_out_of_stock ? 1 :0, - state_inactive : state_inactive ? 1 : 0, + state_out_of_stock: state_out_of_stock ? 1 : 0, + state_inactive: state_inactive ? 1 : 0, action: action, id_shop: idShop }; - $.getJSON(href, data, function(content) { var selector = lengow_jquery('#block_' + idShop + ' .lengow_feed_block_footer_content'); reloadTotal(content, idShop); - if (content['option'] !== 'selection'){ + if (content['option'] !== 'selection') { selector.slideUp(150); lengow_jquery('.switch-selection').removeClass('checked'); } else { - //window.location.reload(); if (content['state'] === true) { - console.log('add class checked'); lengow_jquery('.switch-variation').addClass('checked'); lengow_jquery('.switch-out-of-stock').addClass('checked'); lengow_jquery('.switch-inactive').removeClass('checked'); } } - if (content['state'] != null) { - if (content['state'] === true - && content['option'] === 'selection') { + if (content['state'] === true && content['option'] === 'selection') { selector.slideDown(150); } else { selector.slideUp(150); @@ -131,6 +113,7 @@ document.addEventListener('DOMContentLoaded', function() { }); }); + // Gérer les changements de switch produit $('.lgw-container').on('change', '.lengow_switch_product', function () { var href = $(this).attr('data-href'); var action = $(this).attr('data-action'); @@ -138,8 +121,6 @@ document.addEventListener('DOMContentLoaded', function() { var idProduct = $(this).attr('data-id_product'); var state = $(this).prop('checked'); - - var data = { state: state ? 1 : 0, action: action, @@ -152,7 +133,6 @@ document.addEventListener('DOMContentLoaded', function() { }); }); - $('.lgw-container').on('click', '.lgw-pagination a', function () { if ($(this).parent().hasClass('disabled')) { return false; @@ -170,134 +150,6 @@ document.addEventListener('DOMContentLoaded', function() { $('#lengow_feed_wrapper #form_table_shop_' + idShop + ' input[name="order_value"]').val($(this).attr('data-order')); $('#lengow_feed_wrapper #form_table_shop_' + idShop + ' input[name="order_column"]').val($(this).attr('data-column')); $('#lengow_feed_wrapper #form_table_shop_' + idShop).submit(); - return false; - }); - - $('#lengow_feed_wrapper').on('change', '.lgw-pagination-select-item', function () { - $('#lengow_feed_wrapper .lengow_form_table input[name="nb_per_page"]').val($(this).val()); - $('#lengow_feed_wrapper .lengow_form_table').submit(); - return false; - }); - - // update by input - - var typingTimer; - var idShop; - $('#lengow_feed_wrapper').on('keyup', 'thead input[type="text"]', function () { - idShop = $(this).closest('table').attr('id').split('_')[2]; - clearTimeout(typingTimer); - typingTimer = setTimeout(doneTyping, 750); - }); - $('#lengow_feed_wrapper').on('keydown', 'thead input[type="text"]', function () { - clearTimeout(typingTimer); - }); - function doneTyping (){ - $('#lengow_feed_wrapper #form_table_shop_' + idShop).submit(); - } - - $('#lengow_feed_wrapper').on('submit', '.lengow_form_table', function () { - var href = $(this).attr('data-href'); - var idShop = $(this).attr('id').split('_')[3]; - var form = $(this).serialize(); - var url = href + "&" + form; - var data = { - action: 'load_table', - id_shop: idShop - }; - - $.getJSON(url, data, function(content) { - lengow_jquery("#block_" + content['shop_id'] - + " .lengow_feed_block_footer_content").html(content['footer_content']); - pluginsRender(); - }); - - return false; - }); - $('#lengow_feed_wrapper').on('click', '.lengow_select_all', function () { - var idShop = $(this).attr('id').split('_')[2]; - if ($(this).prop('checked')) { - $('#table_shop_' + idShop + ' tbody .lengow_selection').prop('checked', true); - $('#table_shop_' + idShop + ' tbody tr').addClass('select'); - $('#block_' + idShop + ' .lengow_toolbar a').show(); - $('#block_' + idShop + ' .lengow_toolbar .lengow_select_all_shop').show(); - } else { - $('#table_shop_' + idShop + ' tbody .lengow_selection').prop('checked', false); - $('#table_shop_' + idShop + ' tbody tr').removeClass('select'); - $('#block_' + idShop + ' .lengow_toolbar a').hide(); - $('#block_' + idShop + ' .lengow_toolbar .lengow_select_all_shop').hide(); - } - }); - $('#lengow_feed_wrapper').on('click', '.lengow_selection', function () { - var idShop = $(this).parents('table').attr('id').split('_')[2]; - $('#block_' + idShop + ' .lengow_toolbar a').show(); - - if ($(this).prop('checked')) { - $(this).parents('tr').addClass('select'); - } else { - $('#block_' + idShop + ' .lengow_toolbar .lengow_select_all_shop input').prop('checked', false); - $(this).parents('tr').removeClass('select'); - - } - var findProductSelected = false; - $(this).parents('table').find('.lengow_selection').each(function (index) { - if ($(this).prop('checked')) { - findProductSelected = true; - } - }); - if (!findProductSelected) { - $('#block_' + idShop + ' .lengow_toolbar a').hide(); - } - }); - $('#lengow_feed_wrapper').on('click', '.lengow_add_to_export, .lengow_remove_from_export', function () { - var href = $(this).attr('data-href'); - var idShop = $(this).attr('data-id_shop'); - var message = $(this).attr('data-message'); - var action = $(this).attr('data-action'); - var exportAction = $(this).attr('data-export-action'); - var form = $('#form_table_shop_' + idShop).serialize(); - var url = href + "&" + form; - var check = $('#select_all_shop_' + idShop).prop('checked'); - var data = { - action: action, - id_shop: idShop, - select_all: check, - export_action: exportAction - }; - if (!check || (check && confirm(message))) { - $.getJSON(url, data, function(content) { - if (content['message']) { - alert(content['message']); - } else { - $.each(content['product_id'], function(idx, productId) { - if (exportAction == 'lengow_add_to_export') { - lengow_jquery("#shop_" + idShop + "_" + productId + " .lgw-switch").addClass("checked"); - lengow_jquery(".lengow_switch_product").prop("checked", true); - } else { - lengow_jquery("#shop_" + idShop + "_" + productId + " .lgw-switch").removeClass("checked"); - lengow_jquery(".lengow_switch_product").prop("checked", false); - } - }); - reloadTotal(content, idShop); - } - }); - } - return false; - }); - - $('#lengow_feed_wrapper').on('click', '.lengow_select_all_shop input', function () { - var idShop = $('.lengow_select_all').attr('id').split('_')[2]; - if ($(this).prop('checked')) { - $('#table_shop_' + idShop + ' tbody .lengow_selection').prop('checked', true); - $('.lengow_selection').parents('tr').addClass('select'); - } - }); - - $('.lengow_table').on('click', '.table_row td:not(.no-link)', function(){ - var url = $(this).closest('.table_row').find('.feed_name a').attr('href'); - if (url) { - window.open(url, '_blank'); - }; - return false; }); pluginsRender(); @@ -305,7 +157,6 @@ document.addEventListener('DOMContentLoaded', function() { }); })(lengow_jquery); -function pluginsRender(){ - // Selects +function pluginsRender() { lengow_jquery('.lgw-pagination-select-item').select2({minimumResultsForSearch: Infinity}); } diff --git a/views/templates/admin/lengow_feed/helpers/view/view.tpl b/views/templates/admin/lengow_feed/helpers/view/view.tpl index 2a45fc43..7c3047ff 100755 --- a/views/templates/admin/lengow_feed/helpers/view/view.tpl +++ b/views/templates/admin/lengow_feed/helpers/view/view.tpl @@ -20,19 +20,19 @@
-
-
- - - -
-
{if $debugMode}
{$locale->t('menu.debug_active')|escape:'htmlall':'UTF-8'}
{/if} {foreach from=$shopCollection item=shop} +
+
+ + + +
+

-
+
- + From 73eddf9f50b3093822345b5ad5d304f7078cf642 Mon Sep 17 00:00:00 2001 From: Michael Mas Date: Wed, 7 Aug 2024 14:58:23 +0200 Subject: [PATCH 09/31] feat(plugins): [WIP][ECP-101] fix syntax - change version --- README.md | 6 +++--- classes/models/LengowImportOrder.php | 2 +- lengow.php | 4 ++-- views/js/lengow/feed.js | 3 +-- views/templates/admin/lengow_feed/helpers/view/view.tpl | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3942e768..cbb4541c 100755 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # Lengow for PrestaShop -- **Requires at least:** 1.7 -- **Tested up to:** 8.1.2 +- **Requires at least:** 1.7.7 +- **Tested up to:** 8.1.7 - **Requires PHP:** 7.4 -- **Stable tag:** 3.5.3 +- **Stable tag:** 3.5.4 - **License:** Apache-2.0 - **License URI:** http://www.apache.org/licenses/LICENSE-2.0 diff --git a/classes/models/LengowImportOrder.php b/classes/models/LengowImportOrder.php index 78f73a64..2f717862 100755 --- a/classes/models/LengowImportOrder.php +++ b/classes/models/LengowImportOrder.php @@ -1219,7 +1219,7 @@ private function getCartData() // generation of fictitious email $billingData['email'] = $this->getCustomerEmail(); - if ((LengowConfiguration::getTypedGlobalValue(LengowConfiguration::ANONYMIZE_EMAIL)) { + if (LengowConfiguration::getTypedGlobalValue(LengowConfiguration::ANONYMIZE_EMAIL)) { $domain = !LengowMain::getHost() ? 'prestashop.shop' : LengowMain::getHost(); if (LengowConfiguration::getTypedGlobalValue(LengowConfiguration::TYPE_ANONYMIZE_EMAIL) === 0) { $billingData['email'] = md5($this->marketplaceSku . '-' . $this->marketplace->name) . '@' . strtolower($domain); diff --git a/lengow.php b/lengow.php index 6ea2f865..dae50a4f 100755 --- a/lengow.php +++ b/lengow.php @@ -45,7 +45,7 @@ public function __construct() { $this->name = 'lengow'; $this->tab = 'export'; - $this->version = '3.5.3'; + $this->version = '3.5.4'; $this->author = 'Lengow'; $this->module_key = '__LENGOW_PRESTASHOP_PRODUCT_KEY__'; $this->ps_versions_compliancy = [ @@ -264,4 +264,4 @@ public function hookAdminOrder($args) { return $this->hookClass->hookAdminOrder($args); } -} \ No newline at end of file +} diff --git a/views/js/lengow/feed.js b/views/js/lengow/feed.js index bf3634f9..6239aa28 100755 --- a/views/js/lengow/feed.js +++ b/views/js/lengow/feed.js @@ -21,7 +21,7 @@ document.addEventListener('DOMContentLoaded', function() { document.querySelectorAll('.sticky-icon').forEach(icon => { icon.addEventListener('click', function() { - const shopId = this.dataset.shopId; // Assurez-vous que cet attribut est bien présent dans le HTML + const shopId = this.dataset.shopId; const stickySwitches = document.querySelectorAll(`.sticky-switch${shopId}`); stickySwitches.forEach(function(switchElem) { @@ -113,7 +113,6 @@ document.addEventListener('DOMContentLoaded', function() { }); }); - // Gérer les changements de switch produit $('.lgw-container').on('change', '.lengow_switch_product', function () { var href = $(this).attr('data-href'); var action = $(this).attr('data-action'); diff --git a/views/templates/admin/lengow_feed/helpers/view/view.tpl b/views/templates/admin/lengow_feed/helpers/view/view.tpl index 7c3047ff..d71e2456 100755 --- a/views/templates/admin/lengow_feed/helpers/view/view.tpl +++ b/views/templates/admin/lengow_feed/helpers/view/view.tpl @@ -155,4 +155,4 @@ {/foreach}
- + From 4ba48d8a6738bd58d25973b68e8d233b405f8877 Mon Sep 17 00:00:00 2001 From: Michael Mas Date: Thu, 8 Aug 2024 06:38:56 +0200 Subject: [PATCH 10/31] feat(plugins): [WIP][ECP-100] Test create table by upgrade file --- upgrade/update_3.5.4.php | 112 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 upgrade/update_3.5.4.php diff --git a/upgrade/update_3.5.4.php b/upgrade/update_3.5.4.php new file mode 100644 index 00000000..1eec9867 --- /dev/null +++ b/upgrade/update_3.5.4.php @@ -0,0 +1,112 @@ + + * @copyright 2024 Lengow SAS + * @license http://www.apache.org/licenses/LICENSE-2.0 + */ + +if (!defined('_PS_VERSION_')) { + exit; +} + +if (!LengowInstall::isInstallationInProgress()) { + exit; +} + +// ********************************************************* +// Create lengow_exported_fields Table +// ********************************************************* + +$tableExists = LengowInstall::checkTableExists('lengow_exported_fields'); + +if (!$tableExists) { + $sql = 'CREATE TABLE ' . _DB_PREFIX_ . 'lengow_exported_fields ( + id INT(11) NOT NULL AUTO_INCREMENT, + lengow_field VARCHAR(255) NOT NULL, + prestashop_value VARCHAR(255) NOT NULL, + PRIMARY KEY (id) + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;'; + + Db::getInstance()->execute($sql); + + // ********************************************************* + // Insert Default Values + // ********************************************************* + + $fields = [ + 'id' => 'id', + 'sku' => 'sku', + 'sku_supplier' => 'sku_supplier', + 'ean' => 'ean', + 'upc' => 'upc', + 'isbn' => 'isbn', + 'name' => 'name', + 'quantity' => 'quantity', + 'minimal_quantity' => 'minimal_quantity', + 'availability' => 'availability', + 'is_virtual' => 'is_virtual', + 'condition' => 'condition', + 'category' => 'category', + 'status' => 'status', + 'url' => 'url', + 'url_rewrite' => 'url_rewrite', + 'price_excl_tax' => 'price_excl_tax', + 'price_incl_tax' => 'price_incl_tax', + 'price_before_discount_excl_tax' => 'price_before_discount_excl_tax', + 'price_before_discount_incl_tax' => 'price_before_discount_incl_tax', + 'price_wholesale' => 'price_wholesale', + 'discount_percent' => 'discount_percent', + 'discount_start_date' => 'discount_start_date', + 'discount_end_date' => 'discount_end_date', + 'ecotax' => 'ecotax', + 'shipping_cost' => 'shipping_cost', + 'shipping_delay' => 'shipping_delay', + 'currency' => 'currency', + 'image_url_1' => 'image_1', + 'image_url_2' => 'image_2', + 'image_url_3' => 'image_3', + 'image_url_4' => 'image_4', + 'image_url_5' => 'image_5', + 'image_url_6' => 'image_6', + 'image_url_7' => 'image_7', + 'image_url_8' => 'image_8', + 'image_url_9' => 'image_9', + 'image_url_10' => 'image_10', + 'type' => 'type', + 'parent_id' => 'parent_id', + 'variation' => 'variation', + 'language' => 'language', + 'description' => 'description', + 'description_html' => 'description_html', + 'description_short' => 'short_description', + 'description_short_html' => 'short_description_html', + 'tags' => 'tags', + 'meta_title' => 'meta_title', + 'meta_keyword' => 'meta_keywords', + 'meta_description' => 'meta_description', + 'manufacturer' => 'manufacturer', + 'supplier' => 'supplier', + 'weight' => 'weight', + 'weight_unit' => 'weight_unit', + ]; + + foreach ($fields as $prestashopValue => $lengowField) { + $sql = 'INSERT INTO ' . _DB_PREFIX_ . 'lengow_exported_fields (lengow_field, prestashop_value) + VALUES ("' . pSQL($lengowField) . '", "' . pSQL($prestashopValue) . '")'; + Db::getInstance()->execute($sql); + } +} From f09b71275349fd50d282935a28e3c12f4f0c07cd Mon Sep 17 00:00:00 2001 From: Michael Mas Date: Thu, 8 Aug 2024 06:45:42 +0200 Subject: [PATCH 11/31] feat(plugins): [WIP][ECP-100] Reverse values columns for lengow_exported_fields --- upgrade/update_3.5.4.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade/update_3.5.4.php b/upgrade/update_3.5.4.php index 1eec9867..ce383776 100644 --- a/upgrade/update_3.5.4.php +++ b/upgrade/update_3.5.4.php @@ -106,7 +106,7 @@ foreach ($fields as $prestashopValue => $lengowField) { $sql = 'INSERT INTO ' . _DB_PREFIX_ . 'lengow_exported_fields (lengow_field, prestashop_value) - VALUES ("' . pSQL($lengowField) . '", "' . pSQL($prestashopValue) . '")'; + VALUES ("' . pSQL($prestashopValue) . '", "' . pSQL($lengowField) . '")'; Db::getInstance()->execute($sql); } } From a8bcbd17ef151b5096adc083823283c902242fed Mon Sep 17 00:00:00 2001 From: Michael Mas Date: Thu, 8 Aug 2024 06:57:34 +0200 Subject: [PATCH 12/31] feat(plugins): [WIP][ECP-100] fix migration --- upgrade/update_3.5.4.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 upgrade/update_3.5.4.php diff --git a/upgrade/update_3.5.4.php b/upgrade/update_3.5.4.php old mode 100644 new mode 100755 index ce383776..1eec9867 --- a/upgrade/update_3.5.4.php +++ b/upgrade/update_3.5.4.php @@ -106,7 +106,7 @@ foreach ($fields as $prestashopValue => $lengowField) { $sql = 'INSERT INTO ' . _DB_PREFIX_ . 'lengow_exported_fields (lengow_field, prestashop_value) - VALUES ("' . pSQL($prestashopValue) . '", "' . pSQL($lengowField) . '")'; + VALUES ("' . pSQL($lengowField) . '", "' . pSQL($prestashopValue) . '")'; Db::getInstance()->execute($sql); } } From d337c0b1ea22a784d7909ac7e6edfbbf3e25e438 Mon Sep 17 00:00:00 2001 From: Michael Mas Date: Thu, 8 Aug 2024 07:03:28 +0200 Subject: [PATCH 13/31] feat(plugins): [WIP][ECP-100] forget to switch --- upgrade/update_3.5.4.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade/update_3.5.4.php b/upgrade/update_3.5.4.php index 1eec9867..5fb39ff9 100755 --- a/upgrade/update_3.5.4.php +++ b/upgrade/update_3.5.4.php @@ -106,7 +106,7 @@ foreach ($fields as $prestashopValue => $lengowField) { $sql = 'INSERT INTO ' . _DB_PREFIX_ . 'lengow_exported_fields (lengow_field, prestashop_value) - VALUES ("' . pSQL($lengowField) . '", "' . pSQL($prestashopValue) . '")'; + VALUES ("' . pSQL($prestashopValue) . '", "' . pSQL($lengowField) . '")'; Db::getInstance()->execute($sql); } } From 95c81251c264425608cca350c06d627dd7c0a9ca Mon Sep 17 00:00:00 2001 From: Michael Mas Date: Thu, 8 Aug 2024 08:45:23 +0200 Subject: [PATCH 14/31] feat(plugins): [WIP][ECP-100] add form to change field and values --- classes/controllers/LengowFeedController.php | 31 ++++++ classes/models/LengowExport.php | 22 ++++- .../helpers/view/edit_fields_feed.tpl | 98 +++++++++++++++++++ .../admin/lengow_feed/helpers/view/view.tpl | 1 + 4 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 views/templates/admin/lengow_feed/helpers/view/edit_fields_feed.tpl diff --git a/classes/controllers/LengowFeedController.php b/classes/controllers/LengowFeedController.php index f42a9654..7bc1b4ce 100755 --- a/classes/controllers/LengowFeedController.php +++ b/classes/controllers/LengowFeedController.php @@ -236,6 +236,34 @@ public function postProcess() } echo json_encode($data); break; + case 'update_fields': + $fields = Tools::getValue('fields'); + if (is_array($fields)) { + foreach ($fields as $key => $field) { + // Assurez-vous que les champs sont bien définis + $lengowField = $field['name']; + $prestashopValue = isset($field['value']) ? pSQL($field['value']) : ''; + + // Vérifiez si le champ existe déjà + $sql = 'SELECT COUNT(*) FROM ' . _DB_PREFIX_ . 'lengow_exported_fields WHERE lengow_field = "' . $lengowField . '"'; + $exists = Db::getInstance()->getValue($sql); + var_dump($exists); + exit($exists); + + if ($exists) { + // Met à jour l'entrée existante + $sql = 'UPDATE ' . _DB_PREFIX_ . 'lengow_exported_fields + SET prestashop_value = "' . $prestashopValue . '" + WHERE lengow_field = "' . $lengowField . '"'; + } else { + // Insère une nouvelle entrée + $sql = 'INSERT INTO ' . _DB_PREFIX_ . 'lengow_exported_fields (lengow_field, prestashop_value) + VALUES ("' . $lengowField . '", "' . $prestashopValue . '")'; + } + Db::getInstance()->execute($sql); + } + } + break; } exit; } @@ -246,6 +274,8 @@ public function postProcess() */ public function display() { + $lengowExport = new LengowExport([LengowExport::PARAM_SHOP_ID => $shop->id]); + $fields = $lengowExport->getNewFields(); $shopCollection = []; if ($currentShop = Shop::getContextShopID()) { $results = [['id_shop' => $currentShop]]; @@ -293,6 +323,7 @@ public function display() ]; } $this->context->smarty->assign('shopCollection', $shopCollection); + $this->context->smarty->assign('fields', $fields); parent::display(); } diff --git a/classes/models/LengowExport.php b/classes/models/LengowExport.php index c66acdc2..a9af35d3 100755 --- a/classes/models/LengowExport.php +++ b/classes/models/LengowExport.php @@ -506,7 +506,27 @@ public function setLegacyFields() $this->legacy = false; } } - self::$defaultFields = $this->legacy ? $this->legacyFields : $this->newFields; + self::$defaultFields = $this->legacy ? $this->legacyFields : $this->getNewFields(); + } + + /** + * Retrieves new fields from the lengow_exported_fields table + * + * @return array Array of fields and valuies + */ + public function getNewFields() + { + $sql = 'SELECT prestashop_value, lengow_field FROM ' . _DB_PREFIX_ . 'lengow_exported_fields'; + $result = Db::getInstance()->executeS($sql); + + $newFields = []; + if ($result) { + foreach ($result as $row) { + $newFields[$row['lengow_field']] = $row['prestashop_value']; + } + } + + return $newFields; } /** diff --git a/views/templates/admin/lengow_feed/helpers/view/edit_fields_feed.tpl b/views/templates/admin/lengow_feed/helpers/view/edit_fields_feed.tpl new file mode 100644 index 00000000..70ada166 --- /dev/null +++ b/views/templates/admin/lengow_feed/helpers/view/edit_fields_feed.tpl @@ -0,0 +1,98 @@ +{* + * Copyright 2017 Lengow SAS. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * @author Team Connector + * @copyright 2017 Lengow SAS + * @license http://www.apache.org/licenses/LICENSE-2.0 + *} + +
+ +
+ + + + diff --git a/views/templates/admin/lengow_feed/helpers/view/view.tpl b/views/templates/admin/lengow_feed/helpers/view/view.tpl index d71e2456..0447656c 100755 --- a/views/templates/admin/lengow_feed/helpers/view/view.tpl +++ b/views/templates/admin/lengow_feed/helpers/view/view.tpl @@ -25,6 +25,7 @@ {$locale->t('menu.debug_active')|escape:'htmlall':'UTF-8'}
{/if} + {include file='./edit_fields_feed.tpl'} {foreach from=$shopCollection item=shop}
From b56ab586d907f29aa57da93daf9921d02a61baf9 Mon Sep 17 00:00:00 2001 From: Michael Mas Date: Thu, 8 Aug 2024 09:00:25 +0200 Subject: [PATCH 15/31] feat(plugins): [WIP][ECP-100] add column for default key --- upgrade/update_3.5.4.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/upgrade/update_3.5.4.php b/upgrade/update_3.5.4.php index 5fb39ff9..e9c394e1 100755 --- a/upgrade/update_3.5.4.php +++ b/upgrade/update_3.5.4.php @@ -4,7 +4,7 @@ * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain - * a copy of the License at + * this file at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -38,6 +38,7 @@ id INT(11) NOT NULL AUTO_INCREMENT, lengow_field VARCHAR(255) NOT NULL, prestashop_value VARCHAR(255) NOT NULL, + default_key VARCHAR(255) NOT NULL, -- Nouvelle colonne ajoutée PRIMARY KEY (id) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;'; @@ -104,9 +105,9 @@ 'weight_unit' => 'weight_unit', ]; - foreach ($fields as $prestashopValue => $lengowField) { - $sql = 'INSERT INTO ' . _DB_PREFIX_ . 'lengow_exported_fields (lengow_field, prestashop_value) - VALUES ("' . pSQL($prestashopValue) . '", "' . pSQL($lengowField) . '")'; + foreach ($fields as $lengowField => $prestashopValue) { + $sql = 'INSERT INTO ' . _DB_PREFIX_ . 'lengow_exported_fields (lengow_field, prestashop_value, default_key) + VALUES ("' . pSQL($lengowField) . '", "' . pSQL($prestashopValue) . '", "' . pSQL($lengowField) . '")'; Db::getInstance()->execute($sql); } } From 200162c779f6538beb67cf83f8625023a68e526e Mon Sep 17 00:00:00 2001 From: Michael Mas Date: Thu, 8 Aug 2024 09:03:25 +0200 Subject: [PATCH 16/31] feat(plugins): [WIP][ECP-100] drop table when uninstall plugin --- classes/models/LengowInstall.php | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/models/LengowInstall.php b/classes/models/LengowInstall.php index 0d5323ec..42e6e4e0 100755 --- a/classes/models/LengowInstall.php +++ b/classes/models/LengowInstall.php @@ -43,6 +43,7 @@ class LengowInstall LengowMethod::TABLE_METHOD_MARKETPLACE, LengowMethod::TABLE_MARKETPLACE_METHOD_MARKETPLACE, LengowMethod::TABLE_MARKETPLACE_METHOD_COUNTRY, + 'lengow_exported_fields', ]; /** From 7669f0e52edb9076c943536a7c0c5285f1131bb5 Mon Sep 17 00:00:00 2001 From: Michael Mas Date: Thu, 8 Aug 2024 13:41:35 +0200 Subject: [PATCH 17/31] feat(prestashop): [WIP][ECP-100] add modal for form, POST data, add button for reset lengow field to default setting --- classes/controllers/LengowFeedController.php | 34 +++++----- classes/models/LengowExport.php | 26 +++++++- classes/models/LengowFeed.php | 22 +++---- classes/models/LengowInstall.php | 8 +-- views/css/lengow-components.css | 12 ++-- views/css/lengow-pages.css | 56 +++++++++++++++++ .../helpers/view/edit_fields_feed.tpl | 62 +++++++++---------- 7 files changed, 147 insertions(+), 73 deletions(-) diff --git a/classes/controllers/LengowFeedController.php b/classes/controllers/LengowFeedController.php index 7bc1b4ce..3e18bb6c 100755 --- a/classes/controllers/LengowFeedController.php +++ b/classes/controllers/LengowFeedController.php @@ -240,27 +240,25 @@ public function postProcess() $fields = Tools::getValue('fields'); if (is_array($fields)) { foreach ($fields as $key => $field) { - // Assurez-vous que les champs sont bien définis - $lengowField = $field['name']; - $prestashopValue = isset($field['value']) ? pSQL($field['value']) : ''; - // Vérifiez si le champ existe déjà - $sql = 'SELECT COUNT(*) FROM ' . _DB_PREFIX_ . 'lengow_exported_fields WHERE lengow_field = "' . $lengowField . '"'; + $defaultKey = $key; + $prestashopValue = isset($field['prestashop_value']) ? pSQL($field['prestashop_value']) : ''; + $lengowField = isset($field['lengow_field']) ? pSQL($field['lengow_field']) : ''; + + $sql = 'SELECT COUNT(*) FROM ' . _DB_PREFIX_ . 'lengow_exported_fields WHERE default_key = "' . $defaultKey . '"'; $exists = Db::getInstance()->getValue($sql); - var_dump($exists); - exit($exists); if ($exists) { - // Met à jour l'entrée existante $sql = 'UPDATE ' . _DB_PREFIX_ . 'lengow_exported_fields - SET prestashop_value = "' . $prestashopValue . '" - WHERE lengow_field = "' . $lengowField . '"'; + SET prestashop_value = "' . $prestashopValue . '", + lengow_field = "' . $lengowField . '" + WHERE default_key = "' . $defaultKey . '"'; } else { - // Insère une nouvelle entrée - $sql = 'INSERT INTO ' . _DB_PREFIX_ . 'lengow_exported_fields (lengow_field, prestashop_value) - VALUES ("' . $lengowField . '", "' . $prestashopValue . '")'; + $sql = 'INSERT INTO ' . _DB_PREFIX_ . 'lengow_exported_fields (default_key, prestashop_value, lengow_field) + VALUES ("' . $defaultKey . '", "' . $prestashopValue . '", "' . $lengowField . '")'; } Db::getInstance()->execute($sql); + return Tools::redirectAdmin($this->lengowLink->getAbsoluteAdminLink('AdminLengowFeed')); } } break; @@ -274,8 +272,8 @@ public function postProcess() */ public function display() { - $lengowExport = new LengowExport([LengowExport::PARAM_SHOP_ID => $shop->id]); - $fields = $lengowExport->getNewFields(); + $lengowExport = new LengowExport(); + $fields = $lengowExport->getConfigFields(); $shopCollection = []; if ($currentShop = Shop::getContextShopID()) { $results = [['id_shop' => $currentShop]]; @@ -562,9 +560,9 @@ class="lgw-btn lengow_add_to_export"> $html .= ''; $html .= '
'; diff --git a/classes/models/LengowExport.php b/classes/models/LengowExport.php index a9af35d3..d83f5e9f 100755 --- a/classes/models/LengowExport.php +++ b/classes/models/LengowExport.php @@ -323,7 +323,7 @@ public function __construct($params = []) $this->stream = isset($params[self::PARAM_STREAM]) ? $params[self::PARAM_STREAM] : false; $this->limit = isset($params[self::PARAM_LIMIT]) ? (int) $params[self::PARAM_LIMIT] : false; $this->idShop = (int) ( - isset($params[self::PARAM_SHOP_ID]) + isset($params[self::PARAM_SHOP_ID]) ? $params[self::PARAM_SHOP_ID] : Context::getContext()->shop->id ); @@ -529,6 +529,30 @@ public function getNewFields() return $newFields; } + /** + * Retrieves fields config from the lengow_exported_fields table + * + * @return array Array of fields with their values + */ + public function getConfigFields() + { + $sql = 'SELECT default_key, prestashop_value, lengow_field FROM ' . _DB_PREFIX_ . 'lengow_exported_fields'; + $result = Db::getInstance()->executeS($sql); + + $newFields = []; + if ($result) { + foreach ($result as $row) { + $newFields[$row['default_key']] = [ + 'prestashop_value' => $row['prestashop_value'], + 'lengow_field' => $row['lengow_field'] + ]; + } + } + + return $newFields; + } + + /** * Export products * diff --git a/classes/models/LengowFeed.php b/classes/models/LengowFeed.php index 17b35d1c..cba2966b 100755 --- a/classes/models/LengowFeed.php +++ b/classes/models/LengowFeed.php @@ -191,7 +191,7 @@ protected function getHeader($data) return rtrim($header, self::CSV_SEPARATOR) . self::EOL; case self::FORMAT_XML: return '' . self::EOL - . '' . self::EOL; + . '' . self::EOL; case self::FORMAT_JSON: return '{"catalog":['; case self::FORMAT_YAML: @@ -387,23 +387,19 @@ public static function formatFields($str, $format, $legacy = false) } return Tools::substr( - Tools::strtolower( - preg_replace( - '/[^a-zA-Z0-9_]+/', - '', - str_replace([' ', '\''], '_', LengowMain::replaceAccentedChars($str)) - ) + preg_replace( + '/[^a-zA-Z0-9_]+/', + '', + str_replace([' ', '\''], '_', LengowMain::replaceAccentedChars($str)) ), 0, 58 ); default: - return Tools::strtolower( - preg_replace( - '/[^a-zA-Z0-9_]+/', - '', - str_replace([' ', '\''], '_', LengowMain::replaceAccentedChars($str)) - ) + return preg_replace( + '/[^a-zA-Z0-9_]+/', + '', + str_replace([' ', '\''], '_', LengowMain::replaceAccentedChars($str)) ); } } diff --git a/classes/models/LengowInstall.php b/classes/models/LengowInstall.php index 42e6e4e0..419d117d 100755 --- a/classes/models/LengowInstall.php +++ b/classes/models/LengowInstall.php @@ -386,7 +386,7 @@ public static function dropTable() $column = LengowAction::ARG_RETURN_TRACKING_NUMBER; if (self::checkTableExists($name) && self::checkFieldExists($name, $column)) { $sql = 'ALTER TABLE ' . _DB_PREFIX_ . 'order_carrier ' - . 'DROP COLUMN `' . Db::getInstance()->_escape($column) . '`;'; + . 'DROP COLUMN `' . Db::getInstance()->_escape($column) . '`;'; Db::getInstance()->execute($sql); LengowMain::log( LengowLog::CODE_UNINSTALL, @@ -396,7 +396,7 @@ public static function dropTable() $column = LengowAction::ARG_RETURN_CARRIER; if (self::checkTableExists($name) && self::checkFieldExists($name, $column)) { $sql = 'ALTER TABLE ' . _DB_PREFIX_ . 'order_carrier ' - . 'DROP COLUMN `' . Db::getInstance()->_escape($column) . '`;'; + . 'DROP COLUMN `' . Db::getInstance()->_escape($column) . '`;'; Db::getInstance()->execute($sql); LengowMain::log( LengowLog::CODE_UNINSTALL, @@ -852,7 +852,7 @@ private function createLengowTables() $column = LengowAction::ARG_RETURN_TRACKING_NUMBER; if (self::checkTableExists($name) && !self::checkFieldExists($name, $column)) { $sql = 'ALTER TABLE ' . _DB_PREFIX_ . 'order_carrier ' - . 'ADD COLUMN `' . $column . '` VARCHAR(64);'; + . 'ADD COLUMN `' . $column . '` VARCHAR(64);'; Db::getInstance()->execute($sql); LengowMain::log( LengowLog::CODE_INSTALL, @@ -867,7 +867,7 @@ private function createLengowTables() $column = LengowAction::ARG_RETURN_CARRIER; if (self::checkTableExists($name) && !self::checkFieldExists($name, $column)) { $sql = 'ALTER TABLE ' . _DB_PREFIX_ . 'order_carrier ' - . 'ADD COLUMN `' . $column . '` VARCHAR(64);'; + . 'ADD COLUMN `' . $column . '` VARCHAR(64);'; Db::getInstance()->execute($sql); LengowMain::log( LengowLog::CODE_INSTALL, diff --git a/views/css/lengow-components.css b/views/css/lengow-components.css index 0445e22f..8764a141 100755 --- a/views/css/lengow-components.css +++ b/views/css/lengow-components.css @@ -18,7 +18,7 @@ color: #555; text-decoration: none; transition: top 100ms ease, - box-shadow 100ms ease; + box-shadow 100ms ease; } a.lgw-box-link:hover { @@ -255,9 +255,9 @@ a.lgw-box-link:hover { transform: scale(0.0); -webkit-transform: scale(0.0); } 50% { - transform: scale(1.0); - -webkit-transform: scale(1.0); - } + transform: scale(1.0); + -webkit-transform: scale(1.0); + } } /*************************************************/ @@ -1120,7 +1120,7 @@ a.lgw-box-link:hover { background: url('../img/carret-up.png') no-repeat right center; } -.lgw-container .accordion .lgw-arrow-right { +.lgw-arrow-right { background: url('../img/arrow-right.png') no-repeat right center; height: 43px; width: 30px; @@ -1230,4 +1230,4 @@ a.lgw-box-link:hover { .lgw-icon.mod-pro:after { font-size: 20px; -} \ No newline at end of file +} diff --git a/views/css/lengow-pages.css b/views/css/lengow-pages.css index d0d1d6b4..e6c36272 100755 --- a/views/css/lengow-pages.css +++ b/views/css/lengow-pages.css @@ -421,6 +421,62 @@ justify-content: center; } +.feed-field { + width: fit-content !important; +} + +.fade-scale { + opacity: 0; + -webkit-transition: all .25s linear; + -o-transition: all .25s linear; + transition: all .25s linear; + display: none; +} + +.fade-scale.in { + opacity: 1; + display: block; +} + +.lengow-modal-content { + background: white; + width: fit-content; +} + +.lengow-modal-body { + height: 620px; + overflow-y: scroll; +} + +.fields-container { + padding: 50px; +} + +.form__buttons { + border-top: 1px solid #eff1f2; + background: white; + position: sticky; + bottom: 0; + padding: 1em; + margin: -1em; +} + +.config_field_button { + color: white; + background: blue; + padding: 8px 10px 5px 10px; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + position: absolute; + right: 40px; + font-size: 11px; + font-weight: bold; + z-index: 2; + top: 54px; + text-decoration: none; +} + + /*************************************************/ /* ORDERS */ /*************************************************/ diff --git a/views/templates/admin/lengow_feed/helpers/view/edit_fields_feed.tpl b/views/templates/admin/lengow_feed/helpers/view/edit_fields_feed.tpl index 70ada166..aa5ee44d 100644 --- a/views/templates/admin/lengow_feed/helpers/view/edit_fields_feed.tpl +++ b/views/templates/admin/lengow_feed/helpers/view/edit_fields_feed.tpl @@ -19,48 +19,49 @@ *}
- +
Configuration des champs
-