Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

gift card options bug #370

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ public function getGiftCardProductProvider(): array
[
'productOptions' => [
[
'label' => 'Amount',
'render_type' => 'drop_down',
'type' => 'giftcard',
'values' => [
// phpcs:ignore Magento2.Functions.DiscouragedFunction
Expand All @@ -198,10 +200,18 @@ public function getGiftCardProductProvider(): array
]
],
'productShopperInputOptions' => [
// phpcs:ignore Magento2.Functions.DiscouragedFunction
['id' => \base64_encode('giftcard/giftcard_recipient_name')],
// phpcs:ignore Magento2.Functions.DiscouragedFunction
['id' => \base64_encode('giftcard/giftcard_sender_name')]
[
// phpcs:ignore Magento2.Functions.DiscouragedFunction
'id' => \base64_encode('giftcard/giftcard_sender_name'),
'label' => 'Sender Name',
'render_type' => 'text'
],
[
// phpcs:ignore Magento2.Functions.DiscouragedFunction
'id' => \base64_encode('giftcard/giftcard_recipient_name'),
'label' => 'Recipient Name',
'render_type' => 'text'
]
]
]
];
Expand All @@ -210,6 +220,7 @@ public function getGiftCardProductProvider(): array
/**
* Virtual gift card with fixed and open amount data provider
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @return array
*/
public function getVirtualMultiWebsiteDataProvider(): array
Expand All @@ -218,6 +229,8 @@ public function getVirtualMultiWebsiteDataProvider(): array
[
'defaultWebsiteOptions' => [
[
'label' => 'Amount',
'render_type' => 'drop_down',
'type' => 'giftcard',
'values' => [
// phpcs:ignore Magento2.Functions.DiscouragedFunction
Expand All @@ -228,17 +241,35 @@ public function getVirtualMultiWebsiteDataProvider(): array
]
],
'defaultWebsiteInputOptions' => [
// phpcs:ignore Magento2.Functions.DiscouragedFunction
['id' => \base64_encode('giftcard/giftcard_recipient_name')],
// phpcs:ignore Magento2.Functions.DiscouragedFunction
['id' => \base64_encode('giftcard/giftcard_sender_name')],
// phpcs:ignore Magento2.Functions.DiscouragedFunction
['id' => \base64_encode('giftcard/giftcard_recipient_email')],
// phpcs:ignore Magento2.Functions.DiscouragedFunction
['id' => \base64_encode('giftcard/giftcard_sender_email')],
[
// phpcs:ignore Magento2.Functions.DiscouragedFunction
'id' => \base64_encode('giftcard/giftcard_sender_name'),
'label' => 'Sender Name',
'render_type' => 'text'
],
[
// phpcs:ignore Magento2.Functions.DiscouragedFunction
'id' => \base64_encode('giftcard/giftcard_recipient_name'),
'label' => 'Recipient Name',
'render_type' => 'text'
],
[
// phpcs:ignore Magento2.Functions.DiscouragedFunction
'id' => \base64_encode('giftcard/giftcard_sender_email'),
'label' => 'Sender Email',
'render_type' => 'email'
],
[
// phpcs:ignore Magento2.Functions.DiscouragedFunction
'id' => \base64_encode('giftcard/giftcard_recipient_email'),
'label' => 'Recipient Email',
'render_type' => 'email'
],
[
// phpcs:ignore Magento2.Functions.DiscouragedFunction
'id' => \base64_encode('giftcard/giftcard_message'),
'label' => 'Message',
'render_type' => 'text',
'range' => [
'from' => 0.0,
'to' => 255.0
Expand All @@ -247,6 +278,8 @@ public function getVirtualMultiWebsiteDataProvider(): array
[
// phpcs:ignore Magento2.Functions.DiscouragedFunction
'id' => \base64_encode('giftcard/custom_giftcard_amount'),
'label' => 'Amount in',
'render_type' => 'giftcardopenamount',
'range' => [
'from' => 100.0,
'to' => 150.0
Expand All @@ -255,6 +288,8 @@ public function getVirtualMultiWebsiteDataProvider(): array
],
'secondWebsiteOptions' => [
[
'label' => 'Amount',
'render_type' => 'drop_down',
'type' => 'giftcard',
'values' => [
// phpcs:ignore Magento2.Functions.DiscouragedFunction
Expand All @@ -265,17 +300,35 @@ public function getVirtualMultiWebsiteDataProvider(): array
]
],
'secondWebsiteInputOptions' => [
// phpcs:ignore Magento2.Functions.DiscouragedFunction
['id' => \base64_encode('giftcard/giftcard_recipient_name')],
// phpcs:ignore Magento2.Functions.DiscouragedFunction
['id' => \base64_encode('giftcard/giftcard_sender_name')],
// phpcs:ignore Magento2.Functions.DiscouragedFunction
['id' => \base64_encode('giftcard/giftcard_recipient_email')],
// phpcs:ignore Magento2.Functions.DiscouragedFunction
['id' => \base64_encode('giftcard/giftcard_sender_email')],
[
// phpcs:ignore Magento2.Functions.DiscouragedFunction
'id' => \base64_encode('giftcard/giftcard_sender_name'),
'label' => 'Sender Name',
'render_type' => 'text'
],
[
// phpcs:ignore Magento2.Functions.DiscouragedFunction
'id' => \base64_encode('giftcard/giftcard_recipient_name'),
'label' => 'Recipient Name',
'render_type' => 'text'
],
[
// phpcs:ignore Magento2.Functions.DiscouragedFunction
'id' => \base64_encode('giftcard/giftcard_sender_email'),
'label' => 'Sender Email',
'render_type' => 'email'
],
[
// phpcs:ignore Magento2.Functions.DiscouragedFunction
'id' => \base64_encode('giftcard/giftcard_recipient_email'),
'label' => 'Recipient Email',
'render_type' => 'email'
],
[
// phpcs:ignore Magento2.Functions.DiscouragedFunction
'id' => \base64_encode('giftcard/giftcard_message'),
'label' => 'Message',
'render_type' => 'text',
'range' => [
'from' => 0.0,
'to' => 255.0
Expand All @@ -284,6 +337,8 @@ public function getVirtualMultiWebsiteDataProvider(): array
[
// phpcs:ignore Magento2.Functions.DiscouragedFunction
'id' => \base64_encode('giftcard/custom_giftcard_amount'),
'label' => 'Amount in',
'render_type' => 'giftcardopenamount',
'range' => [
'from' => 100.0,
'to' => 150.0
Expand Down