Magento 2 command list
Hello reader today we share list of the some usfull magento 2 command list. You will find the list of important commands Magento 2. Connect the SSH and go to magento root directory to run/execute the commands MAGENTO 2 USEFUL COMMANDS LIST Elasticsearch entry into Database bin/magento config:set catalog/search/engine elasticsearch7 bin/magento config:set catalog/search/elasticsearch7_server_hostname 191.161.1.11 bin/magento […]
Create enquiry form in Magento 2
Today I am going to explain How to Create Custom enquire Form in Magento 2. Forms are a great way to gather customer information and insert into database or send email to the admin user as per the requirement. With the help of the below code, you can Create Custom Form in Magento 2 Frontend. […]
Magento 2 add custom js file in module
Hey reader today we will disscuss about to add js file in custom module . Please follow below step to done this job. Step 1. Create requirejs-config.js file on below path :- app/code/VendorName/ModuleName/view/frontend/requirejs-config.js var config = { map: { ‘*’: { myjs: ‘VendorName_ModuleName/js/myjs’, } }, deps: [‘jquery’] }; Step 2. Create myjs.js file on below […]
Setup Multi Website in Magento 2
Today we discuss how to create multi-websites in Magento 2 . Magento allows you to setup multi-websites for your single installed Magento. For example www.example.com is a main website and you want to like this www.example.com/newsetup/ Then you need to create newsetup dirctory(folder) on magento root dirctory. Step 1. Find the website code 1. Go […]
Price range filter in Magento 2
Today we disscus about price range filter in Magento 2, Sometime we need product collection filter by min_price, final_price and minimal_price range in custom module. There are some below solutions. Solution 1 The final_price is part of the price index tables, so you can’t work with it the same way as you would do with […]
Magento 2 API security issue
Today we discuss about API security issue in magento 2. By default, Magento 2 now prevents anonymous users from accessing the APIs that could reveal sensitive information. When the feature is enabled, the user must have administrator privileges to execute the affected APIs. Preventing anonymous access to these endpoints could cause third-party integrations to fail. […]
Add multiple sitemap into one in Website
Hello reader today we will discuss add multiple sitemap into one in Website. What is sitemap : An XML sitemap contain the website URls. It can have a maximum of 50,000 URLs, and an uncompressed file size limit of 50MB. When we exceed the limit, we will need to split our URLs across multiple XML […]
Magento 2- Product images not showing in PWA setup
Today we share solution of images not showing in PWA issue. Someone had done a PWA setup on the local machine. But facing product and category images issue. Try below solution:- Solution 1. Locate the following line in the .env file of the root folder: IMAGE_OPTIMIZING_ORIGIN=auto Replace it with: IMAGE_OPTIMIZING_ORIGIN=backend Run : yarn watch Solution […]
Magento 2 – Cannot find field “newsletter_enabled” on type StoreConfig pwa-studio
“Cannot query field “newsletter_enabled” someone face this kind of issue when setup PWA with magento. Error :- Error: Cannot query field “newsletter_enabled” on type “StoreConfig”. (… 1 errors total) at /var/www/vhosts/mysite.com/htdocs/pwa-studio/node_modules/@magento/pwa-buildpack/lib/Utilities/graphQL.js:54:21 at processTicksAndRejections (node:internal/process/task_queues:96:5) at async module.exports (/var/www/vhosts/mysite.com/htdocs/pwa-studio/webpack.config.js:62:29) Solution:- Run the below command in Magento root which is defined in the .env file of the […]
Magento2 Option FollowSymLinks not allowed here
Sometimes in Magento2 images are not showing and Internal Server Error on the front-end during the development process. Issue 1. Magento2 image not showing frontend. Issue 2. Magento2 Option FollowSymLinks not allowed here Issue 3. Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server […]
Magento 2 get Helper function in XML
Create a dynamic link in the customer account. Here you make the dynamic link as per your logic. 1) Define helper class {vendor}\{Module}\Helper\Data in navigation link <?xml version=”1.0″?> <page xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:View/Layout/etc/page_configuration.xsd”> <body> <referenceBlock name=”customer_account_navigation”> <block class=”Magento\Customer\Block\Account\SortLinkInterface” name=”customer-account-navigation-new-product-link” after=”-“> <arguments> <argument name=”label” xsi:type=”string”>Some link</argument> <argument name=”path” xsi:type=”helper” helper=”{Vendor}\{Module}\Helper\Data::getLink”></argument> </arguments> </block> </referenceBlock> </body> </page> 2) Now create […]
You did not sign in correctly or your account is temporarily disabled In Magento 2
In Magento sometimes we face the issue “You did not sign in correctly or your account is temporarily disabled” when creating token using rest API. If you are calling rest API like http://www.yoursite.com/all/V1/integration/admin/token and you are getting the error message. You need to clean the oauth token requests logs. To do so, is as simple […]