Magento 2 is heavily using Knockout Js on frontend. You can find Knockout in Magento 2 on almost every page. For example in : on minicart vendor\magento\module-checkout\view\frontend\templates\cart\minicart.phtml <div id=”minicart-content-wrapper” data-bind=”scope: ‘minicart_content'”> <!– ko template: getTemplate() –><!– /ko –> </div> To understand how it works, I created a simple module Magento 2 Knockout…
Update: I recommend to use Gulp instead of Grunt and use SASS instead of Less. Magento 2 will move from LESS to SASS from Alan Kent When you’re creating a new theme or adjusting current theme, to see a new change you have three options : Frontend Developer Workflow References : Simple…
Magento 2 How to create custom query that is the question sometime is popped up on your head. Here is how I create my own custom queries in Magento 2. Currently, I figured out two ways : 1/ Take advantage of using Magento Resource Connection. $themeId=3; $this->_resources = \Magento\Framework\App\ObjectManager::getInstance() ->get(‘Magento\Framework\App\ResourceConnection’); $connection= $this->_resources->getConnection(); $select…
Logging variables or custom messages to a custom file are usually used in every development of building websites. In Magento 1, it was common to segment logs into different files (to separate logs for 3rd party extensions etc.). That’s as easy as changing the $file parameter of Mage::log. But in magento…
Goal: After reading this tutorial Magento 2 How to get all xml loaded tree , you can output any layout xml file of any page in magento 2. Sometime you have a desire to print all xml loaded tree to check whether your custom xml handles are loaded or not ?…
Magento 2 Learning Resources are listed as below : Official Magento 2 Developer Docs: http://devdocs.magento.com/ Alan Kent’s Blog: http://alankent.me/ Alan Storm’s Blog, Magento 2 category: http://alanstorm.com/category/magento-2 Karen Baker’s Blog, Magento 2 articles: http://karenbaker.me/category/magento-2/ MageClass, Magento2 tutorials, screencasts and up to date news: http://mageclass.com FireBear Studio blog, collection of tutorials and…
Recently we have this bug ” Notice: Undefined variable: block in …/Template/Filter.php line 187 ” on a project after updating SUPEE-6788 in Magento 1.9.2.x . After installation of the patch some parts of the front-end home page template stayed blank. Review of the exception.log file shows a number of exceptions that occur from…
Recently, I have worked on a project which has this strange bug, the image url in Wysiwyg is not correctly. Only administrator can see this image while guess users can not see it. For example : the image url which is generated by Wysiwyg : <img src=”http://www.mysite.com//index.php/admin/cms_wysiwyg/directive/___directive/e3ttZWRpYSB1cmw9Ind5c2l3eWcvcmd0LXNsaWRlci1pbWcwMS5qcGcifX0/key/ceed8184f5f336aafcc307f8623aff45/” /> In that case, the…
Follow the below codes to get addtional attributes product Magento $tmpProd = Mage::getModel(‘catalog/product’)->load($product->getId()); $attributes = $tmpProd->getAttributes(); $addtionalAttributes = array(); foreach ($attributes as $attribute) { if ($attribute->getIsVisibleOnFront()) { $addtionalAttributes[“{$attribute->getStoreLabel()}”] = $attribute->getFrontend()->getValue($tmpProd); } }
You can follow those below codes to get products tax percentage magento: $store = Mage::app()->getStore(‘default’); $request = Mage::getSingleton(‘tax/calculation’)->getRateRequest(null, null, null, $store); $taxclassid = $product->getData(‘tax_class_id’); $percent = Mage::getSingleton(‘tax/calculation’)->getRate($request->setProductClassId($taxclassid));
- 1
- 2
- 3
- 4
- Next Page »