Magento 2 import email address to Newsletter from csv

Magento 2 import email address to Newsletter from csv. I have a requirement to import email is from CSV and import the email ids to Newsletter Subscriber list from csv. Write a PHP script which will import Newsletter subscriber from CSV. In this script, first i have read the email ids  from Csv , Then  first  check[…]

Magento2 How to disabled free shipping method at frontend

Magento2 How to disabled free shipping method at frontend. In this article, I am going to show Magento2 How to disabled free shipping method at frontend. At magento2, it difficult to disable a shipping method at frontend and Enable at admin area. At first, I target to override  Free shipping method class  Magento\OfflineShipping\Model\Carrier\Freeshipping ‘s method  collectRates() using Plugin around[…]

Magento2 get admin url

Magento2 get admin URL If want to get admin URL to Magento 2 then your can try below Solution In order to get admin  URL ,you need to inject the  Magento_Backend ‘s helper class Magento\Backend\Helper\Data  to  __construct() function.    

  Here you will get  Magento 2 get admin url from getAdminUrl() which basically return   Magento_Backend module’s  getHomePageUrl() function,[…]

Magento2 redirection from Observer

Magento2 redirection from Observer Magento2 redirection from Observer needs serval times.In Some events, you need to forcefully redirect to some pages basic your business logic. At magento 1.x,we can do using Mage::app()->getResponse()->setRedirect(‘YourRedirectUrl’)->sendResponse();   Something is required forMagent0 2.X version.This version uses modern technologies   Namespace, interface, Factory class etc.So there not easy to do a[…]

magento2 get base url and media url and static url

magento2 get base url and media url and static url In magento2 get base url and media url and static url need lot of times.Most times need base Url. In here, i am tried to give you to get base ,media ,static urls in magento At phtml file you need to use below code:

Direct[…]