Magento 2 : Load Model Data By Custom Field

Magento 2 Developement

Magento 2 developments involve strong usage of models concept. Usually magento models loaded by primary field. However, if you need to load it using non-primary unique field there are several methods to do it. To illustrate examples below lets assume that we have created tables sliders with primary index slider_id and unique index alias. Model, […]

read more

Magento 2: How to add Google Font

Magento 2 Developement

You might already check Include static resources (JavaScript, CSS, fonts) article by magento team. They state that to add google font you need to update /Magento_Theme/layout/default_head_blocks.xml with <link src=”http://fonts.googleapis.com/css?family=Montserrat” src_type=”url” /> But as a result it is not working. Correct code is <link src=”https://fonts.googleapis.com/css?family=Montserrat” src_type=”url” rel=”stylesheet” type=”text/css” /> It wont work without additional parameters. Google […]

read more

Error Reporting In Magento 2

Magento 2 Developement

If you got similar message you might be curios how to enable error reporting in magento 2 instead of checking log file in /var/report folder. There has been an error processing your request Exception printing is disabled by default for security reasons. Error log record number: XXXXXXXXXXXX By default Magento 2 run in “default” mode […]

read more