We will now create a front controller named Payment
. But first of all, in displayPayment.tpl
, set the link to the controller on the href
attribute using the getModuleLink
method (which we also saw in the previous chapter):
<a href="{$link->getModuleLink('mymodpayment', 'payment')|escape:'html'}" class="mymodpayment">
Next, create the payment.php
file in the controllers/front/
directory of your module and fill it with a front controller that will display the payment.tpl
template:
<?php class MyModPaymentPaymentModuleFrontController extends ModuleFrontController { public $ssl = true; public function initContent() { // Call parent init content method parent::initContent(); // Set template $this->setTemplate('payment.tpl'); } }