
On this weblog, we’re going to discover ways to present the customized message block within the order affirmation web page on the entrance finish in PrestaShop.
Typically we have to present some extra data on the order affirmation web page on the entrance finish. So, we are able to obtain this by following steps.
Step 1:
Register “paymentReturn” hook in your module. To take action name the next operate in the principle file of your module-
$this->registerHook(‘paymentReturn’);
Step 2:
Create a operate in the principle file of your module to deal with the functioning and return Tpl file.
For instance:
public operate hookPaymentReturn($params)
{
$this->context->smarty->assign(array(
‘msg’ => $this->l(‘Thankyou for buy. Your order is
confirmed’)
));
return $this->fetch(
'module:mymodule/views/templates/hook/custom_msg.tpl'
);
}
Now create a tpl file on this path “/views/templates/hook” and write the
html textual content that you just wish to show on the block.
<div class=”alert alert-success”>{$msg}</div>
<p>{l s=’- Your order will probably be despatched as quickly as potential’ mod=’mymodule’}</p>
Observe:
This can be a fundamental instance wherein we simply displayed a easy message. Right here you’ll be able to show any type of data like order data, buyer data, and so forth.
If any challenge or doubt please be at liberty to say it within the remark part. I’d be blissful to assist.
Additionally, you’ll be able to discover our PrestaShop Growth Providers & a wide range of high quality PrestaShop Modules.
For any doubt contact us at [email protected]