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 […]
Tag: frontend
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 Product to Cart With Custom Price
In real-world scenarios, very often, we need to change the price at the time of adding items to the cart. In other words, we allow the vendors to sell as a sample using a sample […]
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 Block Before Add To Cart On Product Page
The product page is also the most crucial, like the checkout page. Customers see a detailed view of each product, including reviews. Hence, this page must be handled carefully to convert the cart into a […]
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 the total using JS
How to update the total using JS Let’s check how we can achieve this in Magento 2. We have updated Mini Cart using sections.xml and JS in the post: https://sbdevblog.com/magento-2-how-to-update-mini-cart/ Like the mini-cart, sometimes we […]