How to add custom dropdown in checkout page magento2 [closed]How to add custom checkout fields and save them in db?magento2 how to override or custom input checkoutHow to add custom dropdown on customer address checkout in Magento2Magento 2 how to add city dropdownAdd custom dropdown after shipping in checkout and generate options by API callWhere to add custom JS for checkout page after the page is loadedHow to add dropdown in checkout page after shipping method in Magento 2Add custom required field validation on checkout page Magento 2Magento2 : How to add city field to dropdown on checkout page?Need to add dropdown menu to magento 2 checkout page city fieldHow to call my custom countries dropdown list in magento2
Comparing and find out which feature has highest shape area in QGIS?
Why only the fundamental frequency component is said to give useful power?
Confusion about off peak timings of London trains
Should I give professor gift at the beginning of my PhD?
Are "living" organ banks practical?
What's the name of this light airplane?
When did Linux kernel become libre software?
Best way to deal with non-developers in a scrum team
How to tell your grandparent to not come to fetch you with their car?
Why don’t airliners have temporary liveries?
Is there a word for a man who behaves like a woman?
Should an arbiter claim draw at a K+R vs K+R endgame?
How can drunken, homicidal elves successfully conduct a wild hunt?
What are the peak hours for public transportation in Paris?
How to retract an idea already pitched to an employer?
Different pedals/effects for low strings/notes than high
How to project 3d image in the planes xy, xz, yz?
Genetic limitations to learn certain instruments
Is open-sourcing the code of a webapp not recommended?
What's up with this leaf?
Preventing Employees from either switching to Competitors or Opening Their Own Business
Where does "0 packages can be updated." come from?
Is it possible to 'live off the sea'
PhD - Well known professor or well known school?
How to add custom dropdown in checkout page magento2 [closed]
How to add custom checkout fields and save them in db?magento2 how to override or custom input checkoutHow to add custom dropdown on customer address checkout in Magento2Magento 2 how to add city dropdownAdd custom dropdown after shipping in checkout and generate options by API callWhere to add custom JS for checkout page after the page is loadedHow to add dropdown in checkout page after shipping method in Magento 2Add custom required field validation on checkout page Magento 2Magento2 : How to add city field to dropdown on checkout page?Need to add dropdown menu to magento 2 checkout page city fieldHow to call my custom countries dropdown list in magento2
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I want to add custom dropdown in checkout page where dropdown contain following value:option1 and option2
magento2 magento-2.1 magento2.3
closed as off-topic by Manashvi Birla, 7ochem, Shoaib Munir, Jai, Piyush May 29 at 11:26
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions on problems in code you've written must describe the specific problem and include valid code to reproduce it. For help writing short, self-contained syntactically-valid examples, see: http://sscce.org/" – 7ochem, Shoaib Munir, Piyush
add a comment |
I want to add custom dropdown in checkout page where dropdown contain following value:option1 and option2
magento2 magento-2.1 magento2.3
closed as off-topic by Manashvi Birla, 7ochem, Shoaib Munir, Jai, Piyush May 29 at 11:26
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions on problems in code you've written must describe the specific problem and include valid code to reproduce it. For help writing short, self-contained syntactically-valid examples, see: http://sscce.org/" – 7ochem, Shoaib Munir, Piyush
In which section do you want dropdown like shipping address etc..?
– Chirag Patel
May 29 at 9:54
on which step?
– Amit Bera♦
May 29 at 10:09
Shipping Address @ChiragPatel
– Magento
May 29 at 10:32
Shipping Address @AmitBera
– Magento
May 29 at 10:32
add a comment |
I want to add custom dropdown in checkout page where dropdown contain following value:option1 and option2
magento2 magento-2.1 magento2.3
I want to add custom dropdown in checkout page where dropdown contain following value:option1 and option2
magento2 magento-2.1 magento2.3
magento2 magento-2.1 magento2.3
asked May 29 at 9:51
MagentoMagento
183
183
closed as off-topic by Manashvi Birla, 7ochem, Shoaib Munir, Jai, Piyush May 29 at 11:26
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions on problems in code you've written must describe the specific problem and include valid code to reproduce it. For help writing short, self-contained syntactically-valid examples, see: http://sscce.org/" – 7ochem, Shoaib Munir, Piyush
closed as off-topic by Manashvi Birla, 7ochem, Shoaib Munir, Jai, Piyush May 29 at 11:26
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions on problems in code you've written must describe the specific problem and include valid code to reproduce it. For help writing short, self-contained syntactically-valid examples, see: http://sscce.org/" – 7ochem, Shoaib Munir, Piyush
In which section do you want dropdown like shipping address etc..?
– Chirag Patel
May 29 at 9:54
on which step?
– Amit Bera♦
May 29 at 10:09
Shipping Address @ChiragPatel
– Magento
May 29 at 10:32
Shipping Address @AmitBera
– Magento
May 29 at 10:32
add a comment |
In which section do you want dropdown like shipping address etc..?
– Chirag Patel
May 29 at 9:54
on which step?
– Amit Bera♦
May 29 at 10:09
Shipping Address @ChiragPatel
– Magento
May 29 at 10:32
Shipping Address @AmitBera
– Magento
May 29 at 10:32
In which section do you want dropdown like shipping address etc..?
– Chirag Patel
May 29 at 9:54
In which section do you want dropdown like shipping address etc..?
– Chirag Patel
May 29 at 9:54
on which step?
– Amit Bera♦
May 29 at 10:09
on which step?
– Amit Bera♦
May 29 at 10:09
Shipping Address @ChiragPatel
– Magento
May 29 at 10:32
Shipping Address @ChiragPatel
– Magento
May 29 at 10:32
Shipping Address @AmitBera
– Magento
May 29 at 10:32
Shipping Address @AmitBera
– Magento
May 29 at 10:32
add a comment |
1 Answer
1
active
oldest
votes
Overwrite MagentoCheckoutBlockCheckoutLayoutProcessor process method in your custom module. So create a plugin,
Namespace/CheckoutAdditionalField/Plugin/Checkout/Model/Checkout/LayoutProcessor.php
namespace NamespaceCheckoutAdditionalFieldPluginCheckoutModelCheckout;
class LayoutProcessor
/**
* @param MagentoCheckoutBlockCheckoutLayoutProcessor $subject
* @param array $jsLayout
* @return array
*/
public function afterProcess(
MagentoCheckoutBlockCheckoutLayoutProcessor $subject,
array $jsLayout
)
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
['shippingAddress']['children']['shipping-address-fieldset']['children']['delivery_date'] = [
'component' => 'Magento_Ui/js/form/element/abstract',
'config' => [
'customScope' => 'shippingAddress',
'template' => 'ui/form/field',
'elementTmpl' => 'ui/form/element/date',
'options' => [],
'id' => 'delivery-date'
],
'dataScope' => 'shippingAddress.delivery_date',
'label' => 'Delivery Date',
'provider' => 'checkoutProvider',
'visible' => true,
'validation' => [],
'sortOrder' => 250,
'id' => 'delivery-date'
];
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
['shippingAddress']['children']['shipping-address-fieldset']['children']['drop_down'] = [
'component' => 'Magento_Ui/js/form/element/select',
'config' => [
'customScope' => 'shippingAddress',
'template' => 'ui/form/field',
'elementTmpl' => 'ui/form/element/select',
'id' => 'drop-down',
],
'dataScope' => 'shippingAddress.drop_down',
'label' => 'Drop Down',
'provider' => 'checkoutProvider',
'visible' => true,
'validation' => [],
'sortOrder' => 251,
'id' => 'drop-down',
'options' => [
[
'value' => '',
'label' => 'Please Select',
],
[
'value' => '1',
'label' => 'First Option',
]
]
];
return $jsLayout;
I hope it helps!
How can value store in database? @Chirag Patel
– Magento
May 29 at 10:56
Let me see and get back to you once i found something about save data to database.
– Chirag Patel
May 29 at 10:58
Okay thank you @Chirag Patel
– Magento
May 29 at 11:05
CreateUpgradeSchema.phpfile in your custom module. and follow this to create a field in database magento.stackexchange.com/questions/126036/…
– Chirag Patel
May 29 at 11:32
and How to add dropdown in Review & Payment Step? @Chirag Patel
– Magento
May 30 at 6:42
|
show 2 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Overwrite MagentoCheckoutBlockCheckoutLayoutProcessor process method in your custom module. So create a plugin,
Namespace/CheckoutAdditionalField/Plugin/Checkout/Model/Checkout/LayoutProcessor.php
namespace NamespaceCheckoutAdditionalFieldPluginCheckoutModelCheckout;
class LayoutProcessor
/**
* @param MagentoCheckoutBlockCheckoutLayoutProcessor $subject
* @param array $jsLayout
* @return array
*/
public function afterProcess(
MagentoCheckoutBlockCheckoutLayoutProcessor $subject,
array $jsLayout
)
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
['shippingAddress']['children']['shipping-address-fieldset']['children']['delivery_date'] = [
'component' => 'Magento_Ui/js/form/element/abstract',
'config' => [
'customScope' => 'shippingAddress',
'template' => 'ui/form/field',
'elementTmpl' => 'ui/form/element/date',
'options' => [],
'id' => 'delivery-date'
],
'dataScope' => 'shippingAddress.delivery_date',
'label' => 'Delivery Date',
'provider' => 'checkoutProvider',
'visible' => true,
'validation' => [],
'sortOrder' => 250,
'id' => 'delivery-date'
];
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
['shippingAddress']['children']['shipping-address-fieldset']['children']['drop_down'] = [
'component' => 'Magento_Ui/js/form/element/select',
'config' => [
'customScope' => 'shippingAddress',
'template' => 'ui/form/field',
'elementTmpl' => 'ui/form/element/select',
'id' => 'drop-down',
],
'dataScope' => 'shippingAddress.drop_down',
'label' => 'Drop Down',
'provider' => 'checkoutProvider',
'visible' => true,
'validation' => [],
'sortOrder' => 251,
'id' => 'drop-down',
'options' => [
[
'value' => '',
'label' => 'Please Select',
],
[
'value' => '1',
'label' => 'First Option',
]
]
];
return $jsLayout;
I hope it helps!
How can value store in database? @Chirag Patel
– Magento
May 29 at 10:56
Let me see and get back to you once i found something about save data to database.
– Chirag Patel
May 29 at 10:58
Okay thank you @Chirag Patel
– Magento
May 29 at 11:05
CreateUpgradeSchema.phpfile in your custom module. and follow this to create a field in database magento.stackexchange.com/questions/126036/…
– Chirag Patel
May 29 at 11:32
and How to add dropdown in Review & Payment Step? @Chirag Patel
– Magento
May 30 at 6:42
|
show 2 more comments
Overwrite MagentoCheckoutBlockCheckoutLayoutProcessor process method in your custom module. So create a plugin,
Namespace/CheckoutAdditionalField/Plugin/Checkout/Model/Checkout/LayoutProcessor.php
namespace NamespaceCheckoutAdditionalFieldPluginCheckoutModelCheckout;
class LayoutProcessor
/**
* @param MagentoCheckoutBlockCheckoutLayoutProcessor $subject
* @param array $jsLayout
* @return array
*/
public function afterProcess(
MagentoCheckoutBlockCheckoutLayoutProcessor $subject,
array $jsLayout
)
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
['shippingAddress']['children']['shipping-address-fieldset']['children']['delivery_date'] = [
'component' => 'Magento_Ui/js/form/element/abstract',
'config' => [
'customScope' => 'shippingAddress',
'template' => 'ui/form/field',
'elementTmpl' => 'ui/form/element/date',
'options' => [],
'id' => 'delivery-date'
],
'dataScope' => 'shippingAddress.delivery_date',
'label' => 'Delivery Date',
'provider' => 'checkoutProvider',
'visible' => true,
'validation' => [],
'sortOrder' => 250,
'id' => 'delivery-date'
];
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
['shippingAddress']['children']['shipping-address-fieldset']['children']['drop_down'] = [
'component' => 'Magento_Ui/js/form/element/select',
'config' => [
'customScope' => 'shippingAddress',
'template' => 'ui/form/field',
'elementTmpl' => 'ui/form/element/select',
'id' => 'drop-down',
],
'dataScope' => 'shippingAddress.drop_down',
'label' => 'Drop Down',
'provider' => 'checkoutProvider',
'visible' => true,
'validation' => [],
'sortOrder' => 251,
'id' => 'drop-down',
'options' => [
[
'value' => '',
'label' => 'Please Select',
],
[
'value' => '1',
'label' => 'First Option',
]
]
];
return $jsLayout;
I hope it helps!
How can value store in database? @Chirag Patel
– Magento
May 29 at 10:56
Let me see and get back to you once i found something about save data to database.
– Chirag Patel
May 29 at 10:58
Okay thank you @Chirag Patel
– Magento
May 29 at 11:05
CreateUpgradeSchema.phpfile in your custom module. and follow this to create a field in database magento.stackexchange.com/questions/126036/…
– Chirag Patel
May 29 at 11:32
and How to add dropdown in Review & Payment Step? @Chirag Patel
– Magento
May 30 at 6:42
|
show 2 more comments
Overwrite MagentoCheckoutBlockCheckoutLayoutProcessor process method in your custom module. So create a plugin,
Namespace/CheckoutAdditionalField/Plugin/Checkout/Model/Checkout/LayoutProcessor.php
namespace NamespaceCheckoutAdditionalFieldPluginCheckoutModelCheckout;
class LayoutProcessor
/**
* @param MagentoCheckoutBlockCheckoutLayoutProcessor $subject
* @param array $jsLayout
* @return array
*/
public function afterProcess(
MagentoCheckoutBlockCheckoutLayoutProcessor $subject,
array $jsLayout
)
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
['shippingAddress']['children']['shipping-address-fieldset']['children']['delivery_date'] = [
'component' => 'Magento_Ui/js/form/element/abstract',
'config' => [
'customScope' => 'shippingAddress',
'template' => 'ui/form/field',
'elementTmpl' => 'ui/form/element/date',
'options' => [],
'id' => 'delivery-date'
],
'dataScope' => 'shippingAddress.delivery_date',
'label' => 'Delivery Date',
'provider' => 'checkoutProvider',
'visible' => true,
'validation' => [],
'sortOrder' => 250,
'id' => 'delivery-date'
];
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
['shippingAddress']['children']['shipping-address-fieldset']['children']['drop_down'] = [
'component' => 'Magento_Ui/js/form/element/select',
'config' => [
'customScope' => 'shippingAddress',
'template' => 'ui/form/field',
'elementTmpl' => 'ui/form/element/select',
'id' => 'drop-down',
],
'dataScope' => 'shippingAddress.drop_down',
'label' => 'Drop Down',
'provider' => 'checkoutProvider',
'visible' => true,
'validation' => [],
'sortOrder' => 251,
'id' => 'drop-down',
'options' => [
[
'value' => '',
'label' => 'Please Select',
],
[
'value' => '1',
'label' => 'First Option',
]
]
];
return $jsLayout;
I hope it helps!
Overwrite MagentoCheckoutBlockCheckoutLayoutProcessor process method in your custom module. So create a plugin,
Namespace/CheckoutAdditionalField/Plugin/Checkout/Model/Checkout/LayoutProcessor.php
namespace NamespaceCheckoutAdditionalFieldPluginCheckoutModelCheckout;
class LayoutProcessor
/**
* @param MagentoCheckoutBlockCheckoutLayoutProcessor $subject
* @param array $jsLayout
* @return array
*/
public function afterProcess(
MagentoCheckoutBlockCheckoutLayoutProcessor $subject,
array $jsLayout
)
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
['shippingAddress']['children']['shipping-address-fieldset']['children']['delivery_date'] = [
'component' => 'Magento_Ui/js/form/element/abstract',
'config' => [
'customScope' => 'shippingAddress',
'template' => 'ui/form/field',
'elementTmpl' => 'ui/form/element/date',
'options' => [],
'id' => 'delivery-date'
],
'dataScope' => 'shippingAddress.delivery_date',
'label' => 'Delivery Date',
'provider' => 'checkoutProvider',
'visible' => true,
'validation' => [],
'sortOrder' => 250,
'id' => 'delivery-date'
];
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
['shippingAddress']['children']['shipping-address-fieldset']['children']['drop_down'] = [
'component' => 'Magento_Ui/js/form/element/select',
'config' => [
'customScope' => 'shippingAddress',
'template' => 'ui/form/field',
'elementTmpl' => 'ui/form/element/select',
'id' => 'drop-down',
],
'dataScope' => 'shippingAddress.drop_down',
'label' => 'Drop Down',
'provider' => 'checkoutProvider',
'visible' => true,
'validation' => [],
'sortOrder' => 251,
'id' => 'drop-down',
'options' => [
[
'value' => '',
'label' => 'Please Select',
],
[
'value' => '1',
'label' => 'First Option',
]
]
];
return $jsLayout;
I hope it helps!
answered May 29 at 10:43
Chirag PatelChirag Patel
3,160627
3,160627
How can value store in database? @Chirag Patel
– Magento
May 29 at 10:56
Let me see and get back to you once i found something about save data to database.
– Chirag Patel
May 29 at 10:58
Okay thank you @Chirag Patel
– Magento
May 29 at 11:05
CreateUpgradeSchema.phpfile in your custom module. and follow this to create a field in database magento.stackexchange.com/questions/126036/…
– Chirag Patel
May 29 at 11:32
and How to add dropdown in Review & Payment Step? @Chirag Patel
– Magento
May 30 at 6:42
|
show 2 more comments
How can value store in database? @Chirag Patel
– Magento
May 29 at 10:56
Let me see and get back to you once i found something about save data to database.
– Chirag Patel
May 29 at 10:58
Okay thank you @Chirag Patel
– Magento
May 29 at 11:05
CreateUpgradeSchema.phpfile in your custom module. and follow this to create a field in database magento.stackexchange.com/questions/126036/…
– Chirag Patel
May 29 at 11:32
and How to add dropdown in Review & Payment Step? @Chirag Patel
– Magento
May 30 at 6:42
How can value store in database? @Chirag Patel
– Magento
May 29 at 10:56
How can value store in database? @Chirag Patel
– Magento
May 29 at 10:56
Let me see and get back to you once i found something about save data to database.
– Chirag Patel
May 29 at 10:58
Let me see and get back to you once i found something about save data to database.
– Chirag Patel
May 29 at 10:58
Okay thank you @Chirag Patel
– Magento
May 29 at 11:05
Okay thank you @Chirag Patel
– Magento
May 29 at 11:05
Create
UpgradeSchema.php file in your custom module. and follow this to create a field in database magento.stackexchange.com/questions/126036/…– Chirag Patel
May 29 at 11:32
Create
UpgradeSchema.php file in your custom module. and follow this to create a field in database magento.stackexchange.com/questions/126036/…– Chirag Patel
May 29 at 11:32
and How to add dropdown in Review & Payment Step? @Chirag Patel
– Magento
May 30 at 6:42
and How to add dropdown in Review & Payment Step? @Chirag Patel
– Magento
May 30 at 6:42
|
show 2 more comments
In which section do you want dropdown like shipping address etc..?
– Chirag Patel
May 29 at 9:54
on which step?
– Amit Bera♦
May 29 at 10:09
Shipping Address @ChiragPatel
– Magento
May 29 at 10:32
Shipping Address @AmitBera
– Magento
May 29 at 10:32