CPTBombaxx Posted May 19, 2023 Share Posted May 19, 2023 Hello, i have a simple question. In our order confirmation mail we have {order_tracking} variable but it points to http:// tracking url not https:// , website is redirecting it fine to https but i would want it to be set correctly, however i don't know where can i change that {order_tracking} should point to https Link to comment Share on other sites More sharing options...
Knowband Plugins Posted May 22, 2023 Share Posted May 22, 2023 To update the value of a variable in the order confirmation email, you can utilize the actionEmailSendBefore() hook provided by PrestaShop. Use the following code as an example: public function hookActionEmailSendBefore($params) { // Check if the email being sent is the order confirmation email if ($params['template'] === 'order_conf') { // Modify the email content here $params['template_vars']['{order_tracking}'] = 'Updated order tracking URL data'; } } By implementing the above code in your custom module, you can easily replace the data of the order_tracking variable. Make sure to install and enable your module in the PrestaShop back office. Please note that this example demonstrates updating the order_tracking variable specifically in the order confirmation email. Adjust the code accordingly if you need to modify a different variable or target a different email template. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now