Technical Guidelines
Instructions and advice for developers and store owners in installing, configuring and customizing eCommerce websites and Magento 2 extensions.
-
How To Check If Customer Is Logged Into Magento 2
As we all know, there are so many cases where we need to check whether a customer is currently logged in or not on your website. For example, there are some special promotions for logged customers. Today, this blog will show you how to check a customers’ logging status in Magento 2. In Magento, sessions play an important role in... (More) -
How to create and expose extension attributes to REST APIs in Magento 2
What are Extension Attributes? Extension Attributes are a part of Magento Service Contracts. Both of them are quite complex, Magento Service Contracts are a set of classes and interfaces, which hide the business logic and ensure the integrity of data. The Extension Attributes are used to extend the functionalities of those interfaces. Because, by default, you can only use get/set... (More)1 Comment
-
How to create custom logger in Magento 2 - A Ultimate Guide
In this blog, we will show you the way to create a custom logger to log your own messages into it. Step 1: Create a logger class Firstly, create a logger class: app/code/Magenest/CustomLog/Logger/Logger.php <?php namespace Magenest\CustomLog\Logger; class Logger extends \Monolog\Logger { } app/code/Magenest/CustomLog/Logger/Handler.php <?php namespace Magenest\CustomLog\Logger; use Monolog\Logger; class Handler extends \Magento\Framework\Logger\Handler\Base { /** * Logging level * @var int... (More)0 Comment
-
How to apply Schema Patch in Magento 2 - A Ultimate Guide
Magento has changed logic process setup data/schema, which is recommended for Magento versions 2.3 and up. It was introduced in 2018 with the release of Magento 2.3 and now gradually becomes popular. Unlike the upgrade scripts, it helps developers not to write various scripts for each new module version. In this article, you will learn how to use declarative schema &... (More)6 Comments
-
How to apply Data Patch in Magento 2
With version 2.3, aside from InstallData and UpdateData classes, Magento introduced data patches, a new way for modules to apply data changes. In this blog, we will show you how to write and apply data patches in Magento 2. 1. Create a data patch A data patch class is stored under <Vendor>/<Module_Name>/Setup/Patch/Data/<Patch_Name>.php and implements \Magento\Framework\Setup\Patch\DataPatchInterface. In this example, we will... (More)1 Comment
-
What is Paypal and How to configure Paypal payment method in Magento 2
Consumers have grown accustomed to being quickly connected to information, entertainment, as well as to the products they wish to purchase. It's no surprise that they've gotten so familiar with online payments — and the businesses that accept them — given their anticipation that technology will be able to meet almost any demand instantly. Let’s find out below what is... (More)0 Comment
-
How to configure Table Rate Shipping Method in Magento 2
What’s Table Rates? It’s a Shipping Method that references a table of data to estimate shipping costs based on a fusion of dimensions such as Weight v. Destination, Price v. Destination, and Number of Items v. Destination. For example, you can use Table Rate to show to charge your customer a 100 lb order costs more than a 50 lb... (More)0 Comment
-
How to configure multiple websites, multiple store views in Magento 2
Magento allows us to create multiple websites and store views that use different attributes and content in only one installation. This blog will show you how to configure multiple websites, multiple store views in Magento 2. Step 1: Create websites 1. In the Magento 2 panel, go to Stores >> Settings >> All Stores. 2. On the Stores page, click... (More)0 Comment
-
How to modify quote, order totals in Magento 2 - A Complete Guide
Sometimes we need to modify the totals of transactions in Magento, to add extra fees or extra discounts. Totals are the calculation of the product, shipping costs, taxes, discounts, etc. In this article, we will show you how to modify totals by adding total collectors to the calculation process. Steps to create a new item in quote total calculation from... (More)2 Comments
-
How to create a custom admin notification in Magento 2
Magento is an e-commerce platform capable of expanding core functions. One of the very useful functions is administrator notification. Magento uses this function in the backend to notify administrators of updates, upgrades, notification patches or bugs that need to be fixed to improve the user experience. Today, this blog will show you how to create custom Admin System Messages and... (More)2 Comments
0 Comment