Overriding a module template from a (child) theme
If you remember our whrelaycarrier
module, it adds a modal box that appears by choosing the Relay Carrier shipping option in the FO checkout controller. This modal box is provided by the displayAfterCarrier
hook via the /modules/whrelaycarrier/views/templates/hook/displayAfterCarrier.tpl
Smarty template file.
The modal box as designed in the original module looks as follows:
Figure 15.1 – The Relay points choice modal box provided by the original whrelaycarrier module
Our challenge here will be to add an H3
tag after the relay points H2
tag for the active (child) theme and not for others. This new tag will contain the "Custom Line to add to our theme text"
text. The modal box should finally look like this:
Figure 15.2 – The custom (child) theme relay points choice modal box with the new H3 tag
Let’s suppose that the active theme is the child...