Thursday, 14 April 2022

Get started PWA Studio with Magento 2

Minimum requirements#

  • Basic knowledge of React
  • Node >= 10.14.1
  • Yarn (recommended) or NPM

Before you can start developing with PWA Studio, make sure you meet the requirements listed on this page.

Note: You must have a version of NodeJS >=10.14.1, and Yarn >=1.13.0. The latest LTS versions of both are recommended.

Reference link: https://developer.adobe.com/commerce/pwa-studio/tutorials/

when checking the yarn version some time is an error below

kuldeep@8DYTVG3:~$ yarn -v

ERROR: There are no scenarios; must have at least one.

Solution:

Fix  'ERROR: There are no scenarios; must have at least one.' run the below command.

sudo apt remove yarn

In my case (Ubuntu 18.04) it was the following:

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

sudo apt update && sudo apt install yarn

kuldeep@8DYTVG3:~$ yarn -v

1.22.18




Thursday, 24 March 2022

Magento 2 Solved: cluster_block_exception

error: cluster_block_exception [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block] .

This error means you do not have enough disk space to store or update data. The flood storage watermark is 95% default, so when it exceeds, the above error is shown and it puts the Elasticsearch into read-only mode. So you need to free up disk space or enlarge it.

Steps to Solve Reindex issue with Elasticsearch: run below cmd

curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_cluster/settings -d '{ "transient": { "cluster.routing.allocation.disk.threshold_enabled": false } }'

curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'

php bin/magento indexer:reindex

Magento 2.2.4 :menu is not showing after upgrade CE To EE

I was found that issue related to Varnish Cache

If we select Store -> Configuration -> Advanced -> System -> Full page cache -> Caching Application Set to Varnish Cache then menu are not appear in home page other then appear on all pages .

Monday, 2 December 2019

Magento 2 Add Attribute Name To Configurable Select Option 'Choose a option..'

Configurable products display 'Choose an option...'. with Attribute option label like 'Color Choose an option...'


You also need to change that text in below file,

vendor/magento/module-configurable-product/view/frontend/web/js/configurable.js
In this file, you need to find _fillSelect method and see "chooseText" value.

element.options[0].innerHTML = this.options.spConfig.chooseText

Replace with below code


var attribute_lable = this.options.spConfig.attributes[element.id.replace(/[a-z]*/, '')]['label']; element.options[0].innerHTML = attribute_lable +' ' + this.options.spConfig.chooseText; 

Thanks,

Wednesday, 16 October 2019

Magento 2: Pub Static CSS files are present but show 404

Resolved after placing the missing .htaccess file in the static folder.

Magento 2 Error error too many redirects in admin login screen

This web page has a redirect loop.

Go to PHP Myadmin

In the "core_config_data" table remove the value of "web/cookie/cookie_domain" and set "web/cookie/cookie_httponly" to "0". 

Clear the cache by 'php -d error_log= -d memory_limit=-1 bin/magento cache:flush'

Thursday, 1 August 2019

Magento 2.3.1 Notice: Undefined index: color_bucket / gift_dropdown_bucket / gift_price_bucket

This is not to be a problem in Magento, but in problem with Elastic-Search.

Magento 2.3.1 Notice: Undefined index: color_bucket / gift_dropdown_bucket / gift_price_bucket \/app\/vendor\/magento\/module-elasticsearch\/SearchAdapter\/Aggregation\/Builder\/Term.php$

Solved :

 Find the attribute gift_dropdown remove _bucket

Go To admin and Store >> Product then search attribute with code.

Use in Search: No

Use In Search Results Layered Navigation No 

Then run the following two commands:

php bin/magento cache:clean

php bin/magento indexer:reindex catalogsearch_fulltext 

if get this warning for another attribute after doing this change. repeat the same process with another attribute.