Jump to content

Recommended Posts

1. when placing an order as a guest and choosing to pay by bank transfer after clicking on the order confirmation, an error 500 pops up after refreshing the page, normally the order confirmation page is displayed after activating debug mode something like this is displayed

Fatal Error: Uncaught error: Call to member function setTemplate() on null in /home2/diamopl1/public_html/moskitiery24h/config/smartyfront.config.inc.php:97 Stack trace: #0 /home2/diamopl1/public_html/moskitiery24h/classes/Smarty/SmartyLazyRegister. php(81): smartyRender() #1 /home2/diamopl1/public_html/mosquitoes24h/var/cache/dev/smarty/compile/bentrizlayouts_layout_full_width_tpl/66/ec/04/66ec04ba1f332eff464356f30a4a1d16bab4f95c_2.file.order-confirmation.tpl.php(193): SmartyLazyRegister->__call() #2 /home2/diamopl1/public_html/mosquito24h/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(248): Block_20147842964b63e982aec99_71957917->callBlock() #3 /home2/diamopl1/public_html/mosquitoes24h/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(184): Smarty_Internal_Runtime_Inheritance->callBlock() #4 /home2/diamopl1/public_html/mosquitoes24h/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(156): Smarty_Internal_Runtime_Inheritance->process() in /home2/diamopl1/public_html/moskitiery24h/config/smartyfront.config.inc.php on line 97

When you place an order while logged in and choose to pay by bank transfer, you are immediately taken to the order confirmation page and no error is displayed.

When you place an order, whether you are a guest or logged in, and choose to pay on delivery, a message pops up:

Error - The following email template is missing: cashondelivery

For payment we currently use the Wire payment module from prestashop.

2. the messages about the order are not sent to the customer either, this applies to the guest and the logged-in person.

Things I have tried:

1.
- Uninstalling and reinstalling the Wire payment module
- Increasing max_execution_time to 3000
- I uninstalled and reinstalled the Cash on Delivery module
- I generated email templates through the admin panel
 I copied another email template, renamed it and it appeared in the templates, but in the statuses it was no longer possible to choose to associate it with a specific order status.
- I have chosen another selectable email status and after that, when choosing payment on delivery, the same message appears as in the case of an order with payment by bank transfer.


2.
- I changed the email address associated with the store
- I wanted to try ways from other forums, but there are no paths on the server such as:
/tools/swift/Swift/
/tools/swift/Swift/Plugin/

The version of prestashop I am using is 8.0.4 and the version of PHP is 7.4.5.

Does anyone know how to solve the above issues?

Link to comment
Share on other sites

20 hours ago, No4iqs said:

Error - The following email template is missing: cashondelivery

 

Hi,

If the "cashondelivery" template is missing, try generating all email templates again through the admin panel.

Make sure that the order status for "Cash on Delivery" is correctly configured and associated with the "cashondelivery" email template.

Thanks!

Link to comment
Share on other sites

  • 4 months later...
On 11/24/2023 at 9:44 AM, Alvaro de la Rosa said:

Hello No4iqs,

I am facing the same issue in my shop and I have spent a lot of days but I have not fixed nothing 😞

Have you found the solution to the problem?

Thanks in advance, regards

I used this solution:

What solved the issue was to open the file /config/smartyfront.config.inc.php
and editing the function starting on line 95

function smartyRender($params, &$smarty)
{
    $ui = $params['ui'];

    if (array_key_exists('file', $params)) {
        $ui->setTemplate($params['file']);
    }

    return $ui->render($params);
}

into 

function smartyRender($params, &$smarty)
{
    $ui = $params['ui'];

    if ($ui !== null) {
        if (array_key_exists('file', $params)) {
            $ui->setTemplate($params['file']);
        }

        return $ui->render($params);
    } else {
        // Handle the case where $params['ui'] is null
        // You can throw an exception, log an error, or take appropriate action.
    }
}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...