Monthly Archives: May 2020

  1. Disable payment method programmatically in Magento 2

    We have several situation where we need to disable payment method on basis of configuration or conditions. For example Cash On Delivery based on Zipcode where we need to disable payment method based on zipcode availibility. This post will guide you with simple steps so you may know how can we disable paymet method programmtically in magento.

    Read more »
  2. Magento 2 Data Patch and schema patches

    Hello Magento Lovers,

     

    Let's discuss Data Patch in this post. Data Patch is the replacement of the UpgradeData and InstallData. 

     

    A data patch is a class that contains data modification instructions. It is defined in a <Vendor>/<Module_Name>/Setup/Patch/Data/<Patch_Name>.php file and implements \Magento\Framework\Setup\Patch\DataPatchInterface.

    A schema patch contains custom schema modification instructions. These modifications can be complex. It is defined in a <Vendor>/<Module_Name>/Setup/Patch/Schema/<Patch_Name>.php file and implements \Magento\Framework\Setup\Patch\SchemaPatchInterface.

    Unlike the declarative schema approach, patches will only be applied once. A list of applied patches is stored in

    Read more »
  3. Magento 2 Create Table Using Declarative Schema db_schema.xml

    Magento 2 updates features and standards in order to simplify the process and improve security. Magento 2 has introduced the declarative schema. The new declarative schema approach allows developers to declare the final desired state of the database and has the system adjust to it automatically, without performing redundant operations.

    Read more »
  4. Magento 2 Convert number to currency format

    In Magento as an e-commerce platform, We need to deal with currency in our code. We often get numbers which we need to show as currency or process as currency.  This post will help you to convert all your number into a currency format.

    Read more »