Skip to content

magento man

Magento 2 : Run Dependency using Contoller and helper

Helper :- <?php namespace MageplazaHelloWorldHelper; use MagentoFrameworkAppHelperAbstractHelper; class Data extends AbstractHelper { public function getStoreConfig() { echo ‘This is Dependency Injection’; } } Controller:- <?php namespace MageplazaHelloWorldControllerDependency; use MageplazaHelloWorldHelperData; use MagentoFrameworkAppActionAction; use MagentoFrameworkAppActionInterface; class Dependency extends MagentoFrameworkAppActionAction { public function… Read More »Magento 2 : Run Dependency using Contoller and helper

Compilation from source: LESS file is empty: adminhtml/Magento/spectrum/es_MX/css/styles-old.less

I am upgrading a local site to 2.4.5. When I run a static content, deploy command: php bin/magento setup:static-content:deploy -f es_MX en_US It throws me this error: Compilation from source: /var/www/vendor/magento/theme-adminhtml-backend/web/css/styles-old.less Compilation from source: LESS file is empty: adminhtml/Magento/spectrum/es_MX/css/styles-old.less Compilation… Read More »Compilation from source: LESS file is empty: adminhtml/Magento/spectrum/es_MX/css/styles-old.less

Adding TinyMce EDitor in Magento 2 through Phtmls

<script type=”text/javascript”> require([ ‘jquery’, ‘mage/adminhtml/events’, ‘mage/adminhtml/wysiwyg/tiny_mce/setup’ ], function (jQuery) { jQuery(document).ready(function () { var editor; editor = new wysiwygSetup( ‘additional-description’,{ “width”:”99%”, “height”:”200px”, “plugins”:[{“name”:”image”}], “tinymce4”:{“toolbar”:”formatselect | bold italic underline | alignleft aligncenter alignright | bullist numlist | link table charmap”,”plugins”:”advlist autolink… Read More »Adding TinyMce EDitor in Magento 2 through Phtmls