From d1df10e437c7058b5f051d5fe6ba0f5330a291a6 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Fri, 1 Nov 2024 16:01:13 +0100 Subject: [PATCH 1/6] PLUG-3928 - Minicart fast checkout --- view/frontend/web/js/minicart.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/view/frontend/web/js/minicart.js b/view/frontend/web/js/minicart.js index 3e7cffe7..d432bdbf 100644 --- a/view/frontend/web/js/minicart.js +++ b/view/frontend/web/js/minicart.js @@ -1,9 +1,9 @@ define( -[ - 'jquery', - 'uiComponent' -], -function ($, Component) { + [ + 'jquery', + 'uiComponent' + ], + function ($, Component) { 'use strict'; return Component.extend({ defaults: { @@ -14,7 +14,11 @@ function ($, Component) { return this; }, isFastcheckoutEnabled: function () { - $('#top-cart-btn-checkout').parent().append($('#top-cart-btn-fastcheckout')); + if (window.fastCheckoutMinicart) { + $('#top-cart-btn-checkout').parent().append($('#top-cart-btn-fastcheckout')); + } else { + $('#top-cart-btn-fastcheckout').remove(); + } return window.fastCheckoutMinicart; }, doFastcheckout: function () { @@ -23,4 +27,3 @@ function ($, Component) { }) } ) - \ No newline at end of file From 0250542c59e13a6635e02185e053133244950ffe Mon Sep 17 00:00:00 2001 From: Anne Date: Mon, 11 Nov 2024 15:48:15 +0100 Subject: [PATCH 2/6] Add Visa and Mastercard --- Model/Config.php | 2 + Model/Config/Source/Available/Mastercard.php | 8 + Model/Config/Source/Available/Visa.php | 8 + Model/ConfigProvider.php | 2 + Model/Paymentmethod/Mastercard.php | 16 ++ Model/Paymentmethod/Visa.php | 16 ++ etc/adminhtml/paymentmethods.xml | 2 + etc/adminhtml/paymentmethods/mastercard.xml | 153 ++++++++++++++++++ etc/adminhtml/paymentmethods/visa.xml | 153 ++++++++++++++++++ etc/config.xml | 24 +++ etc/payment.xml | 6 + view/frontend/layout/checkout_index_index.xml | 6 + .../web/js/view/payment/method-renderer.js | 2 + 13 files changed, 398 insertions(+) create mode 100644 Model/Config/Source/Available/Mastercard.php create mode 100644 Model/Config/Source/Available/Visa.php create mode 100644 Model/Paymentmethod/Mastercard.php create mode 100644 Model/Paymentmethod/Visa.php create mode 100644 etc/adminhtml/paymentmethods/mastercard.xml create mode 100644 etc/adminhtml/paymentmethods/visa.xml diff --git a/Model/Config.php b/Model/Config.php index 3589efe8..b11dddc8 100644 --- a/Model/Config.php +++ b/Model/Config.php @@ -105,6 +105,7 @@ class Config "paynl_payment_klarnakp" => "15", "paynl_payment_kunstencultuurkaart" => "315", "paynl_payment_maestro" => "33", + "paynl_payment_mastercard" => "8", "paynl_payment_mistercash" => "2", "paynl_payment_mobilepay" => "324", "paynl_payment_monizze" => "183", @@ -132,6 +133,7 @@ class Config "paynl_payment_stadspasamsterdam" => "336", "paynl_payment_telefonischbetalen" => "173", "paynl_payment_trustly" => "213", + "paynl_payment_visa" => "228", "paynl_payment_visamastercard" => "7", "paynl_payment_vvvgiftcard" => "25", "paynl_payment_webshopgiftcard" => "26", diff --git a/Model/Config/Source/Available/Mastercard.php b/Model/Config/Source/Available/Mastercard.php new file mode 100644 index 00000000..76eb6077 --- /dev/null +++ b/Model/Config/Source/Available/Mastercard.php @@ -0,0 +1,8 @@ + + @@ -75,6 +76,7 @@ + diff --git a/etc/adminhtml/paymentmethods/mastercard.xml b/etc/adminhtml/paymentmethods/mastercard.xml new file mode 100644 index 00000000..18abbc30 --- /dev/null +++ b/etc/adminhtml/paymentmethods/mastercard.xml @@ -0,0 +1,153 @@ + + + + + + + Paynl\Payment\Model\Config\Source\Available\Mastercard + payment/paynl_payment_mastercard/active + + + + payment/paynl_payment_mastercard/title + + 1 + + + + + Paynl\Payment\Model\Config\Source\Order\Status\PendingPayment + + 1 + + payment/paynl_payment_mastercard/order_status + + + + Paynl\Payment\Model\Config\Source\Order\Status\Processing + + 1 + + payment/paynl_payment_mastercard/order_status_authorized + + + + Paynl\Payment\Model\Config\Source\Order\Status\Processing + + 1 + + payment/paynl_payment_mastercard/order_status_processing + + + + Magento\Payment\Model\Config\Source\Allspecificcountries + payment/paynl_payment_mastercard/allowspecific + + 1 + + + + + Magento\Directory\Model\Config\Source\Country + 1 + payment/paynl_payment_mastercard/specificcountry + + 1 + 1 + + + + + + 1 + + payment/paynl_payment_mastercard/instructions + + + + payment/paynl_payment_mastercard/min_order_total + + 1 + + + + + payment/paynl_payment_mastercard/max_order_total + + 1 + + + + + validate-number + payment/paynl_payment_mastercard/sort_order + + 1 + + + + + Paynl\Payment\Model\Config\Source\SendNewOrderEmail + payment/paynl_payment_mastercard/send_new_order_email + + 1 + + + + + Magento\Shipping\Model\Config\Source\Allmethods + 1 + + 1 + + payment/paynl_payment_mastercard/disallowedshipping + + + + + Paynl\Payment\Model\Config\Source\ShowCompanyOptions + + 1 + + payment/paynl_payment_mastercard/showforcompany + By default payment methods are available in the checkout for all customer types. +Private, B2C: Only show this payment method when the customer didn't enter a company name. +Business, BB2: Only show this payment method when the customer entered a company name. + + + + + Paynl\Payment\Model\Config\Source\UserGroups + + 1 + + payment/paynl_payment_mastercard/showforgroup + + + + + + + Only change this if you are told to do so by Pay. Support + payment/paynl_payment_mastercard/payment_option_id + + + + + \ No newline at end of file diff --git a/etc/adminhtml/paymentmethods/visa.xml b/etc/adminhtml/paymentmethods/visa.xml new file mode 100644 index 00000000..45c4b6c6 --- /dev/null +++ b/etc/adminhtml/paymentmethods/visa.xml @@ -0,0 +1,153 @@ + + + + + + + Paynl\Payment\Model\Config\Source\Available\Visa + payment/paynl_payment_visa/active + + + + payment/paynl_payment_visa/title + + 1 + + + + + Paynl\Payment\Model\Config\Source\Order\Status\PendingPayment + + 1 + + payment/paynl_payment_visa/order_status + + + + Paynl\Payment\Model\Config\Source\Order\Status\Processing + + 1 + + payment/paynl_payment_visa/order_status_authorized + + + + Paynl\Payment\Model\Config\Source\Order\Status\Processing + + 1 + + payment/paynl_payment_visa/order_status_processing + + + + Magento\Payment\Model\Config\Source\Allspecificcountries + payment/paynl_payment_visa/allowspecific + + 1 + + + + + Magento\Directory\Model\Config\Source\Country + 1 + payment/paynl_payment_visa/specificcountry + + 1 + 1 + + + + + + 1 + + payment/paynl_payment_visa/instructions + + + + payment/paynl_payment_visa/min_order_total + + 1 + + + + + payment/paynl_payment_visa/max_order_total + + 1 + + + + + validate-number + payment/paynl_payment_visa/sort_order + + 1 + + + + + Paynl\Payment\Model\Config\Source\SendNewOrderEmail + payment/paynl_payment_visa/send_new_order_email + + 1 + + + + + Magento\Shipping\Model\Config\Source\Allmethods + 1 + + 1 + + payment/paynl_payment_visa/disallowedshipping + + + + + Paynl\Payment\Model\Config\Source\ShowCompanyOptions + + 1 + + payment/paynl_payment_visa/showforcompany + By default payment methods are available in the checkout for all customer types. +Private, B2C: Only show this payment method when the customer didn't enter a company name. +Business, BB2: Only show this payment method when the customer entered a company name. + + + + + Paynl\Payment\Model\Config\Source\UserGroups + + 1 + + payment/paynl_payment_visa/showforgroup + + + + + + + Only change this if you are told to do so by Pay. Support + payment/paynl_payment_visa/payment_option_id + + + + + \ No newline at end of file diff --git a/etc/config.xml b/etc/config.xml index 64f2ad0a..ef119ff5 100755 --- a/etc/config.xml +++ b/etc/config.xml @@ -593,6 +593,18 @@ To finish your order, click the link below paynl_payment after_payment + + 0 + Mastercard + 3138 + pending_payment + processing + processing + order + Paynl\Payment\Model\Paymentmethod\Mastercard + paynl_payment + after_payment + 0 Bancontact @@ -921,6 +933,18 @@ To finish your order, click the link below paynl_payment after_payment + + 0 + Visa + 3141 + pending_payment + processing + processing + order + Paynl\Payment\Model\Paymentmethod\Visa + paynl_payment + after_payment + 0 Visa / Mastercard diff --git a/etc/payment.xml b/etc/payment.xml index c3e08838..935053b2 100644 --- a/etc/payment.xml +++ b/etc/payment.xml @@ -135,6 +135,9 @@ 0 + + 0 + 0 @@ -213,6 +216,9 @@ 0 + + 0 + 0 diff --git a/view/frontend/layout/checkout_index_index.xml b/view/frontend/layout/checkout_index_index.xml index 73b8063c..ec50c6f9 100755 --- a/view/frontend/layout/checkout_index_index.xml +++ b/view/frontend/layout/checkout_index_index.xml @@ -159,6 +159,9 @@ true + + true + true @@ -237,6 +240,9 @@ true + + true + true diff --git a/view/frontend/web/js/view/payment/method-renderer.js b/view/frontend/web/js/view/payment/method-renderer.js index 072d2fdb..754abcae 100755 --- a/view/frontend/web/js/view/payment/method-renderer.js +++ b/view/frontend/web/js/view/payment/method-renderer.js @@ -59,6 +59,7 @@ define( {type: 'paynl_payment_klarnakp', component: defaultComponent}, {type: 'paynl_payment_kunstencultuurkaart', component: defaultComponent}, {type: 'paynl_payment_maestro', component: defaultComponent}, + {type: 'paynl_payment_mastercard', component: defaultComponent}, {type: 'paynl_payment_mistercash', component: defaultComponent}, {type: 'paynl_payment_mobilepay', component: defaultComponent}, {type: 'paynl_payment_monizze', component: defaultComponent}, @@ -85,6 +86,7 @@ define( {type: 'paynl_payment_stadspasamsterdam', component: defaultComponent}, {type: 'paynl_payment_telefonischbetalen', component: defaultComponent}, {type: 'paynl_payment_trustly', component: defaultComponent}, + {type: 'paynl_payment_visa', component: defaultComponent}, {type: 'paynl_payment_visamastercard', component: defaultComponent}, {type: 'paynl_payment_vvvgiftcard', component: defaultComponent}, {type: 'paynl_payment_webshopgiftcard', component: defaultComponent}, From 06698e6cac62f3324df3d674295e71f41ae834bf Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Wed, 20 Nov 2024 14:28:23 +0100 Subject: [PATCH 3/6] PLUG-3975 - Paylink fix --- Model/PayPaymentCreate.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Model/PayPaymentCreate.php b/Model/PayPaymentCreate.php index 984b75aa..3273d907 100644 --- a/Model/PayPaymentCreate.php +++ b/Model/PayPaymentCreate.php @@ -109,6 +109,8 @@ public function __construct($order, PaymentMethod $methodInstance) $finishUrl = $order->getStore()->getBaseUrl() . 'paynl/checkout/finish/?entityid=' . $order->getEntityId(); $exchangeUrl = $order->getStore()->getBaseUrl() . 'paynl/checkout/exchange/'; + + $this->payConfig->setStore($order->getStore()); } $this->setCompanyField($this->additionalData['companyfield'] ?? ''); From a95a002e35a38b0faae456498b3f4936b8e97f27 Mon Sep 17 00:00:00 2001 From: Anne Date: Thu, 21 Nov 2024 15:39:43 +0100 Subject: [PATCH 4/6] Language updates --- Model/Config.php | 10 ++++++++++ Model/Config/Source/Languages.php | 30 +++++++++++++++++++++++------- i18n/de_AT.csv | 4 +++- i18n/de_CH.csv | 4 +++- i18n/de_DE.csv | 4 +++- i18n/de_LU.csv | 4 +++- i18n/en_US.csv | 2 ++ i18n/fr_BE.csv | 4 +++- i18n/fr_CA.csv | 4 +++- i18n/fr_CH.csv | 4 +++- i18n/fr_FR.csv | 4 +++- i18n/fr_LU.csv | 4 +++- i18n/nl_BE.csv | 4 +++- i18n/nl_NL.csv | 4 +++- 14 files changed, 68 insertions(+), 18 deletions(-) diff --git a/Model/Config.php b/Model/Config.php index 3589efe8..d3cecd49 100644 --- a/Model/Config.php +++ b/Model/Config.php @@ -302,6 +302,16 @@ public function getLanguage() { $language = $this->store->getConfig('payment/paynl/language'); + if ($language == 'browser' && isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])){ + $language = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2); + } + if ($language == 'website'){ + $currentLocaleCode = $this->scopeConfig->getValue('general/locale/code', \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $this->store->getId()); + if (!empty($currentLocaleCode)){ + $language = explode('_', $currentLocaleCode)[0]; + } + } + return $language ? $language : 'nl'; //default nl } diff --git a/Model/Config/Source/Languages.php b/Model/Config/Source/Languages.php index abcc4f94..b1a288d5 100644 --- a/Model/Config/Source/Languages.php +++ b/Model/Config/Source/Languages.php @@ -30,14 +30,30 @@ public function toOptionArray() public function toArray() { return [ - 'nl' => __('Dutch'), + 'nl' => __('Nederlands'), 'en' => __('English'), - 'de' => __('German'), - 'it' => __('Italian'), - 'fr' => __('French'), - 'es' => __('Spanish'), - 'dk' => __('Danish'), - 'pl' => __('Polish') + 'de' => __('Deutsch'), + 'it' => __('Italiano'), + 'fr' => __('Francais'), + 'es' => __('Español'), + 'dk' => __('Dansk'), + 'pl' => __('Polski'), + 'us' => __('American'), + 'mx' => __('Mexicano'), + 'hu' => __('Magyar'), + 'no' => __('Norsk'), + 'hr' => __('Hrvatski'), + 'pt' => __('Português'), + 'ro' => __('Română'), + 'sv' => __('Svenska'), + 'sl' => __('Slovenski'), + 'tr' => __('Türk'), + 'fi' => __('Suomalainen'), + 'cz' => __('Česky'), + 'gr' => __('Ελληνικά'), + 'jp' => __('日本語'), + 'browser' => __('Use browser language'), + 'website' => __('Use website language'), ]; } } diff --git a/i18n/de_AT.csv b/i18n/de_AT.csv index 327f7a80..2a42fbc7 100644 --- a/i18n/de_AT.csv +++ b/i18n/de_AT.csv @@ -298,4 +298,6 @@ Diese Einstellung wirkt sich nicht auf die Produktseite aus. Wenn der schnelle C "On - as Required","Ein - nach Bedarf" "Show notice and abort fast checkout","Hinweis anzeigen und Schnellkasse abbrechen" "Show intermediate screen to select shipping method","Zwischenbildschirm zur Auswahl der Versandart anzeigen" -"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Vielen Dank für Ihren Kauf, sobald die Zahlung abgeschlossen ist, erhalten Sie eine E-Mail." \ No newline at end of file +"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Vielen Dank für Ihren Kauf, sobald die Zahlung abgeschlossen ist, erhalten Sie eine E-Mail." +"Use browser language","Browsersprache verwenden" +"Use website language","Verwenden Sie die Website-Sprache" \ No newline at end of file diff --git a/i18n/de_CH.csv b/i18n/de_CH.csv index ea9bbbfb..8ade399e 100644 --- a/i18n/de_CH.csv +++ b/i18n/de_CH.csv @@ -300,4 +300,6 @@ Diese Einstellung wirkt sich nicht auf die Produktseite aus. Wenn der schnelle C "On - as Required","Ein - nach Bedarf" "Show notice and abort fast checkout","Hinweis anzeigen und Schnellkasse abbrechen" "Show intermediate screen to select shipping method","Zwischenbildschirm zur Auswahl der Versandart anzeigen" -"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Vielen Dank für Ihren Kauf, sobald die Zahlung abgeschlossen ist, erhalten Sie eine E-Mail." \ No newline at end of file +"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Vielen Dank für Ihren Kauf, sobald die Zahlung abgeschlossen ist, erhalten Sie eine E-Mail." +"Use browser language","Browsersprache verwenden" +"Use website language","Verwenden Sie die Website-Sprache" \ No newline at end of file diff --git a/i18n/de_DE.csv b/i18n/de_DE.csv index ea9bbbfb..8ade399e 100644 --- a/i18n/de_DE.csv +++ b/i18n/de_DE.csv @@ -300,4 +300,6 @@ Diese Einstellung wirkt sich nicht auf die Produktseite aus. Wenn der schnelle C "On - as Required","Ein - nach Bedarf" "Show notice and abort fast checkout","Hinweis anzeigen und Schnellkasse abbrechen" "Show intermediate screen to select shipping method","Zwischenbildschirm zur Auswahl der Versandart anzeigen" -"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Vielen Dank für Ihren Kauf, sobald die Zahlung abgeschlossen ist, erhalten Sie eine E-Mail." \ No newline at end of file +"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Vielen Dank für Ihren Kauf, sobald die Zahlung abgeschlossen ist, erhalten Sie eine E-Mail." +"Use browser language","Browsersprache verwenden" +"Use website language","Verwenden Sie die Website-Sprache" \ No newline at end of file diff --git a/i18n/de_LU.csv b/i18n/de_LU.csv index dba32db4..263c0c9b 100644 --- a/i18n/de_LU.csv +++ b/i18n/de_LU.csv @@ -301,4 +301,6 @@ Diese Einstellung wirkt sich nicht auf die Produktseite aus. Wenn der schnelle C "On - as Required","Ein - nach Bedarf" "Show notice and abort fast checkout","Hinweis anzeigen und Schnellkasse abbrechen" "Show intermediate screen to select shipping method","Zwischenbildschirm zur Auswahl der Versandart anzeigen" -"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Vielen Dank für Ihren Kauf, sobald die Zahlung abgeschlossen ist, erhalten Sie eine E-Mail." \ No newline at end of file +"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Vielen Dank für Ihren Kauf, sobald die Zahlung abgeschlossen ist, erhalten Sie eine E-Mail." +"Use browser language","Browsersprache verwenden" +"Use website language","Verwenden Sie die Website-Sprache" \ No newline at end of file diff --git a/i18n/en_US.csv b/i18n/en_US.csv index 520829c3..7eb29e1e 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -366,3 +366,5 @@ This setting does not effect the product page. If fast checkout is enabled for t "Show notice and abort fast checkout","Show notice and abort fast checkout" "Show intermediate screen to select shipping method","Show intermediate screen to select shipping method" "Thank you for your purchase, as soon as the payment is completed you will receive an email.","Thank you for your purchase, as soon as the payment is completed you will receive an email." +"Use browser language","Use browser language" +"Use website language","Use website language" \ No newline at end of file diff --git a/i18n/fr_BE.csv b/i18n/fr_BE.csv index 6956967c..ccdd853f 100644 --- a/i18n/fr_BE.csv +++ b/i18n/fr_BE.csv @@ -302,4 +302,6 @@ Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé p "On - as Required","Activé - en requis" "Show notice and abort fast checkout","Afficher un avis et abandonner le fastcheckout" "Show intermediate screen to select shipping method","Afficher l'écran intermédiaire pour sélectionner la méthode d'expédition" -"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Nous vous remercions pour votre commande. Dès que le paiement aura été traité, vous recevrez un e-mail." \ No newline at end of file +"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Nous vous remercions pour votre commande. Dès que le paiement aura été traité, vous recevrez un e-mail." +"Use browser language","Utiliser la langue du navigateur" +"Use website language","Utiliser la langue du site Web" \ No newline at end of file diff --git a/i18n/fr_CA.csv b/i18n/fr_CA.csv index 6956967c..ccdd853f 100644 --- a/i18n/fr_CA.csv +++ b/i18n/fr_CA.csv @@ -302,4 +302,6 @@ Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé p "On - as Required","Activé - en requis" "Show notice and abort fast checkout","Afficher un avis et abandonner le fastcheckout" "Show intermediate screen to select shipping method","Afficher l'écran intermédiaire pour sélectionner la méthode d'expédition" -"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Nous vous remercions pour votre commande. Dès que le paiement aura été traité, vous recevrez un e-mail." \ No newline at end of file +"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Nous vous remercions pour votre commande. Dès que le paiement aura été traité, vous recevrez un e-mail." +"Use browser language","Utiliser la langue du navigateur" +"Use website language","Utiliser la langue du site Web" \ No newline at end of file diff --git a/i18n/fr_CH.csv b/i18n/fr_CH.csv index 6956967c..ccdd853f 100644 --- a/i18n/fr_CH.csv +++ b/i18n/fr_CH.csv @@ -302,4 +302,6 @@ Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé p "On - as Required","Activé - en requis" "Show notice and abort fast checkout","Afficher un avis et abandonner le fastcheckout" "Show intermediate screen to select shipping method","Afficher l'écran intermédiaire pour sélectionner la méthode d'expédition" -"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Nous vous remercions pour votre commande. Dès que le paiement aura été traité, vous recevrez un e-mail." \ No newline at end of file +"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Nous vous remercions pour votre commande. Dès que le paiement aura été traité, vous recevrez un e-mail." +"Use browser language","Utiliser la langue du navigateur" +"Use website language","Utiliser la langue du site Web" \ No newline at end of file diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv index b4d770b4..14e9c867 100644 --- a/i18n/fr_FR.csv +++ b/i18n/fr_FR.csv @@ -302,4 +302,6 @@ Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé p "On - as Required","Activé - en requis" "Show notice and abort fast checkout","Afficher un avis et abandonner le fastcheckout" "Show intermediate screen to select shipping method","Afficher l'écran intermédiaire pour sélectionner la méthode d'expédition" -"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Nous vous remercions pour votre commande. Dès que le paiement aura été traité, vous recevrez un e-mail." \ No newline at end of file +"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Nous vous remercions pour votre commande. Dès que le paiement aura été traité, vous recevrez un e-mail." +"Use browser language","Utiliser la langue du navigateur" +"Use website language","Utiliser la langue du site Web" \ No newline at end of file diff --git a/i18n/fr_LU.csv b/i18n/fr_LU.csv index 4985387a..237ce1e7 100644 --- a/i18n/fr_LU.csv +++ b/i18n/fr_LU.csv @@ -301,4 +301,6 @@ Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé p "On - as Required","Activé - en requis" "Show notice and abort fast checkout","Afficher un avis et abandonner le fastcheckout" "Show intermediate screen to select shipping method","Afficher l'écran intermédiaire pour sélectionner la méthode d'expédition" -"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Nous vous remercions pour votre commande. Dès que le paiement aura été traité, vous recevrez un e-mail." \ No newline at end of file +"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Nous vous remercions pour votre commande. Dès que le paiement aura été traité, vous recevrez un e-mail." +"Use browser language","Utiliser la langue du navigateur" +"Use website language","Utiliser la langue du site Web" \ No newline at end of file diff --git a/i18n/nl_BE.csv b/i18n/nl_BE.csv index 2d443f75..7f7b4836 100644 --- a/i18n/nl_BE.csv +++ b/i18n/nl_BE.csv @@ -359,4 +359,6 @@ Deze instelling heeft geen effect op de productpagina. Als snel bestellen is ing "On - as Required","Aan - als Verplicht" "Show notice and abort fast checkout","Toon melding en annuleer snel bestellen" "Show intermediate screen to select shipping method","Toon tussenscherm om verzendmethode te selecteren" -"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Bedankt voor uw bestelling, zodra de betaling afgerond is ontvangt u een email." \ No newline at end of file +"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Bedankt voor uw bestelling, zodra de betaling afgerond is ontvangt u een email." +"Use browser language","Gebruik browsertaal" +"Use website language","Gebruik websitetaal" \ No newline at end of file diff --git a/i18n/nl_NL.csv b/i18n/nl_NL.csv index 8eda341c..4f9301a9 100644 --- a/i18n/nl_NL.csv +++ b/i18n/nl_NL.csv @@ -351,4 +351,6 @@ Deze instelling heeft geen effect op de productpagina. Als snel bestellen is ing "On - as Required","Aan - als Verplicht" "Show notice and abort fast checkout","Toon melding en annuleer snel bestellen" "Show intermediate screen to select shipping method","Toon tussenscherm om verzendmethode te selecteren" -"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Bedankt voor uw bestelling, zodra de betaling afgerond is ontvangt u een email." \ No newline at end of file +"Thank you for your purchase, as soon as the payment is completed you will receive an email.","Bedankt voor uw bestelling, zodra de betaling afgerond is ontvangt u een email." +"Use browser language","Gebruik browsertaal" +"Use website language","Gebruik websitetaal" \ No newline at end of file From e8983cf52d9139b8d001b966723aff4969aed656 Mon Sep 17 00:00:00 2001 From: Anne Date: Thu, 21 Nov 2024 15:41:27 +0100 Subject: [PATCH 5/6] Formatting --- Model/Config.php | 6 +++--- Model/Config/Source/Languages.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Model/Config.php b/Model/Config.php index d3cecd49..c162f070 100644 --- a/Model/Config.php +++ b/Model/Config.php @@ -302,12 +302,12 @@ public function getLanguage() { $language = $this->store->getConfig('payment/paynl/language'); - if ($language == 'browser' && isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])){ + if ($language == 'browser' && isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])) { $language = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2); } - if ($language == 'website'){ + if ($language == 'website') { $currentLocaleCode = $this->scopeConfig->getValue('general/locale/code', \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $this->store->getId()); - if (!empty($currentLocaleCode)){ + if (!empty($currentLocaleCode)) { $language = explode('_', $currentLocaleCode)[0]; } } diff --git a/Model/Config/Source/Languages.php b/Model/Config/Source/Languages.php index b1a288d5..a3bd2f4f 100644 --- a/Model/Config/Source/Languages.php +++ b/Model/Config/Source/Languages.php @@ -53,7 +53,7 @@ public function toArray() 'gr' => __('Ελληνικά'), 'jp' => __('日本語'), 'browser' => __('Use browser language'), - 'website' => __('Use website language'), + 'website' => __('Use website language') ]; } } From b39a09d9e805bda7662ace761ee73e4ad0f05245 Mon Sep 17 00:00:00 2001 From: Anne Date: Mon, 25 Nov 2024 10:39:50 +0100 Subject: [PATCH 6/6] Add translations --- Model/Config/Source/Languages.php | 40 +++++++++++++++---------------- i18n/de_AT.csv | 16 ++++++++++++- i18n/de_CH.csv | 16 ++++++++++++- i18n/de_DE.csv | 16 ++++++++++++- i18n/de_LU.csv | 16 ++++++++++++- i18n/en_US.csv | 16 ++++++++++++- i18n/fr_BE.csv | 16 ++++++++++++- i18n/fr_CA.csv | 16 ++++++++++++- i18n/fr_CH.csv | 16 ++++++++++++- i18n/fr_FR.csv | 16 ++++++++++++- i18n/fr_LU.csv | 16 ++++++++++++- i18n/nl_BE.csv | 16 ++++++++++++- i18n/nl_NL.csv | 16 ++++++++++++- 13 files changed, 200 insertions(+), 32 deletions(-) diff --git a/Model/Config/Source/Languages.php b/Model/Config/Source/Languages.php index a3bd2f4f..a03524e8 100644 --- a/Model/Config/Source/Languages.php +++ b/Model/Config/Source/Languages.php @@ -30,28 +30,28 @@ public function toOptionArray() public function toArray() { return [ - 'nl' => __('Nederlands'), + 'nl' => __('Dutch'), 'en' => __('English'), - 'de' => __('Deutsch'), - 'it' => __('Italiano'), - 'fr' => __('Francais'), - 'es' => __('Español'), - 'dk' => __('Dansk'), - 'pl' => __('Polski'), + 'de' => __('German'), + 'it' => __('Italian'), + 'fr' => __('French'), + 'es' => __('Spanish'), + 'dk' => __('Danish'), + 'pl' => __('Polish'), 'us' => __('American'), - 'mx' => __('Mexicano'), - 'hu' => __('Magyar'), - 'no' => __('Norsk'), - 'hr' => __('Hrvatski'), - 'pt' => __('Português'), - 'ro' => __('Română'), - 'sv' => __('Svenska'), - 'sl' => __('Slovenski'), - 'tr' => __('Türk'), - 'fi' => __('Suomalainen'), - 'cz' => __('Česky'), - 'gr' => __('Ελληνικά'), - 'jp' => __('日本語'), + 'mx' => __('Mexican'), + 'hu' => __('Hungarian'), + 'no' => __('Norwegian'), + 'hr' => __('Croatian'), + 'pt' => __('Portuguese'), + 'ro' => __('Romanian'), + 'sv' => __('Swedish'), + 'sl' => __('Slovenian'), + 'tr' => __('Turkish'), + 'fi' => __('Finnish'), + 'cz' => __('Czech'), + 'gr' => __('Greek'), + 'jp' => __('Japanese'), 'browser' => __('Use browser language'), 'website' => __('Use website language') ]; diff --git a/i18n/de_AT.csv b/i18n/de_AT.csv index 2a42fbc7..e5692300 100644 --- a/i18n/de_AT.csv +++ b/i18n/de_AT.csv @@ -300,4 +300,18 @@ Diese Einstellung wirkt sich nicht auf die Produktseite aus. Wenn der schnelle C "Show intermediate screen to select shipping method","Zwischenbildschirm zur Auswahl der Versandart anzeigen" "Thank you for your purchase, as soon as the payment is completed you will receive an email.","Vielen Dank für Ihren Kauf, sobald die Zahlung abgeschlossen ist, erhalten Sie eine E-Mail." "Use browser language","Browsersprache verwenden" -"Use website language","Verwenden Sie die Website-Sprache" \ No newline at end of file +"Use website language","Verwenden Sie die Website-Sprache" +"American","Amerikanisch" +"Mexican","Mexikaner" +"Hungarian","Ungarisch" +"Norwegian","Norwegisch" +"Croatian","Kroatisch" +"Portuguese","Portugiesisch" +"Romanian","Rumänisch" +"Swedish","Schwedisch" +"Slovenian","Slowenisch" +"Turkish","Türkisch" +"Finnish","Finnisch" +"Czech","Tschechisch" +"Greek","Griechisch" +"Japanese","Japanisch" \ No newline at end of file diff --git a/i18n/de_CH.csv b/i18n/de_CH.csv index 8ade399e..4b1ed5de 100644 --- a/i18n/de_CH.csv +++ b/i18n/de_CH.csv @@ -302,4 +302,18 @@ Diese Einstellung wirkt sich nicht auf die Produktseite aus. Wenn der schnelle C "Show intermediate screen to select shipping method","Zwischenbildschirm zur Auswahl der Versandart anzeigen" "Thank you for your purchase, as soon as the payment is completed you will receive an email.","Vielen Dank für Ihren Kauf, sobald die Zahlung abgeschlossen ist, erhalten Sie eine E-Mail." "Use browser language","Browsersprache verwenden" -"Use website language","Verwenden Sie die Website-Sprache" \ No newline at end of file +"Use website language","Verwenden Sie die Website-Sprache" +"American","Amerikanisch" +"Mexican","Mexikaner" +"Hungarian","Ungarisch" +"Norwegian","Norwegisch" +"Croatian","Kroatisch" +"Portuguese","Portugiesisch" +"Romanian","Rumänisch" +"Swedish","Schwedisch" +"Slovenian","Slowenisch" +"Turkish","Türkisch" +"Finnish","Finnisch" +"Czech","Tschechisch" +"Greek","Griechisch" +"Japanese","Japanisch" \ No newline at end of file diff --git a/i18n/de_DE.csv b/i18n/de_DE.csv index 8ade399e..4b1ed5de 100644 --- a/i18n/de_DE.csv +++ b/i18n/de_DE.csv @@ -302,4 +302,18 @@ Diese Einstellung wirkt sich nicht auf die Produktseite aus. Wenn der schnelle C "Show intermediate screen to select shipping method","Zwischenbildschirm zur Auswahl der Versandart anzeigen" "Thank you for your purchase, as soon as the payment is completed you will receive an email.","Vielen Dank für Ihren Kauf, sobald die Zahlung abgeschlossen ist, erhalten Sie eine E-Mail." "Use browser language","Browsersprache verwenden" -"Use website language","Verwenden Sie die Website-Sprache" \ No newline at end of file +"Use website language","Verwenden Sie die Website-Sprache" +"American","Amerikanisch" +"Mexican","Mexikaner" +"Hungarian","Ungarisch" +"Norwegian","Norwegisch" +"Croatian","Kroatisch" +"Portuguese","Portugiesisch" +"Romanian","Rumänisch" +"Swedish","Schwedisch" +"Slovenian","Slowenisch" +"Turkish","Türkisch" +"Finnish","Finnisch" +"Czech","Tschechisch" +"Greek","Griechisch" +"Japanese","Japanisch" \ No newline at end of file diff --git a/i18n/de_LU.csv b/i18n/de_LU.csv index 263c0c9b..e1b8f43a 100644 --- a/i18n/de_LU.csv +++ b/i18n/de_LU.csv @@ -303,4 +303,18 @@ Diese Einstellung wirkt sich nicht auf die Produktseite aus. Wenn der schnelle C "Show intermediate screen to select shipping method","Zwischenbildschirm zur Auswahl der Versandart anzeigen" "Thank you for your purchase, as soon as the payment is completed you will receive an email.","Vielen Dank für Ihren Kauf, sobald die Zahlung abgeschlossen ist, erhalten Sie eine E-Mail." "Use browser language","Browsersprache verwenden" -"Use website language","Verwenden Sie die Website-Sprache" \ No newline at end of file +"Use website language","Verwenden Sie die Website-Sprache" +"American","Amerikanisch" +"Mexican","Mexikaner" +"Hungarian","Ungarisch" +"Norwegian","Norwegisch" +"Croatian","Kroatisch" +"Portuguese","Portugiesisch" +"Romanian","Rumänisch" +"Swedish","Schwedisch" +"Slovenian","Slowenisch" +"Turkish","Türkisch" +"Finnish","Finnisch" +"Czech","Tschechisch" +"Greek","Griechisch" +"Japanese","Japanisch" \ No newline at end of file diff --git a/i18n/en_US.csv b/i18n/en_US.csv index 7eb29e1e..22172eae 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -367,4 +367,18 @@ This setting does not effect the product page. If fast checkout is enabled for t "Show intermediate screen to select shipping method","Show intermediate screen to select shipping method" "Thank you for your purchase, as soon as the payment is completed you will receive an email.","Thank you for your purchase, as soon as the payment is completed you will receive an email." "Use browser language","Use browser language" -"Use website language","Use website language" \ No newline at end of file +"Use website language","Use website language" +"American","American" +"Mexican","Mexican" +"Hungarian","Hungarian" +"Norwegian","Norwegian" +"Croatian","Croatian" +"Portuguese","Portuguese" +"Romanian","Romanian" +"Swedish","Swedish" +"Slovenian","Slovenian" +"Turkish","Turkish" +"Finnish","Finnish" +"Czech","Czech" +"Greek","Greek" +"Japanese","Japanese" \ No newline at end of file diff --git a/i18n/fr_BE.csv b/i18n/fr_BE.csv index ccdd853f..7a21981e 100644 --- a/i18n/fr_BE.csv +++ b/i18n/fr_BE.csv @@ -304,4 +304,18 @@ Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé p "Show intermediate screen to select shipping method","Afficher l'écran intermédiaire pour sélectionner la méthode d'expédition" "Thank you for your purchase, as soon as the payment is completed you will receive an email.","Nous vous remercions pour votre commande. Dès que le paiement aura été traité, vous recevrez un e-mail." "Use browser language","Utiliser la langue du navigateur" -"Use website language","Utiliser la langue du site Web" \ No newline at end of file +"Use website language","Utiliser la langue du site Web" +"American","Américain" +"Mexican","Mexicain" +"Hungarian","Hongrois" +"Norwegian","Norvégien" +"Croatian","Croate" +"Portuguese","Portugais" +"Romanian","Roumain" +"Swedish","Suédois" +"Slovenian","Slovène" +"Turkish","Turc" +"Finnish","Finlandais" +"Czech","Tchèque" +"Greek","Grec" +"Japanese","Japonais" \ No newline at end of file diff --git a/i18n/fr_CA.csv b/i18n/fr_CA.csv index ccdd853f..7a21981e 100644 --- a/i18n/fr_CA.csv +++ b/i18n/fr_CA.csv @@ -304,4 +304,18 @@ Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé p "Show intermediate screen to select shipping method","Afficher l'écran intermédiaire pour sélectionner la méthode d'expédition" "Thank you for your purchase, as soon as the payment is completed you will receive an email.","Nous vous remercions pour votre commande. Dès que le paiement aura été traité, vous recevrez un e-mail." "Use browser language","Utiliser la langue du navigateur" -"Use website language","Utiliser la langue du site Web" \ No newline at end of file +"Use website language","Utiliser la langue du site Web" +"American","Américain" +"Mexican","Mexicain" +"Hungarian","Hongrois" +"Norwegian","Norvégien" +"Croatian","Croate" +"Portuguese","Portugais" +"Romanian","Roumain" +"Swedish","Suédois" +"Slovenian","Slovène" +"Turkish","Turc" +"Finnish","Finlandais" +"Czech","Tchèque" +"Greek","Grec" +"Japanese","Japonais" \ No newline at end of file diff --git a/i18n/fr_CH.csv b/i18n/fr_CH.csv index ccdd853f..7a21981e 100644 --- a/i18n/fr_CH.csv +++ b/i18n/fr_CH.csv @@ -304,4 +304,18 @@ Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé p "Show intermediate screen to select shipping method","Afficher l'écran intermédiaire pour sélectionner la méthode d'expédition" "Thank you for your purchase, as soon as the payment is completed you will receive an email.","Nous vous remercions pour votre commande. Dès que le paiement aura été traité, vous recevrez un e-mail." "Use browser language","Utiliser la langue du navigateur" -"Use website language","Utiliser la langue du site Web" \ No newline at end of file +"Use website language","Utiliser la langue du site Web" +"American","Américain" +"Mexican","Mexicain" +"Hungarian","Hongrois" +"Norwegian","Norvégien" +"Croatian","Croate" +"Portuguese","Portugais" +"Romanian","Roumain" +"Swedish","Suédois" +"Slovenian","Slovène" +"Turkish","Turc" +"Finnish","Finlandais" +"Czech","Tchèque" +"Greek","Grec" +"Japanese","Japonais" \ No newline at end of file diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv index 14e9c867..a04667d8 100644 --- a/i18n/fr_FR.csv +++ b/i18n/fr_FR.csv @@ -304,4 +304,18 @@ Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé p "Show intermediate screen to select shipping method","Afficher l'écran intermédiaire pour sélectionner la méthode d'expédition" "Thank you for your purchase, as soon as the payment is completed you will receive an email.","Nous vous remercions pour votre commande. Dès que le paiement aura été traité, vous recevrez un e-mail." "Use browser language","Utiliser la langue du navigateur" -"Use website language","Utiliser la langue du site Web" \ No newline at end of file +"Use website language","Utiliser la langue du site Web" +"American","Américain" +"Mexican","Mexicain" +"Hungarian","Hongrois" +"Norwegian","Norvégien" +"Croatian","Croate" +"Portuguese","Portugais" +"Romanian","Roumain" +"Swedish","Suédois" +"Slovenian","Slovène" +"Turkish","Turc" +"Finnish","Finlandais" +"Czech","Tchèque" +"Greek","Grec" +"Japanese","Japonais" \ No newline at end of file diff --git a/i18n/fr_LU.csv b/i18n/fr_LU.csv index 237ce1e7..a8707893 100644 --- a/i18n/fr_LU.csv +++ b/i18n/fr_LU.csv @@ -303,4 +303,18 @@ Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé p "Show intermediate screen to select shipping method","Afficher l'écran intermédiaire pour sélectionner la méthode d'expédition" "Thank you for your purchase, as soon as the payment is completed you will receive an email.","Nous vous remercions pour votre commande. Dès que le paiement aura été traité, vous recevrez un e-mail." "Use browser language","Utiliser la langue du navigateur" -"Use website language","Utiliser la langue du site Web" \ No newline at end of file +"Use website language","Utiliser la langue du site Web" +"American","Américain" +"Mexican","Mexicain" +"Hungarian","Hongrois" +"Norwegian","Norvégien" +"Croatian","Croate" +"Portuguese","Portugais" +"Romanian","Roumain" +"Swedish","Suédois" +"Slovenian","Slovène" +"Turkish","Turc" +"Finnish","Finlandais" +"Czech","Tchèque" +"Greek","Grec" +"Japanese","Japonais" \ No newline at end of file diff --git a/i18n/nl_BE.csv b/i18n/nl_BE.csv index 7f7b4836..7f008e40 100644 --- a/i18n/nl_BE.csv +++ b/i18n/nl_BE.csv @@ -361,4 +361,18 @@ Deze instelling heeft geen effect op de productpagina. Als snel bestellen is ing "Show intermediate screen to select shipping method","Toon tussenscherm om verzendmethode te selecteren" "Thank you for your purchase, as soon as the payment is completed you will receive an email.","Bedankt voor uw bestelling, zodra de betaling afgerond is ontvangt u een email." "Use browser language","Gebruik browsertaal" -"Use website language","Gebruik websitetaal" \ No newline at end of file +"Use website language","Gebruik websitetaal" +"American","Amerikaans" +"Mexican","Mexicaans" +"Hungarian","Hongaars" +"Norwegian","Noors" +"Croatian","Kroatisch" +"Portuguese","Portugees" +"Romanian","Roemeense" +"Swedish","Zweeds" +"Slovenian","Sloveens" +"Turkish","Turks" +"Finnish","Fins" +"Czech","Tsjechisch" +"Greek","Grieks" +"Japanese","Japans" \ No newline at end of file diff --git a/i18n/nl_NL.csv b/i18n/nl_NL.csv index 4f9301a9..4dda7081 100644 --- a/i18n/nl_NL.csv +++ b/i18n/nl_NL.csv @@ -353,4 +353,18 @@ Deze instelling heeft geen effect op de productpagina. Als snel bestellen is ing "Show intermediate screen to select shipping method","Toon tussenscherm om verzendmethode te selecteren" "Thank you for your purchase, as soon as the payment is completed you will receive an email.","Bedankt voor uw bestelling, zodra de betaling afgerond is ontvangt u een email." "Use browser language","Gebruik browsertaal" -"Use website language","Gebruik websitetaal" \ No newline at end of file +"Use website language","Gebruik websitetaal" +"American","Amerikaans" +"Mexican","Mexicaans" +"Hungarian","Hongaars" +"Norwegian","Noors" +"Croatian","Kroatisch" +"Portuguese","Portugees" +"Romanian","Roemeense" +"Swedish","Zweeds" +"Slovenian","Sloveens" +"Turkish","Turks" +"Finnish","Fins" +"Czech","Tsjechisch" +"Greek","Grieks" +"Japanese","Japans" \ No newline at end of file