1

We are creating a shopping website with Sitecore Experience Commerce (SXC) 9.

We only provide "Ship items" option as delivery preference.

Is there any way to hide the selection of delivery preference option in the checkout flow?

enter image description here

1 Answer 1

1

You have two options:

1) Quick & dirty solution (not recommended) is to alter Delivery.cshtml file which you can locate under path_to_your_sitecore_instance\Views\Commerce\Checkout

This is the code that you need to change for removing header and select box:

enter image description here

You can remove it but you need to take care of preselecting "Shipping options" somewhere in the logic to show you shipping address and so on and to preserve the flow.

This is however not good solution in terms of keeping maintainability and upgradability of your solution. I would use this option as starting point to determine whether this is even possible, then revert changes and do the same code changes by following option 2)

2) Best solution: You need to create your own Delivery View where you alter code similarly in option 1).

You need to create your own Checkout rendering and controller by inheriting original one: enter image description here

You need to change View resolution to direct Delivery method to use your cshtml file: enter image description here

Finally you need to change links to OOTB Delivery Controller to yours: enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.