JB dema Posted October 14 Share Posted October 14 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? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.