On this weblog, we’re about to study, methods to Show Content material on the PrestaShop Contact Web page. So, we are going to outline a few of PrestaShop’s native hooks.
Personalizing the contact web page in PrestaShop may be important for making progress in consumer inclusion and giving productive data to your shoppers.
This weblog will present up you methods to seem customized substance on each the cleared-out and proper columns of the PrestaShop contact web page using a customized module.
Let’s begin:
1- Understanding Hooks in PrestaShop
We’ll use hooks like displayContactLeftColumn and displayContactRightColumn to incorporate content material throughout the left and proper columns and displayContactContent to incorporate content material beneath contact kind.
2- Displaying Content material Utilizing a Customized Module
On this instance, we’ll create a customized module to show content material within the left, proper, and heart columns of the contact web page.
Step 1: Create the Customized Module
Create a brand new folder within the /modules/
listing, for instance, /modules/wktestmodule/
. Inside this folder, create a PHP file named wktestmodule.php
.
Right here is the construction of the customized module:
identify = 'wktestmodule'; $this->tab = 'front_office_features'; $this->model = '1.0.0'; $this->writer = 'Webkul'; $this->need_instance = 0; dad or mum::__construct(); $this->displayName = $this->l('Wk Check Module'); $this->description = $this->l('Provides customized content material to the contact web page.'); } public perform set up() { return dad or mum::set up() && $this->registerHook('displayContactLeftColumn') && $this->registerHook('displayContactRightColumn') && $this->registerHook('displayContactContent'); } public perform hookDisplayContactLeftColumn($params) { return 'That is customized textual content within the left column of the contact web page.
'; } public perform hookDisplayContactRightColumn($params) { return 'That is customized textual content in the appropriate column of the contact web page.
'; } public perform hookDisplayContactContent($params) { return 'That is customized textual content within the heart column of the contact web page.
'; } }
Step 2: Set up and Allow the Module
- Zip the
wktestmodule
folder. - Go to the PrestaShop again workplace, navigate to
Modules > Module Supervisor
, and click on onAdd a module
. - Add the zipped file and set up the module.
Step 3: Confirm the Content material Show
After putting in and enabling the module, go to your retailer’s contact web page. You need to see customized textual content displayed within the left, proper, and heart columns.
3- Consequence
Right here’s what the contact web page appears like with the customized content material added:
- Left Column: Shows the textual content “That is customized textual content within the left column of the web page.”
- Proper Column: Shows the textual content “That is customized textual content in the appropriate column of the web page.”
- Middle Column: Shows the textual content “That is customized textual content within the heart column of the web page.”
Right here’s a picture that represents, how the customized content material is displayed throughout the left, proper, and heart columns on the contact web page.
Including customized content material to the left, proper, and heart columns of your PrestaShop contact web page permits for a totally custom-made structure that may improve the consumer expertise.
By making a customized module and utilizing hooks, you may simply handle and show content material throughout completely different components of the web page, tailoring the knowledge to your retailer’s wants.
Observe: Hook displayContactLeftColumn, displayContactRightColumn, and displayContactContent can be utilized solely within the PrestaShop Model ranging from V8.1.0
That’s all about this weblog.
If any points or doubts with the above step, please be happy to tell us within the remark part.
We’d be completely satisfied to assist.
You too can study How you can add an e-mail structure and variables in a theme from a module
You too can discover our PrestaShop Growth Companies and a wide range of high quality PrestaShop Modules.
For any doubt contact us at [email protected].
On this weblog, we’re about to study, methods to Show Content material on the PrestaShop Contact Web page. So, we are going to outline a few of PrestaShop’s native hooks.
Personalizing the contact web page in PrestaShop may be important for making progress in consumer inclusion and giving productive data to your shoppers.
This weblog will present up you methods to seem customized substance on each the cleared-out and proper columns of the PrestaShop contact web page using a customized module.
Let’s begin:
1- Understanding Hooks in PrestaShop
We’ll use hooks like displayContactLeftColumn and displayContactRightColumn to incorporate content material throughout the left and proper columns and displayContactContent to incorporate content material beneath contact kind.
2- Displaying Content material Utilizing a Customized Module
On this instance, we’ll create a customized module to show content material within the left, proper, and heart columns of the contact web page.
Step 1: Create the Customized Module
Create a brand new folder within the /modules/
listing, for instance, /modules/wktestmodule/
. Inside this folder, create a PHP file named wktestmodule.php
.
Right here is the construction of the customized module:
identify = 'wktestmodule'; $this->tab = 'front_office_features'; $this->model = '1.0.0'; $this->writer = 'Webkul'; $this->need_instance = 0; dad or mum::__construct(); $this->displayName = $this->l('Wk Check Module'); $this->description = $this->l('Provides customized content material to the contact web page.'); } public perform set up() { return dad or mum::set up() && $this->registerHook('displayContactLeftColumn') && $this->registerHook('displayContactRightColumn') && $this->registerHook('displayContactContent'); } public perform hookDisplayContactLeftColumn($params) { return 'That is customized textual content within the left column of the contact web page.
'; } public perform hookDisplayContactRightColumn($params) { return 'That is customized textual content in the appropriate column of the contact web page.
'; } public perform hookDisplayContactContent($params) { return 'That is customized textual content within the heart column of the contact web page.
'; } }
Step 2: Set up and Allow the Module
- Zip the
wktestmodule
folder. - Go to the PrestaShop again workplace, navigate to
Modules > Module Supervisor
, and click on onAdd a module
. - Add the zipped file and set up the module.
Step 3: Confirm the Content material Show
After putting in and enabling the module, go to your retailer’s contact web page. You need to see customized textual content displayed within the left, proper, and heart columns.
3- Consequence
Right here’s what the contact web page appears like with the customized content material added:
- Left Column: Shows the textual content “That is customized textual content within the left column of the web page.”
- Proper Column: Shows the textual content “That is customized textual content in the appropriate column of the web page.”
- Middle Column: Shows the textual content “That is customized textual content within the heart column of the web page.”
Right here’s a picture that represents, how the customized content material is displayed throughout the left, proper, and heart columns on the contact web page.
Including customized content material to the left, proper, and heart columns of your PrestaShop contact web page permits for a totally custom-made structure that may improve the consumer expertise.
By making a customized module and utilizing hooks, you may simply handle and show content material throughout completely different components of the web page, tailoring the knowledge to your retailer’s wants.
Observe: Hook displayContactLeftColumn, displayContactRightColumn, and displayContactContent can be utilized solely within the PrestaShop Model ranging from V8.1.0
That’s all about this weblog.
If any points or doubts with the above step, please be happy to tell us within the remark part.
We’d be completely satisfied to assist.
You too can study How you can add an e-mail structure and variables in a theme from a module
You too can discover our PrestaShop Growth Companies and a wide range of high quality PrestaShop Modules.
For any doubt contact us at [email protected].