How to get CMS static block content in the template file magento 2?

You can add CMS static block content in a template file with your module or theme level.

I hope you have created one static block from the admin panel.
Content -> Elements -> Blocks and create a new CMS static block with your specific content. Continue reading “How to get CMS static block content in the template file magento 2?”

How to set current time for timestamp and datetime type in magento object save repository?

Timestamp and DateTime type of MySQL is used to set date and date/time value to the database table.

Both types contain the default attribute called default=”CURRENT_TIMESTAMP” to use the set current time in the table.

While you are working with the db_schema.xml file and need to add/update the current time in the table for any specific object save repository, you can set the default attribute with the value CURRENT_TIMESTAMP to save current time while placing an entry in the database table. Continue reading “How to set current time for timestamp and datetime type in magento object save repository?”

What is the difference between Visible on Catalog Pages on Storefront vs Used in Product Listing in magento?

By default, Magento comes with product attribute functionality for the different product types.

While you creating product attributes from the Magento admin panel, Stores -> Attributes -> Product

You have to create a new attribute as per your product requirement and while you go to the Storefront Properties tab from the attribute page, you will able to see two different fields for the attribute called,


Continue reading “What is the difference between Visible on Catalog Pages on Storefront vs Used in Product Listing in magento?”