How statefull property used with knockout JS to keep form data without losing on reload Magento 2?

Magento 2 Keep form data without losing it on reloading the page, One of the useful Magento statefull properties from the UI module is used to save the state in the local storage of the browser.

A statefull object is used to set the state of the property.

You can see statefull: {} defined under the defaults object from the vendor/magento/module-ui/view/base/web/js/lib/core/element/element.js Continue reading “How statefull property used with knockout JS to keep form data without losing on reload Magento 2?”

How to use if else conditions in Knockout JS Magento 2?

You can use knockout if-else conditions in Magento 2 with knockout way or Magento 2 approaches.

You have to use ifnot for the else conditions. else is not supported in knockout.

Knockout if and ifnot conditions same as if and else conditions in javascript.

Using Default Knockout JS
1. First Way Continue reading “How to use if else conditions in Knockout JS Magento 2?”

How to customize ship to section in Order summary checkout Magento 2?

Magento 2 native supports a two-step checkout to place an order. Ship To section will be displayed in Order summary sidebar in Payment and Review Second Step.

Ship To section covers the Shipping address details chosen by the customer in the Shipping step and when you click on the edit icon in a ship to, It will redirect to the shipping step. Continue reading “How to customize ship to section in Order summary checkout Magento 2?”