Author Publishing

How to modify less file variable’s value dynamically in magento2

How to modify less file variable’s value dynamically in magento2

How to modify less file variable’s value dynamically in magento2 In this article we will learn how to modify variables of  “less”  in magento2. I assume you know how to create less file in theme. I have placed my _extend.less file under app/design/frontend/Company/theme_name/web/css/source/ which has following code :   ….. @themeColor: #291a2d; //variable @color-text: #cdaa6a; […]

Read More

Disable payment method programmatically in Magento2

Disable payment method programmatically in Magento2

Disable payment method programmatically in Magento2. Today I am going to explain that how you can disable any payment method programmatically at checkout page in magento 2 in this article. I have done it by using observer. So lets get started with the process. First you will need to create events.xml file under app/code/Company/Module/etc/. Then write “payment_method_is_active” […]

Read More

What is Less ?

What is Less ?

What is Less ? Today I am going to explain LESS (a CSS pre-processor) in this article. Less is a pre-processor of CSS and extends the features and capabilities of CSS. Less has many features like – it allow variables, functions, mixins, Nested Rules, Operations, Importing other less files, and many more features (explained in […]

Read More

reindexing programmatically in magento 2

reindexing programmatically in magento 2

reindexing programmatically in magento 2. In this article we will learn how to reindexing through code in magento 2. You can write the below code in any class according to your need :   ….. /** * @var \Magento\Indexer\Model\IndexerFactory */ protected $_indexerFactory; /** * @var \Magento\Indexer\Model\Indexer\CollectionFactory */ protected $_indexerCollectionFactory; public function __construct( \Magento\Indexer\Model\IndexerFactory $indexerFactory, \Magento\Indexer\Model\Indexer\CollectionFactory $indexerCollectionFactory ){ […]

Read More