Magento 2 : Area Code Demystified

While working in Magento 2 we may have come across to these kind of exceptions related to Area code. Area code is already set Area code is not a set Area code not set: Area code must be set before starting a session These three phrases may hit your mind during development. Magento have introduced…

Shopware 5 : Mini Cart Refresh via frontend Javascript Method

One can refresh the mini cart via javascript code. Below javascript can be injected to any of the tpl file or js file. <script language=”javascript” type=”text/javascript”> function cartRefreshExtra() { var ajaxCartRefresh = window.controller.ajax_cart_refresh; $cartAmount=$(‘.cart–amount’); $cartQuantity=$(‘.cart–quantity’); if(!ajaxCartRefresh.length){ return; } $.publish(‘plugin/swResponsive/onCartRefresh’); $.ajax({ url:ajaxCartRefresh, dataType:’json’, success:function(cart) { if(!cart.amount||isNaN(cart.quantity)) { return; } $cartAmount.html(cart.amount); $cartQuantity.html(cart.quantity).removeClass(‘is–hidden’); if(cart.quantity===0) { $cartQuantity.addClass(‘is–hidden’); } $.publish(‘plugin/swResponsive/onCartRefreshSuccess’,[cart]);}…

Magento 2 : How Magento core_config_data system configuration works

Here i would like to give you an overview of how Magento system configuration works in terms of scope. As we may have came to know that Magento provides different scopes Default Scope, Websites and Store View storing the scope values as default, websitesand storesrespectively in the core_config_data. // custom save logic for one can…

Magento 2 uiRegistry

uiRegistry is a in-memory storage, plain storage of entities by keys. Implements the get(), set(), and has() methods. JS debugging using uiRegistry To debug the UI component JS, we first need to get a uiRegistry instance from the browser console. To do so, use the RequireJs ID uiRegistry. In the browser console enter the following: var registry = require(‘uiRegistry’); Now we have uiRegistry instance…

Magento 2 Knockout JS Ajax

Magento 2 uses the Knockout.js framework to render different components on the different part of the website. Some of the sections are are as follows: – Magento 2 Product Comparison – Magento 2 Product Reviews on Product detail page – Magento 2 Checkout Shipping Methods and Rates – Magento 2 Checkout Agreement Module – Magento…

Magento 2 questions asked in the Magento certification exams?

Hey guys, just wanted to share some of the questions that may be asked in the different types of Magento 2 exams. – Magento 2 Request and Response Flow – Magento 2 Observer related whole flow – Magento 2 Cron based question – Magento 2 DB Schema : DB related whole operations via db_schema.xml only…