motion2082 Posted January 22, 2018 Share Posted January 22, 2018 Hey guys, I would like to add this snippet of code to my order-confirmation.tpl <img src="https://www.myshopping.com.au/sale.asp?mid=1234567&amount=<?php echo number_format($order_total_result[value],2) ; ?>&order=<?php echo $order_id ; ?>" width="1" height="1"> I have started trying to make a basic module to implement this code however I would like someone to confirm this will work as it's calling a URL with a php echo inside. If you get the time could you please have a look? Regards, Motion myshipping.zip Link to comment Share on other sites More sharing options...
musicmaster Posted January 25, 2018 Share Posted January 25, 2018 You cannot use php in the template files. The Smarty versions that Prestashop uses don't allow that. The only way to get the desired effect is to assign the desired text to a variable in the PHP code that call the template to be displayed. Link to comment Share on other sites More sharing options...
motion2082 Posted January 26, 2018 Author Share Posted January 26, 2018 4 hours ago, musicmaster said: You cannot use php in the template files. The Smarty versions that Prestashop uses don't allow that. The only way to get the desired effect is to assign the desired text to a variable in the PHP code that call the template to be displayed. Thanks MusicMaster, found this to be the case. 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