Browsed by
Tag: Development

Shopify CLI Docker image

Shopify CLI Docker image

Shopify CLI is a command-line interface tool that helps you build Shopify apps and themes. It quickly generates Node.js, Ruby on Rails, and PHP apps, app extensions, and Shopify themes. You can also use it to automate many common development tasks. Theme Kit is a cross-platform command line tool that you can use to build Shopify themes. Docker hub: https://hub.docker.com/r/hieuhidro/shopify How to use the image DOCKER DOCKER COMPOSE docker-compose.yml: docker-compose Starting development a theme Access to the container or Adding…

Read More Read More

How to cache Magento collection query results

How to cache Magento collection query results

Introduction Today, I would like to introduce “How to cache the Magento collection result” without customizing the PHP code. When you have worked with the Magento collection, you would like to consider if you can cache the result for the next time if the data aren’t generally updated by admin or 3rd tools. By default, Magento support saves the result of the collection to cache but it is not enabled by default, we have to add some custom to di.xml…

Read More Read More

How to create a custom message queue in Magento 2

How to create a custom message queue in Magento 2

We know that Magento 2 supports consumer and MessageQueue by default (MQF). The Message Queue Framework (MQF) is a system that allows a module to publish messages to queues. It also defines the consumers that will receive the messages asynchronously. Example, after save the order, you have to send a notification to the customer (In this case, we temporary forget the feature asynchronous email, and forcus to the process that could asynchronously) The following diagram illustrates the Message Queue Framework In…

Read More Read More

Adding a customization product filter on the product list

Adding a customization product filter on the product list

Some day, you has a request that add a default filter on category & search result page that always filter product match a condition such as “Style Jacket”. Adding a customization filter on layered navigation of the category and search result page isn’t simple, Today I will provide you with how to do those things with  Default Magento and Customize the module Amasty Layered Navigation.. Part 1: Adding a custom filter on category page/search page with default Magento 2. Firstly, You…

Read More Read More

Debug Magento Cloud project with Xdebug

Debug Magento Cloud project with Xdebug

Debug Magento Cloud project with Xdebug It’s the same as remote debugging on a webserver. Just some differences are listed below– Magento Cloud has 3 nodes for the staging environment.– You have to create a ticket on Magento support for enabling Xdebug and get the Xdebug key. Requirements To run and use Xdebug, you need the SSH URL for the environment. You can locate the information through the Project Web Interface or your Cloud Onboarding UI. Configure Xdebug To configure…

Read More Read More

Magento 2 Graylog integration

Magento 2 Graylog integration

This module allows your Magento website to push the log to your Graylog service, easy to use, stable, helps you investigate the log faster. >> hidro/module-graylog – Packagist What is Graylog: “Graylog provides answers to your team’s security, application, and IT infrastructure questions by enabling you to combine, enrich, correlate, query, and visualize all your log data in one place”: Industry Leading Log Management | Graylog Main Functionalities Installation Type 1: Zip file Unzip the zip file in app/code/Hidro Enable…

Read More Read More

Export admin grid with selected columns

Export admin grid with selected columns

=> 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 *[grid_id].xml*, Now I will give you a solution for this case you will export exactly columns you have selected. What you see is what you…

Read More Read More

Magento 2 PHP Optimize Tips – Part 1

Magento 2 PHP Optimize Tips – Part 1

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 classes are Factory the…

Read More Read More