We use cookies to make your experience better. To comply with the new e-Privacy directive, we need to ask for your consent to set the cookies. Learn more.
Blog
-
How to Run cron job manually via Command Line in Magento 2
<h2 id="how-to-run-cron-job-manually-via-command-line">To Run cron job manually via Command Line</h2> <p>To run the cron job manually, go to the Magento admin root folder.</p> <div class="language-plaintext highlighter-rouge"> <div class="highlight"> <pre class="highlight"><code>php bin/magento -
How to Reindex from admin in Magento 2
Backend Reindex Indexing from the Admin Panel is not allowed by default in Magento 2, we can only do that from the Command line or using some custom Magento 2 Module. We have developed a free Indexer Magento 2 extension which can be used. Please follow the below steps in order to install and use it. Reindex extension purpose Reindex extension by -
How to add WYSIWYG Editor in Magento 2 System Configuration
To add the WYSIWYG editor in system configuration in Magento 2 Create system.xml Directory app\code\VendorName\ModuleName\etc\adminhtml\system.xml Content of system.xml <field id="description" translate="label comment" type="editor" sortOrder="20" showInDefault="1"   -
How to Get WYSIWYG Editor’s data in Magento 2 Frontend Programmatically
To get the WYSIWYG editor's data on the frontend in Magento 2 Create registration.php Directory app\code\VendorName\ModuleName\registration.php Content of registration.php <?php \Magento\Framework\Component\ComponentRegistrar::register( \ -
How to Auto Approve Product Review For Registered Customers in Magento 2
Follow the steps to auto approve the product review for registered customers in magento 2 Create registration.php Directory app\code\VendorName\ModuleName\registration.php Content of registration.php <?php\Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, & -
How to Override JS File in Magento 2
To override the JS file in Magento 2 Create registration.php Directory app\code\VendorName\ModuleName\registration.php Content of registration.php <?php\Magento\Framework\Component\ComponentRegistrar::register(\Magento\Framework\Component\ComponentRegistrar::MODULE, 'VendorName_ModuleName', __DIR__); Create module.xml Directory app\code\ -
How To Pass Parameter To URL In Magento 2 Programmatically
To pass a parameter to URL in Magento 2 follow this method Create Data.php Directory app\code\VendorName\ModuleName\Helper\Data.php Content of Data.php <?phpnamespace VendorName\ModuleName\Helper; use Magento\Framework\App\Helper\Context;use Magento\Framework\UrlInterface; class Data extends AbstractHelper{ protected $ -
How To Get Customer Address Data By Address ID In Magento 2 Programmatically
To get the customer address data by address id in Magento 2 Directory Create the GetCustomerAddress.php file in the directory mentioned below, app/code/VendorName/ModuleName/Model/GetCustomerAddress.php Content of GetCustomerAddress.php <?php namespace VendorName\ModuleName\Model; use Magento\Customer\Api\AddressRepositoryInterface; -
How To Check If The Current Area Is Frontend Or Backend In Magento 2
There are two methods to check if the current area is frontend or backend in Magento 2 with Object Manager $objectManager = \Magento\Framework\App\ObjectManager::getInstance();$state = $objectManager->get('Magento\Framework\App\State');echo $state->getAreaCode(); With Class Method <?phpnamespace VendorName\ModuleName\Block;use Magento\ -
Show Loader till Ajax Call not Completed in Magento 2
Add the following code to show the loader till ajax call is not completed in Magento 2 jQuery.ajax({ url: url, type: 'POST', dataType: 'json', showLoader: true //use to display loader }).done(function (data) { return true;}); To start the loader on the ajax call, add the