I am developing a shopping site. In the one page checkout, the "My billing and shipping address are the same" section is in the payment method. I want it to be below the Billing address. The payment method will stay at its own place. I just want to move the checkbox with the address to billing method section. How can I achieve this? thanks in advance
closed as too broad by Manthan Dave, Manoj Deswal, Piyush, liyakat, 7ochem Jan 19 '18 at 13:46
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
In my opinion the fastest way to reach it is:
- Create the file similar like
vendor/magento/module-checkout/view/frontend/web/js/model/shipping-address/form-popup-state.jswhere you will be store a state of checkbox
- In the
vendor/magento/module-checkout/view/frontend/web/js/view/billing-address.jsinstead the variable "
isAddressSameAsShipping" use a value created in the step 1st. (you can check how it's done for "form-popup-state")
- Move checkbox with label from
- Create in the
vendor/magento/module-checkout/view/frontend/web/js/view/shipping.jsmethod to change state a value from step 1st by checkbox from step 3rd.
Of course you should override all files in your extension or theme, not in the vendor :)