Using $order_info hooks in checkout landing page

Hey guys,

We a bit of custom code in the order details page (pre-2.0.10) that picked up some data about the current order and generated a form with a button that connects to our Remote Help Desk.

However this feature is not working when I pasted that same code into the checkout landing page, as it’s just a normal HTML block.

Does anyone know how to make this information available within the order checkout landing page? Currently it’s delivering the actual hook name as the form field contents, ex: {$}.

Any help would be much appreciated!

If you are seeing just the template variable syntax (and it is correct), it would seem that however you are getting it there is after the template engine has generated all the html (like adding it to a textbox in admin panel which will not work).

If you can post an excerpt of your previous insertion along with your current insertion we might be able to help (please use code tags). Unfortunately your use of terminology is incorrect. You use “hook name” to reference a template variable so it;s hard for usto follow what you’re really saying.

Also, what is a checkout landing page? A url (or at least the dispatch= part would help).

Hey there, I forgot to subscribe to the thread so didn’t see your message. You’re right, I ment template variable, and the checkout landing page is a new feature in CS-Cart, that enables a new special page for the user to land on after the payment has been fulfilled (if you look in the block manager, it will have a tab saying “Order landing page”. What I had before (still implemented) is an HTML form in the order_details.tpl that grabs some info about the order (what was purchased, some details about customer, etc…) and sends it to LogMeIn to start a support session. We sell Online Computer Support so I need it to be automatic. I will try to see with the Design Mode if I can figure out what template is being used to display that landing page and will try to sort it out. If I’m not able to do it, I will post more details (i.e. the form that I’m using, paths, etc…).

Thanks for your message anyway, it lit up an “idea bulb” to get me going.

Why would you do this type of thing from template hooks versus php hooks?

You need to register a hook for ‘order_placement_routines’ in your addons/my_changes/init.php file like:


Then in your addons/my_change/func.php file, add a function such as:

fn_my_changes_order_placment_routines($order_id) {
$order_info = fn_get_order_data($order_id);
// do what you want with the order_info

Thanks for the tip. Seems that I am having issues explaining myself correctly. The HTML form will be finally presented in the form of a button on said order landing page, so the customer is aware that he will be connecting to a technician after he paid.

I will try to make it work just as in the order_details.tpl, if not I’ll investigate further, but the way it currently works on that area of my store is perfect.