Just set is_used_in_grid as false.
All posts by Pramod T P
Extract sql.gz file
You can use the below command to extract sql.gz file.
gzip -d example.sql.gz
windows 10 host file location
C:\Windows\System32\drivers\etc
Expand Root Partition CentOS
Run the following command to increase the root partition
lvextend -L+15G /dev/mapper/centos-root && xfs_growfs -d /dev/mapper/centos-root
magento 2 multi store default nginx configuration
map $http_host $MAGE_RUN_CODE { in.phpcodez.com default; } map $http_host $MAGE_RUN_TYPE { in.phpcodez.com store; } server { listen 80; server_name in.phpcodez.com; set $MAGE_ROOT /usr/share/nginx/html/phpcodez; set $MAGE_MODE developer; include /usr/share/nginx/html/phpcodez/nginx.conf.sample; }
Invalid Base URL. Value must be a URL or one of placeholders: {{base_url}}
Make sure that URL ends with a /(slash) .
example : http://phpcodez.com/
magento 2 increase session timeout
- Log in to Magento using your administrator account.
In the left sidebar, click Stores, and then under Settings, click Configuration. - Click Advanced, and then click Admin.
Under Security, in the Admin Session Lifetime (seconds) text box, - type the session timeout interval in seconds that you want to use. For example, a value of 1200 sets a timeout interval of 20 minutes.
- Click Save Config.
- Log out of Magento, and then log back in. The new session timeout interval is now active.
Magento 2 Observers
Observers are the particular classes that control the general behavior, performance, or change in the business logic of the store. They are executed whenever a specific event for which they were set to listen is triggered.
To create an observer in Magento 2, you must place your class file under the ModuleRoot/Observer
directory. The observer class file should use Magento\Framework\Event\Observer
and Magento\Framework\Event\ObserverInterface
class and define the executive function.
Magento 2 Events
Events are dispatched by Magento 2 modules whenever specific actions are triggered. When an event dispatches, it passes data to the observer that is configured to watch (or monitor) that event. You can dispatch Magento 2 Events using the Magento\Framework\Event\Manager
class. This class can be obtained through dependency injection by defining the dependency in the constructor method of the class.
To dispatch an event, you have to call the dispatch function of the event manager class, providing the name of the event along with an array of data that you wish to deliver to observers.
List File Size In GB Linux
Use –block-size=M /G
For example ls -lrt --block-size=GB
will list the files with size info in GB