Another Technique (2d)
Cronjob
https://devdocs.magento.com/guides/v2.4/config-guide/cron/custom-cron-tut.html
Note: Install cron if you want to run cronjon automatically: bin/magento cron:install
Indexer
CLI command line
Knockout js và áp dụng trong magento 2:
Giới thiệu:https://knockoutjs.com/documentation/introduction.html
Tutorial: http://learn.knockoutjs.com/
Dùng knockout js trong magento 2: https://webkul.com/blog/use-knockout-js-custom-template-magento2/
Exercise:
Create cli command line:
bin/magento get:product:list --type=simple to get all simple product id
bin/magento get:product:list --type=virtual to get all virtual product id
Create module:
Create page with controller /showProductList
Write api to get 10 first simple product, return json type
When access controller by /showProductList, use AJAX to call api , use template by knockout js to display simple product like that: