Magento 2 make default system config value

please read first post make configure opitons for theme. Find path config We’ll make default system config value for our module. Please see file app/code/<vendor_name>/<module_name>/etc/adminhtml/system.xml The path config is section/grounp/value Make default system config Now, we’ll create file app/code/<vendor_name>/<module_name>/etc/config.xml should look like: This code will make default system config value when you install module.

Magento 2 add custom category attributes

Please read first post Magento 2.3 create simple module to make configure opitons for theme. Create the attributes We’ll use our module to make script udpate category attributes. Suppose current our module version is 1.0.0, create file app/code/<vendor_name>/<module_name>/Setup/UpgradeSchema.php should look like: Show its in backend create file app/code/<vendor_name>/<module_name>/view/adminhtml/ui_component/category_form.xml should look like: Then update version for … Continue reading “Magento 2 add custom category attributes”

Magento 2.3 get product colection

please read first post Magento 2.3 create simple module to make configure opitons for theme. Make block get product colection Create file app/code/<vendor_name>/<module_name>/Block/Products.php should look like: We’ll get BestSeller products on home page. So go to backend then paste below code to content home page. After create file <theme_dir>/Magento_Theme/templates/product/bestseller.phtml should look like: We was update … Continue reading “Magento 2.3 get product colection”

Magento 2.3 make custom page layout

Magento gave us 5 frontend form page layout: Empty, 1column, 2columns-left, 2columns-right, 3column. Simplest is Empty. It has not header, footer, left sidebar, right sidebar but it has all js,css,cookies,session… You can find it in: vendor\magento\module-theme\view\base\page_layout The layout 1column, 2columns-left, 2columns-right, 3column was extended from Empty layout. You can find it in: vendor\magento\module-theme\view\frontend\page_layout If the … Continue reading “Magento 2.3 make custom page layout”

Magento 2.3 how to get store config value

please read first post Magento 2.3 create simple module to make configure opitons for theme. we’ll read the values directly from app/code/Magebay/Themes/etc/adminhtml/system.xml The path config is section/grounp/value Get value yes/no in xml file: For example: create file <theme_dir>/Magebay_Themes/layout/default.xml then insert the following code. Then create file <theme_dir>/Magebay_Themes/templates/html/mainBaner.phtml then insert the following code. <h1>Create banner here</h1> … Continue reading “Magento 2.3 how to get store config value”

Magento 2.3 create simple module to make configure opitons for theme

Please read first post Magento 2.3 creat New Theme. We’ll build module file structure looks as follows: app/code/Magebay/ ├── Themes/ │ ├── etc/ │ │ ├── adminhtml/ │ │ │ ├── menu.xml │ │ │ ├── routes.xml │ │ │ ├── system.xml │ │ ├── module.xml │ ├── composer.json │ ├── registration.php <vendor_name> is module … Continue reading “Magento 2.3 create simple module to make configure opitons for theme”