Skip to content

Commit

Permalink
Merge pull request #45 from paynl/feature/PLUG-991
Browse files Browse the repository at this point in the history
PLUG-991 - Updated texts
  • Loading branch information
woutse authored Jun 17, 2022
2 parents b8be4ba + b402ffd commit 6639af0
Show file tree
Hide file tree
Showing 11 changed files with 68 additions and 39 deletions.
39 changes: 39 additions & 0 deletions Model/Config/Source/InstorePickupAddress.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

namespace Paynl\Payment\Model\Config\Source;

use \Magento\Framework\Option\ArrayInterface;

class InstorePickupAddress implements ArrayInterface
{

/**
* Options getter
*
* @return array
*/
public function toOptionArray()
{
$arrOptions = $this->toArray();

$arrResult = [];
foreach ($arrOptions as $value => $label) {
$arrResult[] = ['value' => $value, 'label' => $label];
}
return $arrResult;
}

/**
* Get options in "key-value" format
*
* @return array
*/

public function toArray()
{
return [
'0' => __('Leave shipping address unchanged (Default)'),
'1' => __('Use billing address as shipping address'),
];
}
}
6 changes: 3 additions & 3 deletions etc/adminhtml/paymentmethods/afterpay.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@
<comment><![CDATA[Set to `Yes` to disable creating invoices for business orders]]></comment>
</field>
<field id="forcebilling" translate="label" type="select" sortOrder="160" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Force Billing Address for Instore Pickups</label>
<label>Instore Pickup Address</label>
<depends>
<field id="active">1</field>
</depends>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<source_model>Paynl\Payment\Model\Config\Source\InstorePickupAddress</source_model>
<config_path>payment/paynl_payment_afterpay/useBillingAddressInstorePickup</config_path>
<comment><![CDATA[Use the Billing address as Shipping address for instore pickups.]]></comment>
<comment><![CDATA[Select how shipping address should be handled in case of instore pickup.]]></comment>
</field>
<group id="advanced" translate="label" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Advanced</label>
Expand Down
6 changes: 3 additions & 3 deletions etc/adminhtml/paymentmethods/afterpay_international.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@
<comment><![CDATA[Set to `Yes` to disable creating invoices for business orders]]></comment>
</field>
<field id="forcebilling" translate="label" type="select" sortOrder="160" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Force Billing Address for Instore Pickups</label>
<label>Instore Pickup Address</label>
<depends>
<field id="active">1</field>
</depends>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<source_model>Paynl\Payment\Model\Config\Source\InstorePickupAddress</source_model>
<config_path>payment/paynl_payment_afterpay_international/useBillingAddressInstorePickup</config_path>
<comment><![CDATA[Use the Billing address as Shipping address for instore pickups.]]></comment>
<comment><![CDATA[Select how shipping address should be handled in case of instore pickup.]]></comment>
</field>
<group id="advanced" translate="label" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Advanced</label>
Expand Down
6 changes: 3 additions & 3 deletions etc/adminhtml/paymentmethods/billink.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@
<comment><![CDATA[Set to `Yes` to disable creating invoices for business orders]]></comment>
</field>
<field id="forcebilling" translate="label" type="select" sortOrder="160" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Force Billing Address for Instore Pickups</label>
<label>Instore Pickup Address</label>
<depends>
<field id="active">1</field>
</depends>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<source_model>Paynl\Payment\Model\Config\Source\InstorePickupAddress</source_model>
<config_path>payment/paynl_payment_billink/useBillingAddressInstorePickup</config_path>
<comment><![CDATA[Use the Billing address as Shipping address for instore pickups.]]></comment>
<comment><![CDATA[Select how shipping address should be handled in case of instore pickup.]]></comment>
</field>
<group id="advanced" translate="label" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Advanced</label>
Expand Down
7 changes: 3 additions & 4 deletions etc/adminhtml/paymentmethods/capayable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@
<comment><![CDATA[Set to `Yes` to disable creating invoices for business orders]]></comment>
</field>
<field id="forcebilling" translate="label" type="select" sortOrder="160" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Force Billing Address for Instore Pickups</label>
<label>Instore Pickup Address</label>
<depends>
<field id="active">1</field>
</depends>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<source_model>Paynl\Payment\Model\Config\Source\InstorePickupAddress</source_model>
<config_path>payment/paynl_payment_capayable/useBillingAddressInstorePickup</config_path>
<comment><![CDATA[Use the Billing address as Shipping address for instore pickups.]]></comment>
<comment><![CDATA[Select how shipping address should be handled in case of instore pickup.]]></comment>
</field>
<group id="advanced" translate="label" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Advanced</label>
Expand All @@ -192,4 +192,3 @@
</group>
</group>
</include>

10 changes: 0 additions & 10 deletions etc/adminhtml/paymentmethods/capayable_gespreid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,6 @@
<config_path>payment/paynl_payment_capayable_gespreid/turn_off_invoices_b2b</config_path>
<comment><![CDATA[Set to `Yes` to disable creating invoices for business orders]]></comment>
</field>
<field id="forcebilling" translate="label" type="select" sortOrder="160" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Force Billing Address for Instore Pickups</label>
<depends>
<field id="active">1</field>
</depends>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<config_path>payment/paynl_payment_capayable_gespreid/useBillingAddressInstorePickup</config_path>
<comment><![CDATA[Use the Billing address as Shipping address for instore pickups.]]></comment>
</field>
<group id="advanced" translate="label" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Advanced</label>
<field id="payment_option_id" translate="label comment" type="text" sortOrder="10" showInDefault="1"
Expand All @@ -192,4 +183,3 @@
</group>
</group>
</include>

