How to register custom Smarty plugins in shopware 5?

How to Register Custom Smarty Plugins in Shopware 5

Smarty is the template engine for PHP. It’s a program inside the shopware that takes tpl files interpret the code written there and then outputs the HTML.

To register custom Smarty plugins in shopware 5 follow the following steps.

We are going to create the Smarty plugins in the Custom themes.

File Structure

themes>Frontend>Custom>frontend>index

Step 1: First create the logo-container.tpl file name inside the index directory.

Note: It will override the parent logo-container.tpl in themes>Frontend>Bare>frontend>index.

Step 2: Now to go the logo-container.tpl which we created on the Step 1.

This will override the parent file.

Step 3: Extends the parent file and create the contain below the DemoShop logo.

Note: Block name are taken from the themes>Frontend>Bare>frontend>index>logo-container.tpl files

Result