Skip to content

Commit

Permalink
Move the Payment booster view logic (#18) (#21)
Browse files Browse the repository at this point in the history
* Move the Payment booster view logic

* Move the Payment booster view logic - update Life element options

---------

Co-authored-by: pavel-bystritskyi <[email protected]>
Co-authored-by: Pavel Bystritsky <[email protected]>
Co-authored-by: MykolaMalovanets <[email protected]>
  • Loading branch information
4 people authored Jun 19, 2024
1 parent b5fe2ce commit af1156e
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);

namespace Bold\CheckoutFlowPaypal\Plugin\Checkout\Block\System\Config\Form\Field\Location;

use Bold\Checkout\Block\System\Config\Form\Field\Location;

/**
* Add PayPal-specific Life element options.
*/
class AddPayPalOptionPlugin
{
/**
* Add PayPal-specific Life element options.
*
* @param Location $subject
* @param array $result
* @return array
*/
public function afterGetSourceOptions(Location $subject, array $result): array
{
return array_merge(
$result,
[
[
'label' => '(PayPal Checkout Flow only) On the additional information page',
'value' => 'paypal_additional_information',
],
]
);
}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"license": [
"MIT"
],
"version": "1.0.3",
"version": "1.1.0",
"require": {
"bold-commerce/module-checkout": "^1.1.24",
"bold-commerce/module-checkout": "^2.0.0",
"magento/framework": ">=102.0.1 <103.0.8",
"magento/module-store": ">=101.0.1 <101.1.8"
},
Expand Down
6 changes: 6 additions & 0 deletions etc/adminhtml/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@
</argument>
</arguments>
</type>
<type name="Bold\Checkout\Block\System\Config\Form\Field\Location">
<plugin
name="bold_checkout_flow_paypal_add_life_option"
type="Bold\CheckoutFlowPaypal\Plugin\Checkout\Block\System\Config\Form\Field\Location\AddPayPalOptionPlugin"
/>
</type>
</config>
2 changes: 1 addition & 1 deletion etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<system>
<section id="checkout">
<group id="bold_checkout_paypal" translate="label" sortOrder="115" showInDefault="1" showInWebsite="1">
<label>Bold Checkout PayPal Integration</label>
<label>Bold Checkout PayPal Integration Extension</label>
<field id="is_enabled" translate="label" type="hidden" sortOrder="10" showInDefault="1"
showInWebsite="1">
<frontend_model>Bold\CheckoutFlowPaypal\Block\System\Config\Form\Field\Disabled</frontend_model>
Expand Down

0 comments on commit af1156e

Please sign in to comment.