Arshad Syed
  • Member for 4 years, 6 months
  • Last seen more than a month ago
  • Bengaluru, Karnataka, India
How to solve "Unable to apply data patch" when upgrading?
0 votes

Unable to apply data patch Sample\Module\Setup\Patch\Data\AddCustomDataPatch for module Sample_Module. Original exception message: Entity exist with same values. this is an issue may also occur when ...

View answer
customer name is not visible in newsletter conformation mail
0 votes

you can try this to get name of customer in Newsletter {{trans "Hello %customer_name," customer_name=$customer.name}}

View answer
Magento 2 Get Order Data In Order Email Confirmation Template
0 votes

To get order details <h1 class="greeting">{{trans "Hello %name," name=$order.getCustomerFirstname()}}</h1>

View answer
Deploy Magento 2.2.4 : @copyright__background-color is undefined
1 votes

had the same problem while deploying Compilation from source: /var/www/html/magento/magento_local/vendor/magento/theme-frontend-blank/web/css/styles-m.less variable @copyright__background-...

View answer
How to Solve 502 Bad Gateway error in Nginx Magento 2?
16 votes

I installed the magento2 when I am trying to open some pages facing 502 nginx issue, in nginx logs it is showing upstream sent too big header while reading response header from upstream, then solved ...

View answer
Magento 2 PHP extensions missing
0 votes

use below command for php requirement in magento2, here I am using php{7.3} make changes as per your required php version => php{version} sudo apt-get update sudo apt-get install php7.3-gd php7.3-...

View answer
Magento 2 translate error showing curly braces
0 votes

I had the same issue, this issue comes when you did not properly disable the configuration or inline translation configuration. please check the inline translation or any other configuration and make ...

View answer
Load multiple footers in Magento 2 transactional emails
0 votes

First create your template under your custom module app/code/Vendor/MyModule/view/frontend/email/footer_invoice_template.html Second to load the template from configuration app/code/Vendor/...

View answer
Override Flat Rate Model using Plugin
0 votes

To override the functionality of flatrate using plugin for private method. 1st Step: we need to add in Vendor/Module/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/...

View answer
How to get Attribute Text depending on storeId in magento2
Accepted answer
4 votes

You can get AttributeText by passing storeId from product collection: $stores = $this->_storeManager->getStores(); foreach ($stores as $key => $store) { $store_id = $store->...

View answer
Magento 2: How to get value from attribute from store_id 0 (admin/unique)?
0 votes

you can use below to get default attribute text $_condition = $_product->getAttributeText('condition'); $prod= $_product->setStoreId(0); $_coditionDefault =$_product->getResource()->...

View answer
There are no commands defined in the "setup" namespace : Magento 2
0 votes

Please check the permission of your magentoDirectory. $sudo rm -rf var/cache/* generated/code/* $sudo chmod 777 -R magentoDirectory $sudo chown -R www-data:www-data magentoDirectory $...

View answer
How to connect SFTP in magento 2
1 votes

I have tested your code with some modification and I am able to connect in your code port no. is missing. <?php use Magento\Framework\App\Bootstrap; require __DIR__ . '/app/bootstrap.php'; $...

View answer
Sftp not able to connect in magento2.2.5?
1 votes

In Magento, $this->sftp->open(); returns null. you can php function is_null() function in the condition. public function execute() { $connection = $this->sftp->open( ...

View answer
Checkout page take too much time to load
0 votes

First, you need to remove generated/code/* and var/cache/* rm -rf generated/code/* var/cache/* Second, Clean the cache php bin/magento cache:clean Third, Change the file permission sudo ...

View answer
Uncaught TypeError: Argument 2 passed to... must be an instance of - Magento 2.2.1
1 votes

I had the same issue and resolving it by following steps First, you need to remove generated/code/* and var/cache/* rm -rf generated/code/* var/cache/* Second, Clean the cache php bin/magento ...

View answer
Magento 2 Get category id using category title
0 votes

First, you need to inject collection factory class public function __construct( ... \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory $collecionFactory ) { $this->...

View answer
Magento 2 custom Admin controller redirect to Dashboard
0 votes

This happens because 'secret key' is missing when you just type in URL manually. Secret key feature is enabled by default and can be disabled here: Stores => Configuration => Advanced => Admin => ...

View answer
How to generate random password for customer in Magento2?
0 votes

I used the following method <?php function randomPassword() { $alphabet = "abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789"; $password = []; ...

View answer
Magento2: redirection problem from observer or Logging Out from two application at same time from observer
Accepted answer
2 votes

I am able to log out from two application from Magento and External application. First I destroyed the Magento session and redirect to the external application from there I also deleted the session ...

View answer
Logout by programming from observer in magento 2
1 votes

You have to write this below code in your module's Observer folder. Vendor/MyModule/Observer/CustomerLogoutObserver.php <?php namespace Vendor\MyModule\Observer; use Magento\Framework\Event\...

View answer
Magento2: Custom Logout Observer with redirection
0 votes

Yeah, I have found a solution by myself by doing a research If you want to do that then on __construct() function of your class observer, you must inject two classes. First, \Magento\...

View answer
Magento 2 - How to uninstall module?
2 votes

HERE IS THE STEP BY STEP GUIDE TO UNINSTALL ANY THIRD PARTY MODULE FROM MAGENTO 2 MANUALLY. Step 1: Remove the module Vendor_Mymodule from app\etc\config.php Step 2: Drop module tables or columns ...

View answer
New user registration Showing error " We Can't save the customer "
0 votes

Go to app/code/core/Mage/Customer/controllers/AccountController.php and find function named createPostAction(). In that function add die($e->getMessage()); Just after catch (Exception $e) {. You ...

View answer
addFieldToFilter in magento2 returning same data everytime
0 votes

Now I able to get correct Data, I changed userCollection class to userCollectionfactory class use Vendor\MyModule\Model\ResourceModel\Users\CollectionFactory as UserCollectionFactory; Every time ...

View answer
getting error: Class Magento\Indexer\Model\ResourceModel\Indexer\State\CollectionFactory does not exist
1 votes

In admin side I am getting Class Magento\Indexer\Model\ResourceModel\Indexer\State\CollectionFactory does not exist so I tried sudo php chown -R www-data:www-data my_magento2_folder/*

View answer
Can't change magento 2 orders to complete
0 votes

Once customer order is placed then admin can check that order and change the order status from pending to Complete Sales > Orders click on view for a particular order and Click on Invoice click ...

View answer
Magento 2 : Table Rate Shipping Method Not Working
0 votes

You can refer following Sites to enable Table Rates Shipping Method https://docs.magento.com/m2/ce/user_guide/shipping/shipping-table-rate.html https://www.mageplaza.com/kb/how-to-configure-table-...

View answer
Set default shipping method as table rate and not free shipping
0 votes

You need to disable the free shipping method and enabled only the flat shipping method. so that you can only flat shipping method in the checkout page while placing an order. disable free shipping ...

View answer
How to set Shipping Method and Payment Method for Diffrent Country
0 votes

If want to achieve two different prices in two different countries. You can create two different stores for different countries in magento2 and set the Price and shipping charges according to their ...

View answer