Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Including Javascript


lastblackjellybean

Recommended Posts

Posted

Hi everyone,

 

I need to include some javascript within my chechout_success.php file but i'm not sure how to put it in without getting an unexpected T_string error. Does it need to be within quotes or something? I've tried to just paste in the code in within

define('TEXT_SUCCESS', 'Your order has been successfully processed! Your products will arrive at their destination within 2-5 working days.');

But this is when i get the T_String error.

 

Is it best to put it in catalog/checkout_success.php or english/checkout_success.php?

 

Cheers for any help

Posted

It depends on the code. It can be pasted anywhere but may require to be in a certain place to work properly. Wherever you insert, it is inserted as html would be. So it is within a block of php, you have to escape out of the php by using <? and <?php. The javascript would go between them.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...