motion2082 Posted January 24, 2018 Share Posted January 24, 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...
Pierre_d Posted January 24, 2018 Share Posted January 24, 2018 It would be better to build the image URL within your module PHP code and pass it to the template for display. Templates are not supposed to contain PHP. Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted January 25, 2018 Share Posted January 25, 2018 On 1/24/2018 at 5:51 AM, motion2082 said: 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 Hi... can you need tracking your order with "http://www.myshopping.com.au" when order is place in prestashop store ? Thanks Link to comment Share on other sites More sharing options...
motion2082 Posted January 25, 2018 Author Share Posted January 25, 2018 18 hours ago, Pierre_d said: It would be better to build the image URL within your module PHP code and pass it to the template for display. Templates are not supposed to contain PHP. 100% agree, this is what I'm trying to do. Just have to work out how to do it as my Prestashop knowledge is minimal. Doesn't seem like there are many good tutorials on the internet to assist. Link to comment Share on other sites More sharing options...
motion2082 Posted January 25, 2018 Author Share Posted January 25, 2018 49 minutes ago, Nishith said: Hi... can you need tracking your order with "http://www.myshopping.com.au" when order is place in prestashop store ? Thanks As far as myshopping have told me, I need to add this code to the thank you page which PS doesn't have <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"> Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted January 25, 2018 Share Posted January 25, 2018 1 hour ago, motion2082 said: As far as myshopping have told me, I need to add this code to the thank you page which PS doesn't have <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"> Hi..here is your module file download and check it Thanks myshopping.zip Link to comment Share on other sites More sharing options...
motion2082 Posted January 25, 2018 Author Share Posted January 25, 2018 3 hours ago, Nishith said: Hi..here is your module file download and check it Thanks myshopping.zip Hi Nishith, Thank you for your help with this one. I really really appreciate it. Yours is a much better improvement on my attempt. Where did you learn to code Prestashop? Regards, Motion 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