Magento 2: define vs require in JavaScript are essential concepts in understanding how JavaScript modules are managed within the Magento 2 ecosystem. Built on a robust modular architecture, Magento 2 uses JavaScript extensively to enhance […]
Category: Knockout JS
Magento 2: Save value to a custom field in the order
We have created a custom field in the quote table and saved the value. This post will create a field in the sales_order table to save a custom. We are often required to save additional […]
Magento 2: Add Custom Validation Rules on Checkout
Let’s add custom validation rules at checkout. We have added custom validation before placing the order on the checkout page. However, we can restrict address-level fields to shipping and billing addresses by adding default and […]
Magento 2: Add Custom Validation Before Order Placement
Do we need to add custom validation just before order placement? Is it possible? Yes, absolutely; Magento 2 is flexible and provides a mechanism to add our custom validation before placing orders. We often need […]
Magento 2: Access Configuration Value in JavaScript at Checkout
We have accessed the configuration value in the JavaScript widget. In this post, we will access the configuration value in JavaScript at checkout. As in the last post, if we pass value to a JS widget, […]
Magento 2: How to pass value to JS
We will pass the dynamic configuration values to JS in this post. We can pass values to the configuration using checkoutConfig in checkout. However, we can also pass values to the jQuery widget from the […]
Magento2: How to refresh the shipping method using JS?
Let’s refresh the shipping method using JS. We have restored the total section in https://sbdevblog.com/magento-2-how-to-update-the-total-using-js/ Very often, we need to update the shipping method in the cart and checkout page using JS. For example, on applying a custom discount or […]
Magento 2: How to Update Mini Cart?
Mini Cart displays a selection of the items added to the cart, as well as the subtotal and update and remove item options. Users can see these details without refreshing the page. If we look […]
Magento 2: How to check customer is Logged in Knockout JS?
We have got logged-in customer id. We also have got logged-in customer id while Full Page Cache (FPC) is enabled. Now, we will explore how to check whether a customer is Logged in using JavaScript. […]