Skip to content

Commit

Permalink
feat: add default pickup view setting (#298)
Browse files Browse the repository at this point in the history
INT-619
  • Loading branch information
FlorianSDV authored Sep 4, 2024
1 parent 7a5efef commit 7b59e0c
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/Frontend/View/CheckoutSettingsView.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,20 @@ function (FormOperationBuilder $builder) {
]
),
new InteractiveElement(CheckoutSettings::DELIVERY_OPTIONS_HEADER, Components::INPUT_TEXT),
new InteractiveElement(CheckoutSettings::DELIVERY_OPTIONS_CUSTOM_CSS, Components::INPUT_CODE_EDITOR)
new InteractiveElement(CheckoutSettings::DELIVERY_OPTIONS_CUSTOM_CSS, Components::INPUT_CODE_EDITOR),
new InteractiveElement(
CheckoutSettings::PICKUP_LOCATIONS_DEFAULT_VIEW,
Components::INPUT_SELECT,
[
'options' => $this->createSelectOptions(
CheckoutSettings::PICKUP_LOCATIONS_DEFAULT_VIEW,
[
CheckoutSettings::PICKUP_LOCATIONS_VIEW_LIST,
CheckoutSettings::PICKUP_LOCATIONS_VIEW_MAP,
]
),
]
)
),
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1634,6 +1634,33 @@
"$component": "CodeEditor",
"label": "settings_checkout_delivery_options_custom_css",
"description": "settings_checkout_delivery_options_custom_css_description"
},
{
"name": "pickupLocationsDefaultView",
"$builders": [
{
"$visibleWhen": {
"$if": [
{
"$target": "enableDeliveryOptions"
}
]
}
}
],
"$component": "SelectInput",
"options": [
{
"value": "list",
"label": "settings_checkout_pickup_locations_default_view_option_list"
},
{
"value": "map",
"label": "settings_checkout_pickup_locations_default_view_option_map"
}
],
"label": "settings_checkout_pickup_locations_default_view",
"description": "settings_checkout_pickup_locations_default_view_description"
}
],
"children": null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,33 @@
"$component": "CodeEditor",
"label": "settings_checkout_delivery_options_custom_css",
"description": "settings_checkout_delivery_options_custom_css_description"
},
{
"name": "pickupLocationsDefaultView",
"$builders": [
{
"$visibleWhen": {
"$if": [
{
"$target": "enableDeliveryOptions"
}
]
}
}
],
"$component": "SelectInput",
"options": [
{
"value": "list",
"label": "settings_checkout_pickup_locations_default_view_option_list"
},
{
"value": "map",
"label": "settings_checkout_pickup_locations_default_view_option_map"
}
],
"label": "settings_checkout_pickup_locations_default_view",
"description": "settings_checkout_pickup_locations_default_view_description"
}
],
"children": null
Expand Down

0 comments on commit 7b59e0c

Please sign in to comment.