Ok, I put :
public function onControllerPagesCheckoutConfirm_UpdateData() {
$registry = Registry::getInstance();
$order_id = $registry->get('session')->data['order_id'];
$order_info = $registry->get('model_checkout_order')->getOrder($order_id);
$script_html = "Place Some html Here, for ex: <script> alert('Order Total: ".$order_info['total']."')</script>";
$this->baseObject->view->addHookVar('payment_pre',$script_html);
return ;
}
in extensions/strikehawk_ganalytics/core/strikehawk_ganalytics.php file as:
class StrikehawkGanalyticsStrikehawkGanalytics extends Extension {
public function __construct(){
$this->registry = Registry::getInstance();
}
public function onControllerPagesCheckoutConfirm_UpdateData() {
$registry = Registry::getInstance();
$order_id = $registry->get('session')->data['order_id'];
$order_info = $registry->get('model_checkout_order')->getOrder($order_id);
$script_html = "Place Some html Here, for ex: <script> alert('Order Total: ".$order_info['total']."')</script>";
$this->baseObject->view->addHookVar('payment_pre',$script_html);
return ;
}
Placed:
<?php echo $this->getHookVar('payment_pre'); ?>
in:
storefront/view/default/template/pages/checkout/confirm.php
Nothing appearing. Adding text above the getHookVar call does result in that text showing up on the page, so I think I have the right template for this purpose. (Still would rather this comes out on checkout success, but at this point am just trying to get something to display in a catalog page...)
Now, should note I have no controllers or models setup for this extension.