Magento 2 - Tips
Tip 1: Dump the database from Magento Cloud using N98 STEP 1: STEP 2: Update the Project's database configuration STEP 3: Enjoy:
Tip 1: Dump the database from Magento Cloud using N98 STEP 1: STEP 2: Update the Project's database configuration STEP 3: Enjoy:
A client wants his multistore shop to be set up like this: http://www.domain1.org/en/ -> store view 2 http://www.domain1.org/de/ -> store view 3 http://www.domain1.org/fr/ -> store view 4 http://www.domain1.org/it/ -> store view 5 In this post, I will show you how to do this thing by using Nginx configuration. Step 1: add the configuration mapping to Nginx's conf file. /etc/nginx/config.d/mapping\store.conf Step 2: Update the Magento's nginx configuration By default, Magento provides sample Nginx configuration in the website's root directory. It doesn't…
This post we will show you How to create Hello World Module in Magento 2. As for Magento 2 Structure, all you should know all custom modules reside in the folder app/code, local and community are has been removed in Magento 2. In this post you will know how to create a new custom module, create route and display "Hello world" Step 1: Create the module's folder. In Magento 2 module name is divided into two part "Namespace\ModuleName", the first…
\=> How can I remove columns in exported CSV from order grid? https://magento.stackexchange.com/questions/166610/magento-2-how-can-i-remove-columns-in-exported-csv-from-order-grid Hello. Key: What you see is what you export!!! When you are working with admin grids, when you want to export data from the admin grid, but you know that you these columns of the data grid has hardcoded at the backend in \\ .xml\, Now I will give you a solution for this case you will export exactly columns you have selected. What you see is…
Magento 2 Open Source (CE) does not provide integration with Elasticsearch by default, but we have other choices for this case there are Elasticsearch is built-in - Magento 2.3.4 Magento 2 Free Module: Elasticsuite from Smile-SA => https://github.com/Smile-SA/elasticsuite/ Elasticsearch Free Service cloud: https://bonsai.io Now let we are going to Install Elasticsearch extension and config Elasticsearch extension with Bonsai Elasticsearch cloud Step 1: Create an account in https://bonsai.io and create your first Cluster. After all you will have an Access URL…
Continue of Part 1. After part 1 you know how to process with large Collection, why we need to use Model Factory instead of Model in \\constructor and Customer data sections to load a partition of the web page without disabling FULL page cache. Today I will provide you with consultation and assist you with some tips when you're working on data. Tip 1: Use in condition instead of for each id and load Data Model You have an array…
Magento 2 PHP Optimize Tips: There are many ways to optimize Magento 2. However, the first thing you should do is optimizing your codes before touching to DB or Cache. Tip 1: Using Factory in the constructor. Why did I say that? Because of the case very simple of Dependence Injection design working in Magento 2 \=> \constructor, \\constructor ... will be called, it's very bad if in the constructor or default functions call for each Collection. \=> If your…
How to initialize a block loader Magento 2: Did you want to add loader into \\templates/cart/totals.phtml\\ These some ways to add loader spinner into block or page. 1 Use: /\\ Block Content HTML \/ , with this option you should add \\isLoadding : ko.observable(false)\\ into your Component Example: Block XML Define Block templates.phtml CODE Script Javascript code: Namespace\ModuleName/js/componentjsfile 2: With using rjsResolver js file named "Namespace\ModuleName/js/abc" PHTML file
How to override Magento 2 js using Mixins? A Magento 2 RequireJS “mixins” allows you to programmatically listen for the initial instantiation of any RequireJS, How do mixins in Magento 2 work? First, create requirejs-config.js Magento\Checkout/js/model/quote js file you want to rewrite. PackageName\ModuleName/js/plugin-quote target file. plugin-quote.js You can't access the private variable from Magento\Checkout/js/model/quote. What is a private variable If your source file is returned $.mage.\ ex : Magento\Catalog/js/price-box.js Your destination file must return $.mage.\
1\. Raise somaxconn above \ value: Add this: When you reboot the next time, the new setting will be to allow 65535 connections instead of 128 as before. 2\. Make sure to disable Linux kernel feature transparent huge pages, it will affect greatly both memory usage and latency in a negative way. This is accomplished with the following command: then add the command to your /etc/rc.local file. 4\. Redis standard configuration for Magento 2: app/code/env.php 5\. redis-benmark tool http://antirez.com/news/84https://redis.io/topics/benchmarks