TES
In this blog I will show you how we can generate admin token using REST API.Rest API endpoint = https://domain.test/rest/V1/integration/admin/tokenMethod: POSTContent type = Content-Type:application/jsonPost Data = {“username”:”<USER-NAME>”, “password”:”<PASSWORD>”} Example:The following image shows a token request for the admin account using a REST client: We can refer adobe commerce document for generate tokens.I hope this blog is useful to generate admin token using Rest API. In case, I missed anything or need to add some more…
If you want to delete legacy database table then you can follow this blog. In blog, We try to delete database entries using root script in magento2.Here is script for delete entries from magento database. Create file deleteData.php in magento root directory. You can run script in magento root path on server. You can use php $argv for pass parameters while run script. See documentHere is code you delete entries with parameter command.Command php deleteData.php…
Sometimes we need to perform some quick action for get data or update data in magento database then this root script help. Root script is easy to create and use. sometimes it’s save lots time of developer and client. We can create root script for different reasons. For example, if you want to get the list of product which contain attribute x value y and update those product attribute a value b.We can use root…
If you get error while install akeneo eneterprice in magento2 then follow below solution. Errors:Sync mirror failed: Failed to execute git remote set-url origin — ‘ssh://git@distribution.akeneo.com:443/magento2-connector-enterprise’ && git remote update –prune origin && git remote set-url origin — ‘ssh://git@distribution.akeneo.com:443/magento2-connector-enterprise’fatal: Couldn’t find remote ref HEADerror: Could not fetch originfatal: the remote end hung up unexpectedly Failed to update ssh://git@distribution.akeneo.com:443/magento2-connector-enterprise, package information from this repository may be outdated Fixed: https://docs.akeneo.com/6.0/cloud_edition/flexibility_mode/docs/composer_settings.html
As we have lots files on server var/log folder. so I have tips for debug logs in adobe cloud or on-premises. Let’s start to analyse logs in magento2.Here is three tips for analyse logs.1. You can monitor live logs using below command. When you run command then you can see live logs.tail -f var/log/*.log 2. If you want to check specific error in old log files then run bewlo command.grep -r ‘error xyz’ var/log/* 3.…
In this blog, I will show you how to upgrade Magento 2.4.5-p1 to 2.4.6-p3 opensource project.If your project integrated with git then first create new branch like release/magento246-p3 using commandgit checkout -b release/magento246-p3We need to upgrade software first. We can see software requirement here Software2.4.5-p12.4.6-p3Composer2.22.2Elasticsearch7.178.7OpenSearch1.22.5MariaDB10.410.6PHP8.18.2, 8.1RabbitMQ3.93.11Redis6.27.0Varnish7.07.3 Run below command to update module version in composer.jsoncomposer require magento/product-community-edition 2.4.6-p3 –no-updateORManually update package version in composer.json file “magento/product-community-edition”: “2.4.6-p3”, Next step is run composer updatethen run magento…
When we upgrade Magento 2.4.6 then we might get deprecated Zend classes errors in custom modules because of some Zend class removed in Magento 2.4.6. In this blog I added some depreciated Zend classes alternative to fix those error. We have some alternative of Zend class are Laminas classes and Magento classesHere is list of alternative of Zend classes.\Zend_Http_Client::POST => \Laminas\Http\Request::METHOD_POST\Zend_Http_Client::GET => \Laminas\Http\Request::METHOD_GET\Zend_Json => \Laminas\Json\Json\Zend_Filter => \Magento\Framework\Filter\FilterInput\Zend_Http_Client => \Laminas\Http\Request\Zend_Http_Response => \Laminas\Http\Response\Zend_Validate => \Laminas\Validator\Zend_Filter_Input => \Magento\Framework\Filter\FilterInput\Zend_Json_Exception…
We’ll show you how to add category attributes in magento2 and display in category form. We show here 3 easy step for add category attribute and display attribute to category form. Step 1: Create patch file for create category attribute. Create file below.app/code/MageDad/Module/Setup/Patch/Data/AddAttributeCategoryAttribute.php Step 2: In this step we are going to add attribute in category form. Create file – app/code/MageDad/Module/view/adminhtml/ui_component/category_form.xml Step 2: Run setup upgrade commandphp bin/magento setup:upgrade I hope this blog is useful…
When you test your magento code with PHPStan then facing some issue for code qaulity like PHPStan: __construct() has parameter $components with no value type specified initerable type array.Might be your code is like below: And error like below: We don’t know array format of $components and $data so we need to ingore this errors in phpstan-baseline.neonNeed to run below command for fix error: I hope you like this solution.