How to apply Sort Order for Checkout Shipping address form magento 2?

You can set Sort Order for the shipping address provider form field in Magento 2 using an XML file.

You need to create a checkout_index_index.xml file to apply sortOrder for the available fields.

You can’t able to do sortOrder for the street field using an XML file. (Street sortOrder is 70.) Continue reading “How to apply Sort Order for Checkout Shipping address form magento 2?”

How to print a log with console.log() in knockout template?

Knockout JS with print a log message to the console at a development time.

You can trace or logs any object by the console.log in the knockout JS template.

You can log messages with the given syntax,

<div data-bind="text: console.log(' My Log:', $data)"></div>

Here When you refresh the page, you will see My Log: with your data output in the Browser console.

Just use the text data-bind attribute to log specific JS messages.

How to update product images by REST Web API Magento 2?

You can upload product images by REST API Magento with the PUT action and the help of /V1/products/<sku>.

Action: PUT

URL: <BASE_URL>/rest/V1/products/<SKU>
(Example URL: https://magento.test/rest/V1/products/my-sku)

Header: Authorization: Bearer <ADMIN TOKEN> Continue reading “How to update product images by REST Web API Magento 2?”