Magento 2: upload file in frontend

Add menu in Dashboard customer_account.xml in this route_nam_controller_name_action_name.xml layout file call this phtml file ADD this HTML to your .phml file which one used for file upload now user select file and upload here and when user submits button click then ACTION PATH controller call.put this code into your this controller file.

Show category image programmatically in magetno 2

There are two options on the Magento to show the category image on the description page In your layout.xml file add below After creating a new file this file add the ViewModel folder and add the code below.file name is CategoryList.php and your template file add the below code. file name is template.phtml 2nd option… Continue reading Show category image programmatically in magetno 2

SQL Issue on the server

Job for mysqld.service failed See “systemctl status mysqld.service” This message came after deploying the mysql service and we will not be able to run the service. use the terminal to route to the following commands This will resolve the issues on the server and will be able to run the MySQL services on the local… Continue reading SQL Issue on the server

Add Custom Currency to Magento 2

As we all know Magento 2 does not support CryptoCurrency yet, so here we are going to learn how we can add a new currency. The very first step to start with is to modify your module’s registration.php file Here is the code for the CurrencyBundle.php file, keep this fine in app/code/Vendor/Module/Override/CurrencyBundle.php Now we will… Continue reading Add Custom Currency to Magento 2

Installing PWA with Magento 2 yarn error

Yarn error during the installtion For this we have to add the following in the terminal In Linux or Mac Using PWA STUDIO For Magento Follow the linkhttps://developer.adobe.com/commerce/pwa-studio/tutorials/setup-storefront/ arn basically stands for Yet Another Resource Negotiator. Developed by Facebook, Yarn is an extremely efficient packet manager that lets you share code with other developers. When… Continue reading Installing PWA with Magento 2 yarn error

Reinstall Apache 2 Sever

when there are error like Uncaught Error: Call to undefined function PhpMyAdmin\\mb_strpos() in /usr/share/phpmyadmin/libraries/classes/Url.php:253\nStack trace:\n#0 /usr/share/phpmyadmin/libraries/classes/Url.php(206): PhpMyAdmin\\Url::getArgSeparator()\n#1 /usr/share/phpmyadmin/libraries/classes/Url.php(169): PhpMyAdmin\\Url::getCommonRaw()\n#2 /usr/share/phpmyadmin/libraries/classes/Core.php(749): PhpMyAdmin\\Url::getCommon()\n#3 /usr/share/phpmyadmin/libraries/classes/Core.php(330): PhpMyAdmin\\Core::linkURL()\n#4 /usr/share/phpmyadmin/libraries/classes/Core.php(353): PhpMyAdmin\\Core::getPHPDocLink()\n#5 /usr/share/phpmyadmin/libraries/classes/Core.php(973): PhpMyAdmin\\Core::warnMissingExtension()\n#6 /usr/share/phpmyadmin/libraries/common.inc.php(106): PhpMyAdmin\\Core::checkExtensions()\n#7 /usr/share/phpmyadmin/sql.php(21): require_once(‘…’)\n#8 {main}\n thrown in /usr/share/phpmyadmin/libraries/classes/Url.php on line 253 Job for apache2.service failed because the control process exited with error code. See “systemctl status apache2.service” and… Continue reading Reinstall Apache 2 Sever

Add a product to the cart programmatically

To add a product to cart programmatically the code is used for the purpose is listed Here we used a simple product ID but in dynamic cases, the product ID should be collected ad it should applied