React Luma Magento 2 is a modern approach to building Magento frontends using React JS while keeping Magento as the backend. It helps improve performance, flexibility, and user experience. In this blog, we’ll understand its performance, benefits, limitations, and when to use it. 👉 https://github.com/Genaker/reactmagento2 Test Environment (Real-world setup) All our performance tests and observations […]
React Luma Theme for Magento 2: Complete Guide with Performance, Pros & Cons
How to Set Default Country in Magento 2 Admin Customer Address Form (JavaScript Solution)
9 months ago
For any Magento 2 store, efficient management of customer data, particularly addresses, is vital. When your administrative team or customer service representatives frequently add or edit customer addresses in the backend, pre-filling the “Country” field can save valuable time and significantly reduce data entry mistakes. This guide will show you how to implement a JavaScript […]
Creating a custom admin theme in Magento 2 is great for branding and improving how your team uses the backend. A well-designed theme can make daily tasks smoother and more efficient. This guide will walk you through creating your own custom admin theme. We’ll useMage2Developer as our Vendor Name andcustom_admin_theme as our Theme Name. Step 1: Create […]
When we create a customer custom attribute from admin and we add a custom attribute in the frontend form, after form submission if any error would occur and the form would redirect to the same page, the form field values should be pre-filled in the same form, but the problem is that the customer custom […]
How to call Viewmodel in – Magento 2
3 years ago
After the Magento 2.2 version, Magento introduces the ViewModel concept, which is looking quite cool and awesome because sometimes you need some custom value of some logic base condition need to add in the phtml file you need to override or extend that block in an earlier version. View models can be added by passing […]
After upgrading to Magento version 2.4.6, many times we get an error of ZendClient class is deprecated like the following screenshot: 1 exception(s): Exception #0 (Exception): User Deprecated Functionality: Class is deprecated in /var/www/html/vendor/magento/framework/HTTP/ZendClient.php on line 27 Exception #0 (Exception): User Deprecated Functionality: Class is deprecated in /var/www/html/vendor/magento/framework/HTTP/ZendClient.php on line 27 <pre>#1 trigger_error() called at […]
Get cms block by identifier – Magento 2
3 years ago
For that, you can use Magento\Cms\Api\GetBlockByIdentifierInterface. No need to use Magento\Framework\Api\SearchCriteriaBuilder. /** * @var \Magento\Cms\Api\GetBlockByIdentifierInterface */ private $blockByIdentifier; public function __construct( GetBlockByIdentifierInterface $blockIdentifier ) { $this->blockByIdentifier = $blockIdentifier } Now you can get that page data passing blockIdentifier and storeId. $this->blockByIdentifier->execute($blockIdentifier, $storeId);
Get cms page by identifier – Magento 2
3 years ago
For that, you can use Magento\Cms\Api\GetPageByIdentifierInterface. No need to use Magento\Framework\Api\SearchCriteriaBuilder. use Magento\Cms\Api\GetPageByIdentifierInterface. /** * @var \Magento\Cms\Api\GetPageByIdentifierInterface */ private $pageByIdentifier; public function __construct( GetPageByIdentifierInterface $pageByIdentifierInterface ) { $this->pageByIdentifier = $pageByIdentifier } Now you can get that page data passing pageIdentifier and storeId. $page = $this->pageByIdentifier->execute($pageIdentifier, $storeId);
Create custom router in Magento 2
3 years ago
Custom routers provide a way to modify/replace existing route names with custom ones. For example, if you want to change the current route name learning to custompath you can achieve with it. Below is an example of it. To do that, we need to add code in frontend/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="Magento\Framework\App\RouterList"> <arguments> […]
How to add products to a custom product link type grid in Magento 2? The dataprovider is set to $scope . '_product_listing' in vendor/magento/module-catalog/Ui/DataProvider/Product/Form/Modifier/Related.php – getGrid($scope) function, we need to create UI component like, so as per our example the custom link type code is ‘parts’ we need to create parts_product_listing.xml UI component. File Path: […]