7 changes: 3 additions & 4 deletions etc/adminhtml/paymentmethods/focum.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@
<comment><![CDATA[Set to `Yes` to disable creating invoices for business orders]]></comment>
</field>
<field id="forcebilling" translate="label" type="select" sortOrder="160" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Force Billing Address for Instore Pickups</label>
<label>Instore Pickup Address</label>
<depends>
<field id="active">1</field>
</depends>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<source_model>Paynl\Payment\Model\Config\Source\InstorePickupAddress</source_model>
<config_path>payment/paynl_payment_focum/useBillingAddressInstorePickup</config_path>
<comment><![CDATA[Use the Billing address as Shipping address for instore pickups.]]></comment>
<comment><![CDATA[Select how shipping address should be handled in case of instore pickup.]]></comment>
</field>
<group id="advanced" translate="label" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Advanced</label>
Expand All @@ -192,4 +192,3 @@
</group>
</group>
</include>

7 changes: 3 additions & 4 deletions etc/adminhtml/paymentmethods/klarna.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@
<comment><![CDATA[Set to `Yes` to disable creating invoices for business orders]]></comment>
</field>
<field id="forcebilling" translate="label" type="select" sortOrder="160" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Force Billing Address for Instore Pickups</label>
<label>Instore Pickup Address</label>
<depends>
<field id="active">1</field>
</depends>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<source_model>Paynl\Payment\Model\Config\Source\InstorePickupAddress</source_model>
<config_path>payment/paynl_payment_klarna/useBillingAddressInstorePickup</config_path>
<comment><![CDATA[Use the Billing address as Shipping address for instore pickups.]]></comment>
<comment><![CDATA[Select how shipping address should be handled in case of instore pickup.]]></comment>
</field>
<group id="advanced" translate="label" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Advanced</label>
Expand All @@ -192,4 +192,3 @@
</group>
</group>
</include>

7 changes: 3 additions & 4 deletions etc/adminhtml/paymentmethods/spraypay.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@
<comment><![CDATA[Show payment method only to specific customer groups.]]></comment>
</field>
<field id="forcebilling" translate="label" type="select" sortOrder="160" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Force Billing Address for Instore Pickups</label>
<label>Instore Pickup Address</label>
<depends>
<field id="active">1</field>
</depends>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<source_model>Paynl\Payment\Model\Config\Source\InstorePickupAddress</source_model>
<config_path>payment/paynl_payment_spraypay/useBillingAddressInstorePickup</config_path>
<comment><![CDATA[Use the Billing address as Shipping address for instore pickups.]]></comment>
<comment><![CDATA[Select how shipping address should be handled in case of instore pickup.]]></comment>
</field>
<group id="advanced" translate="label" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Advanced</label>
Expand All @@ -183,4 +183,3 @@
</group>
</group>
</include>

6 changes: 4 additions & 2 deletions i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,11 @@
"You must first agree to the payment terms.","You must first agree to the payment terms."
"Yes, as dropdown","Yes, as dropdown"
"Yes, as list","Yes, as list"
"Force Billing Address for Instore Pickups","Force Billing Address for Instore Pickups"
"Use the Billing address as Shipping address for instore pickups.","Use the Billing address as Shipping address for instore pickups."
"Instore Pickup Address","Instore Pickup Address"
"Select how shipping address should be handled in case of instore pickup.","Select how shipping address should be handled in case of instore pickup."
"Transfer analytics to PAY.","Transfer analytics to PAY."
"Disable","Disable"
"Select whether you want to use PAY. as Google Analytics proxy.","Select whether you want to use PAY. as Google Analytics proxy."
"Set which product data to use as product ID in the PAY. backend.","Stel in welke productgegevens u wilt gebruiken als product-ID in de PAY. backend."
"Leave shipping address unchanged (Default)","Leave shipping address unchanged (Default)"
"Use billing address as shipping address","Use billing address as shipping address"
6 changes: 4 additions & 2 deletions i18n/nl_NL.csv
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,11 @@
"You must first agree to the payment terms.","U dient eerst akkoord te gaan met de betalingsvoorwaarden."
"Yes, as dropdown","Ja, als dropdown"
"Yes, as list","Ja, als lijst"
"Force Billing Address for Instore Pickups","Factuuradres forceren voor afhalingen in de winkel"
"Use the Billing address as Shipping address for instore pickups.","Gebruik factuuradres als bezorgadres voor het afhalen in de winkel."
"Instore Pickup Address","Instore Pickup Address"
"Select how shipping address should be handled in case of instore pickup.","Selecteer hoe om te gaan met bezorgadres in het gaval van Instore Pickup."
"Transfer analytics to PAY.","Stuur analytics via PAY."
"Disable","Uitzetten"
"Select whether you want to use PAY. as Google Analytics proxy.","Geef aan of u PAY. als Google Analytics proxy wilt gebruiken."
"Set which product data to use as product ID in the PAY. backend.","Set which product data to use as product ID in the PAY. backend."
"Leave shipping address unchanged (Default)","Pas verzendadres niet aan (standaard)"
"Use billing address as shipping address","Gebruik factuuradres als verzendadres"

0 comments on commit 6639af0

Please sign in to comment.