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…
Laravel : Please provide a valid cache path. InvalidArgumentException
Error message: Please provide a valid cache path. Give a try following: Create these directories under `storage/framework/` – `cache`– `sessions`– `views`
Shopware 6 : Changing the state-machine-state of this entity is not allowed for scope crud
While making certain changes in the order state, it might throw the below error. States are somewhat related, they cannot just jump or change from one state to another state, e.g. you can’t assign the order transaction state to “refunded” when the state was not “paid” yet. In such scenarios are know as transitions. Possible…
How to inject custom JavaScript and CSS in the Shopware 5 in custom theme
Before you add custom CSS or JavaScript files to the theme you have to put them in the correct directory structure as your website custom theme. Here is an example directory structure: Further, you will have to define the CSS or JavaScript files you would like to use inside your custom theme. You have to…
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 third party modules can be helpful in Magento 2 certification exams
Some of the Magento 2 third party modules i have listed down here which can be helpful during the Magento 2 exam preparation. Following modules will be less helpful if you have installed and just reviewed their configuration. But in case, if some one has went through their code and played with it during working…
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…