Magento 2 Certified Developer | StackExchange Moderator | Amit Bera

Magento 2 eCommerce Developement | Magento Web developement

  • Home
  • Magento 2
  • Magento
  • General
  • YouTube
  • Server
  • About Amit Bera
  • Contact
  • Home
  • Magento 2
  • Magento
  • General
  • YouTube
  • Server
  • About Amit Bera
  • Contact

No Widgets found in the Sidebar Alt!

  • Magento 2

    Magento2 php8.1 extension install

    November 5, 2022 /

    Magento2 php8.1 extension install on magento 2.4.5.p1 open source version. Here using Ubuntu version 20.04 and magento version 2.4.5.p1 and Web server apache If you have already has another PHP version then do below process. At my system php7.4

    read more
    devadmin 0 Comments

    You May Also Like

    Magento2 Checkout shipping address autofill

    Magento2 Checkout shipping address autofill

    March 23, 2019
    Magento2 add a cms page link to menu

    Magento2 add a cms page link to menu

    April 18, 2018

    Magento 2 import email address to Newsletter from csv

    September 28, 2017
  • Magento 2,  Weekly Dairy

    Magento 2 create yes/no product attribute

    September 19, 2022 /

    magento 2 create yes/no product attribute and assigns to all attributes sets. Using Data patch installer. Your module must be a dependency on the Magento_Catalog module using module.xml. Example: Data match installer script:

    read more
    devadmin 0 Comments

    You May Also Like

    magento2 base url

    How to get magento2 base url

    June 29, 2017

    Magento2 get cart and checkout link in block or phtml

    March 24, 2016

    Magento 2 import email address to Newsletter from csv

    September 28, 2017
  • Magento 2

    Category page NOINDEX,NOFOLLOW when filters applied

    September 7, 2021 /

    Category page NOINDEX,NOFOLLOW when filters applied. Most websites are getting duplicated content issues at SEO when filters applied To avoid the issue we need to mark the category page’s meta robots value to `NOINDEX,NOFOLLOW` when the filter is applied on the category page. Defined an observer on event layout_generate_blocks_after The Observer class code will be Module is available at https://github.com/devamitbera/Magento2-extension/tree/master/Category-disallow/

    read more
    devadmin 0 Comments

    You May Also Like

    Magento2 programmatically create coupon

    Magento2 programmatically create coupon

    April 12, 2019
    Magento2 add a cms page link to menu

    Magento2 add a cms page link to menu

    April 18, 2018

    Magento 2 import email address to Newsletter from csv

    September 28, 2017
  • Magento2 programmatically create coupon
    Magento 2

    Magento2 programmatically create coupon

    April 12, 2019 /

    In this article, i have explaining how to we can create coupon programmatically. At Magento 2, if you wish to create a coupon programatically . Follow below steps: First, you have to create a Cart Price rule/Shopping Cart rule. At, Second steps you will create coupon code. Advanced sales promotion rules like #free-gift, discount on #first-order, #nth-order, #total-sales-amount, #total-order-number #specific-customers #subscribers etc.http://bit.ly/M2-Sales-Promotion 1.Create Cart Price rules For a create rules, i have used repository interface classes: For set the data for rules repository class, we have use the interface This interface some setter methods using this setter method, using those method you can set discount percent/amount ,rules starting & ending…

    read more
    devadmin 0 Comments

    You May Also Like

    Magento2 get cart and checkout link in block or phtml

    March 24, 2016
    Magento2 add a cms page link to menu

    Magento2 add a cms page link to menu

    April 18, 2018
    Magento2 Checkout shipping address autofill

    Magento2 Checkout shipping address autofill

    March 23, 2019
  • Magento2 Checkout shipping address autofill
    Magento 2

    Magento2 Checkout shipping address autofill

    March 23, 2019 /

    Magento2 Checkout shipping address autofill. If you want to Magento2 Checkout shipping address autofill during checkout then you have to use Magento 2 plugin. I have used plugin over on Class below classes for autofill checkout Shipping address: Magento\Checkout\Block\Checkout\AttributeMerger is  main classis the main class where i able to auto fill firstname,lastname,street,city,postcode,country_id,region,region_id,telephone,companyabove fields value using after Create after Plugin (Devbera\AutofillCheckoutAddress\Plugin\Magento\Checkout::afterMerge ) on Magento\Checkout\Block\Checkout\AttributeMerger::merge for shipping address fields autofill up. Step1:Define Plugin classes: First Create di.xml at app/code/{VendorName}/{ModuleName}/etc/frontent where we are define the plugin classes. Code Step2: Declare plugin class Create First plugin class AttributeMergerPlugin.php at app/code/{VendorName}/{ModuleName}/Plugin/Magento/Checkout/ Code Second plugin class which will auto fill email id for NON _login customer Create seocnf…

    read more
    devadmin 1 Comment

    You May Also Like

    Magento2 add a cms page link to menu

    Magento2 add a cms page link to menu

    April 18, 2018
    Magento2 programmatically create coupon

    Magento2 programmatically create coupon

    April 12, 2019

    Magento 2 import email address to Newsletter from csv

    September 28, 2017
  • Magento2 add a cms page link to menu
    Magento 2

    Magento2 add a cms page link to menu

    April 18, 2018 /

    Magento2 add a cms page link to menu or add a link to the menu, Magento2 add a cms page link to the menu. If you are store owner/ developer then sometimes, you want to add a cms page link to menu of your Magento 2 store. Magento 2 does not provide any feature like add a Cms page to your existing menu. At default Magento, you can only add the categories to its menu. So, today I am writing this blog for how you add a cms page link to the menu. For this, you need some coding also. If you do not want to wish to do any…

    read more
    devadmin 1 Comment

    You May Also Like

    Magento2 get cart and checkout link in block or phtml

    March 24, 2016
    magento2 get base url and media url and static url

    magento2 get base url and media url and static url

    March 24, 2016
    Magento2 Checkout shipping address autofill

    Magento2 Checkout shipping address autofill

    March 23, 2019
  • Magento 2

    Magento 2 import email address to Newsletter from csv

    September 28, 2017 /

    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 an email is exits  as customer Using Magento\Customer\Api\AccountManagementInterface ‘s   function isEmailAvailable($emailId,$websiteId) and depends  on customer types Guest ( mean guest Not register) and register, i have added  the email  to  subscriber list. For add an email to the subscriber list, we need to call factory class Magento\Newsletter\Model\SubscriberFactory  and need to Customer.Guest customer  use $_subscriberFactory->create()->subscribe($Email);   and register customer ,use…

    read more
    0 Comments

    You May Also Like

    Magento2 programmatically create coupon

    Magento2 programmatically create coupon

    April 12, 2019
    Magento2 add a cms page link to menu

    Magento2 add a cms page link to menu

    April 18, 2018

    Magento2 get cart and checkout link in block or phtml

    March 24, 2016
  • Magento 2

    Magento2 How to disabled free shipping method at frontend

    June 29, 2017 /

    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 method <?php namespace Devamitbera\CoreRewrite\Plugin; /** * Disabled Freeshipping for frontend */ class DisabledFreeShippingForFrontPlugin { protected $appState; public function __construct( \Magento\Framework\App\State $appState ) { $this->appState = $appState; } public function aroundCollectRates( \Magento\OfflineShipping\Model\Carrier\Freeshipping $subject , \Closure $proceed , \Magento\Quote\Model\Quote\Address\RateRequest $request ) { /* If ares is frontend then return false for disable shipping method at frontend */…

    read more
    0 Comments

    You May Also Like

    magento2 base url

    How to get magento2 base url

    June 29, 2017
    Magento2 Checkout shipping address autofill

    Magento2 Checkout shipping address autofill

    March 23, 2019

    Magento 2 import email address to Newsletter from csv

    September 28, 2017
  • magento2 base url
    Magento 2

    How to get magento2 base url

    June 29, 2017 /

    How to get magento2 base url. You want to get magento2 base url for your current store then you can follow this post. During your daily work, several time, you need to current store base url  and at Magento 1.x version you can get base url using Mage::getBaseUrl();As Magento2, do not used factory patterns, so the code like  Mage::getBaseUrl();  is not exist by which you can base URL.But at Magento2, you should use StoreManager object  and  using  $this->_storeManager->getStore()->getBaseUrl()  you can get base url. Magento2, use interface, injection of class, that you should  Inject. Magento\Store\Model\StoreManagerInterface at Model, Resource model, Block, Helper classes for getting base url using below code: $objectManager = \Magento\Framework\App\ObjectManager::getInstance();…

    read more
    1 Comment

    You May Also Like

    Magento2 programmatically create coupon

    Magento2 programmatically create coupon

    April 12, 2019

    Magento2 get cart and checkout link in block or phtml

    March 24, 2016

    Magento 2 import email address to Newsletter from csv

    September 28, 2017
  • Magento 2

    Magento2 get admin url

    October 18, 2016 /

    Magento2 get admin URL Magento2 get admin url.If   want to get admin URL to Magento 2 then you 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. /** * @var Magento\Backend\Helper\Data */ protected $HelperBackend; public function __construct( .... \Magento\Backend\Helper\Data $HelperBackend .... ) { ... $this->HelperBackend = $HelperBackend; ... } /** * * @param \Magento\Framework\Event\Observer $observer * @return void */ public function getAdminUrl() { echo $this->HelperBackend->getHomePageUrl(); }   Here you will get  Magento 2 get admin url from getAdminUrl() which basically return Magento_Backend module’s  getHomePageUrl() function, This function also given admin home page url.

    read more
    0 Comments

    You May Also Like

    Magento2 Checkout shipping address autofill

    Magento2 Checkout shipping address autofill

    March 23, 2019
    Magento2 add a cms page link to menu

    Magento2 add a cms page link to menu

    April 18, 2018
    Magento2 programmatically create coupon

    Magento2 programmatically create coupon

    April 12, 2019
 Older Posts

Recent Posts

  • Magento2 php8.1 extension install
  • Magento 2 create yes/no product attribute
  • Api search magento using php
  • Magento2 Custom options do not show at Cart
  • Category page NOINDEX,NOFOLLOW when filters applied

Recent Comments

  • URL on Magento2 Checkout shipping address autofill
  • Magento2 programmatically create coupon l- Amit Bera | amitbera.com on How to get magento2 base url
  • Magento2 programmatically create coupon l- Amit Bera | amitbera.com on Magento2 add a cms page link to menu
  • Magento2 Checkout shipping address autofill- Amit Bera | amitbera.com on magento2 get base url and media url and static url

Archives

  • November 2022
  • September 2022
  • August 2022
  • December 2021
  • September 2021
  • April 2019
  • March 2019
  • January 2019
  • April 2018
  • September 2017
  • June 2017
  • October 2016
  • April 2016
  • March 2016
  • February 2016
  • August 2015
  • January 2015
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • December 2013
  • November 2013

Categories

  • General
  • Magento
  • Magento 2
  • Server
  • Uncategorized
  • Weekly Dairy

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Ashe Theme by WP Royal.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok