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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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">

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More