Jump to content

error with my smarty template


Recommended Posts

Hello everyone 
I need help. When I want to access my smarty template

if (!$redirectUrl = $params['customRedirectUrl'] ?? null) {
if ('Verification du numéro de paiement' === $params['redirectUrl']) {
// Créer un tableau avec les détails de la commande à passer au template
 
$orderDetails = [
'firstname' => $params['clientdetails']['firstname'],
'lastname' => $params['clientdetails']['lastname'],
'email' => $params['clientdetails']['email'],
];
 
// Initialisation de Smarty
$smarty = new Smarty();
// Définir le chemin du template à partir de __DIR__
$pathToTemplate = '/var/www/html/web/modules/gateways/mobilemoney/templates/mobilemoney_order.tpl';
 
// Vérifier si le fichier template existe avant de le charger
if (file_exists($pathToTemplate)) {
$smarty->setCompileDir('/var/www/html/web/templates_c');
return $smarty->fetch($pathToTemplate);
} else {
return 'Le fichier template n\'existe pas.';
}
 
} else {
$redirectUrl = $params['returnurl'];
}
}

I get the error,

For additional assistance, please reference the WHMCS TroubleShooting Guide »

--> Smarty: unable to create directory /var/www/html/web/templates_c <--

 can anyone help me?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated