Jump to content

Add html/php to confirmation.tpl with simple module


Recommended Posts

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

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

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

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

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

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...