magento2

Magento 2 Load, Save and Delete Deprecated Methods Alternatives

As Magento is going to remove the Model abstract’s methods(save, load and delete).we have 2 options OR alternatives.1. Use Repository2. Use resource Model Repository interface implementation in Model Example/*** Save test data./ public function save(\Vendor\Module\Api\Data\TestInterface $test) { //your code } /** Retrieve test data./ public function getById($testId) { //your code } /** Delete test./ public …

Magento 2 Load, Save and Delete Deprecated Methods Alternatives Read More »

Failed to load resource: the server responded with a status of 404 (Not Found) Magento 2.4

Apart from the above error, we also see below error while doing a setup in local. 1 exception(s): Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: templates/page/js/require_js.phtml’ in module: ‘Magento_Backend’ block’s name: ‘require.js’ SolutionGive proper permission chmod -R 777 MAGENTO_2_ROOT_DIRECTORY/php bin/magento setup:static-content:deploy rm -rf var/* except .htaccess Enable apache rewrite_moduleOptions Indexes FollowSymLinks Includes ExecCGIAllowOverride AllRequire all granted …

Failed to load resource: the server responded with a status of 404 (Not Found) Magento 2.4 Read More »

How to Exclude External Js from Minification, Bundling and Merge in Magento 2

Basically Js minification is a part of Optimization of Magento, When we enable the minification and bundling then all the js files get merged into single file and cached, that leads to faster loading of JS.For more details please visit this link Optimise-Js-Files Previously we used to create the after Plugin as below, to exclude …

How to Exclude External Js from Minification, Bundling and Merge in Magento 2 Read More »

Magento 2 ViewModel as per Single Responsibility Principle

Before studying ViewModel feature of Magento 2, let’s understand first SRP.SRP stands for Single Responsibility Principle, Every class should have responsibility over a single part of the functionality provided by the software, and that responsibility should be entirely encapsulated by the class.In simple words : Each class should ideally have only one purpose to change.Basically this is a part …

Magento 2 ViewModel as per Single Responsibility Principle Read More »

How to create Customer Address Attribute in Magento 2

Before we start the Implementation, lets understand the few terms that we are going to use in further blog.– Eav (entity attribute value)– Entity– Attribute or Property– FormsEAV stands for Entity Attribute and Value, Eav is a data model which describes the Entities where attributes are the properties or Arguments or parameters. Basically EAV is …

How to create Customer Address Attribute in Magento 2 Read More »

Scroll to Top