Clever blog_

 

How to save form data to the custom table in Magento 2

Blog Image

Magento 2 SET DATA IN CUSTOM TABLE BY POST METHOD

To set data to our new table, we need to create a new controller Index.php in app/code/CleverCode/HelloWorld/Controller/Add with following contents:

Learn more

How to fetch data from a database and display it in Magento 2

Blog Image

Magento 2 Model

To get information from our table, we need to create a model which extends from AbstractModel. Models are used to connect to the database, and process data from and to it. To create that, we need to prepare a file entitled Data.php in app/code/CleverCode/HelloWorld/Model with the following contents:

Learn more

How to upgrade custom table in Magento 2

Blog Image

Magento 2 UPGRADE TABLE

We will add the next column for our Hello table. To do this we need to create UpgradeSchema.php in app/code/CleverCode/HelloWorld/Setup with the following contents:

Learn more

How to create a custom table in Magento 2

Blog Image

Magento 2 Create A Custom Table

Today we will create a custom table in Magento 2 to our HelloWorld Module. If you need to carry information instead of attributes, this is a good choice for you.

Learn more

How to create Block and Layout Configuration in Magento 2

Blog Image

Magento 2 BLOCK

Today we will create a Block and .phtml template for our HelloWorld Module. We need this to display data with HTML code.

Learn more

Our first Module and its controller in Magento 2

Blog Image

MAGENTO 2 DEVELOPER MODE

To put Magento into developer mode, we need to run the following command:

Why do we need it? It will show all the errors for us, disable the static view of file caching, enable automatic code compilation and allow for enhanced debugging. System logging is in var/reports . When we are finished, we can set Magento to production mode by:

Learn more

Magento 2 Installation

Blog Image

Magento 2 Installation

Today we will install Magento 2. Why do we need to do this? Previous versions will still work, but Magento will stop supporting these versions in a few years’ time.

Learn more

Follow the fox_

Pursuant to the Personal Data Protection Law (Official Gazette no.922/2016) I hereby agree to the processing of my personal data for marketing purposes by Clever Code Marcin Baranowski, with its registered office at 218, ul. Suraska 1, Bialystok (15-093).

I hereby express my consent to receive commercial information in electronic fashion from Clever Code Marcin Baranowski, with its registered office at 218, ul. Suraska 1, Bialystok (15-093), Suraska 1 St., commercial information in electronic way.

These agreements may be canceled at any time. Personal data will not be shared with any other recipients. You have the right to access and amend this data at any time.