Magento2- Display Static Block in Phtml file & CMS page

In XML File:

In CMS Content

In phtml file

Read more

Magento 2 – How to call a custom phtmlfile in another phtml file, xml layout, static block and cms page?

Do you want to know how to Call PHTML file from another PHTML file in Magento 2 Custom File Path: app/design/frontend/{Package}/{theme}/Magento_Theme/templates/html/test.phtml To call in xml layout file

To call in blocks and cms pages

To call in any phtml file

Read more

Magento 2: Set custom validation message

If you want to change Magento 2 default validation message with your custom message. Then Just go-to that input field and add a custom attribute “data-msg-required” data-msg-(validator name) Example On product detail page if I click add to cart button without selecting options than its shows This is a required field. But I want to […]

Read more

Enable Error Reporting in Magento 2

Magento 2 comes with 3 different modes. They are Default, Developer & Production. Each of the modes is tied to the stage your ecommerce store is in. After you’ve installed Magento 2, the store is in the “default” mode, which does not do error reporting. You need to enable the “developer” mode in Magento 2 […]

Read more

Magento2 : pub/static/versionxxxx Not found (default css not loading after creating the custom theme)

CSS not loading After I creating and registering the them, both front end and back end css are not loading. In console its showing 404 file not found issue. Error: (404) pub/static/version1482183922/adminhtml/Magento/backend/es_ES/css/styles.css , pub/static/version1482183922/adminhtml/Magento/backend/es_ES/extjs/resources/css/ext-all.css Failed to load resource: the server responded with a status of 404 (Not Found) and multiples files pub/static/adminhtml/Magento/backend/es_ES/css/styles.css Found, the /version1482183922 […]

Read more

Version upgrade in magento 2 using command-line

Magento2 Version upgrade through command line (From 2.1.3 to 2.1.5 ) via composer Upgrade using the command line 1. Log in to your Magento server. Change to the directory in which you installed the Magento software. For example,

2. Enter the following commands in the order shown: composer require –no-update composer update For example, […]

Read more

Grunt watch error – Waiting…Fatal error: watch ENOSPC

To solve the grunt watch error run the below command. echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p Port 35729 is already in use by another process If you installed livereload add-ons in your browser, uninstall it. Run the below command to check the port

If its shows GRUNT then leave […]

Read more

Add a custom breakpoint in Magento2

This topic describes how to add a custom breakpoint in your theme. Overview Define a variable for the new breakpoint. Override the library _responsive.less file, and add the new rule Implement the screen changes for the new breakpoint. Add a new breakpoint variable In your custom theme directory, add a variables.less file in the following […]

Read more

Magento 2 custom theme layout xml and css not working

Magento 2 custom theme layout xml and css not working after changing the theme name. In our custom theme, we have used theme name like Custom (First letter capital). Then we have decided to change the theme name like custom. After doing this our theme css and XML files are not loaded. The reason is […]

Read more

Uninstall or delete magento2 custom theme manually

How to uninstall or delete magento2 custom theme manually? we can uninstall a custom theme with the following steps Uninstall Theme 1. Remove the theme folder from app/design/frontend/Vendor/ 2. Clear the content of var/view_preprocessed/ 3. Clear the content of pub/static/frontend/ 4. Open the Magento’s database, go to the theme table then search your theme (which […]

Read more