Monday, 11 November 2019

Magento 2 admin product disabled filter issues

You have to copy the vendor\magento\module-catalog\Ui\DataProvider\Product\ProductCollection.php  
to
app/code/Magento/Catalog/Ui/DataProvider/Product/ProductCollection.php  

Replace the following code in addAttributeToFilterAllStores(Attribute $attributeModel, array $condition): void function

$condition = "({$pKey} = {$fKey}) AND ("
            . $this->_getConditionSql("{$tableName}.value", $condition)

            . ')';


With 


$attributeId = $attributeModel->getAttributeId();
        $condition = "({$pKey} = {$fKey}) AND ("
            . $this->_getConditionSql("{$tableName}.value", $condition)
            . ') AND ('
            . $this->_getConditionSql("{$tableName}.attribute_id", $attributeId)

            . ')';

Friday, 8 November 2019

Magento 2 Order Grid not showing NEW orders

1 - Go to Admin panel
2 - Click Stores - Configuration
3 - Advanced - Developer - Grid Settings
4 - Set Asynchronous Indexing to "Enable"
5 - Flush cache - (php bin/magento cache:flush;)
6 - Go to the database table "sales_order_grid". You can truncate this table.
7 - run this command twice - php bin/magento cron:run
8 - Flush cache - (php bin/magento cache:flush;)
9 - Set Asynchronous Indexing to "Disable"
10 - Flush cache - (php bin/magento cache:flush;)

Saturday, 5 October 2019

10 Top Unix Shell Scripting Interview Questions And Answers

1) What is Shell?

Ans: Shell is a command interpreter, which interprets the command which the user gives to the kernel. It can also be defined as an interface between a user and operating system.

2) What is Shell Scripting?

Ans: Shell scripting is nothing but series or sequence of UNIX commands written in a plain text file. Instead of specifying one job/command at a time, in shell scripting we give a list of UNIX commands like a to-do list in a file to execute it.

3) What is the Importance of writing Shell Scripts?

Ans: The points given below explain the importance of writing shell scripts.

Shell script takes input from the user, file and displays it on the screen.
Shell scripting is very useful in creating your own commands.
It is helpful in automating some tasks of the day to day life.
It is useful for automating system administration tasks.
Mainly it saves time.

4) What are the Advantages of C Shell over Bourne Shell?

Ans: The advantages of C Shell over Bourne Shell are:

C shell allows aliasing of commands i.e. a user can give any name of his choice to the command. This feature is mainly useful when a user has to type the lengthy command again and again. At that point of time, instead of typing a lengthy command a user can type the name that he has given.
C shell provides command history feature. C shell remembers the previously typed command. Thus, it avoids typing the command again and again.

5) How many shell scripts come with UNIX operating system?

Ans: There are approximately 280 shell scripts that come with the UNIX operating system.

6) What are the default permissions of a file when it is created?

Ans: 666 i.e. rw-rw-rw- is the default permission of a file when it is created.


7) What are Shell Variables?

Ans: Shell variables are the main part of shell programming or scripting. They mainly provide the ability to store and manipulate information within a shell program.


8) What is the lifespan of a variable inside a shell script?

Ans: The lifespan of a variable inside shell script is only until the end of execution.


9) Generally, each block in UNIX is how many bytes?

Ans: Generally, each block in UNIX is of 1024 bytes.

10) What is a file system?

Ans: The file system is a collection of files which contain related information of the files.

How to check cronjob details in Magento 2?

Use the following command


crontab -l

Git fetch all data without checkout

git fetch origin master:master

MySql Database Export Command

mysqldump -u dbusername -p databasename> database.sql
then press enter, they you have to paste the password.

Install SSL Free lets encrypt

sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot python-certbot-nginx

sudo certbot --nginx

sudo service nginx restart


You have to check the 60 and 442 port are open or not in the inbout and outbound area.