Issue
I am creating a module for prestashop 1.7, and I would like to add a text inside this block but I do not know how to do it:
I do not know if to use a hook, and which one!
edit : without modifying the tpl file of the theme Thank's!
Solution
You can use this hook:
{hook h='displayProductPriceBlock' product=$product type="before_price"}
public function HookDisplayProductPriceBlock($params)
{
if ($params['type'] == "before_price") {
return 'TEXT'; // or return TPL file
}
}
UPDATE:
On your module, you just need to register "displayProductPriceBlock" hook during installation process and add above function to yourmodule.php file.
Answered By - Mahdi Shad Answer Checked By - David Marino (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.