Totally Zenned
- Join Date:
- Apr 2007
- Location:
- Ontario, Canada
- Posts:
- 1,733
- Plugin Contributions:
- 14
[Not a Bug] tpl_account_history_info & header_php lacks global order total module
tpl_account_history_info_default.php & header_php.php lacks global order total module
It looks like this page was not included when the checkout pages went global...
tpl_account_history_info_default.php
<div id="orderTotals">
<?php
for ($i=0, $n=sizeof($order->totals); $i<$n; $i++) {
?>
<div class="amount larger forward"><?php echo $order->totals[$i]['text'] ?></div>
<div class="lineTitle larger forward"><?php echo $order->totals[$i]['title'] ?></div>
<br class="clearBoth" />
<?php
}
?>
Should look more like this:
<?php
if (MODULE_ORDER_TOTAL_INSTALLED) {
$order_totals = $order_total_modules->process();
?>
<div id="orderTotals"><?php $order_total_modules->output(); ?></div>
<?php
}
?>
**header_php.php
**```php
require(DIR_WS_CLASSES . 'order.php');
$order = new order($_GET['order_id']);
**
Should look more like this:**
```php
require(DIR_WS_CLASSES . 'order.php');
//$order = new order;
$order = new order($_GET['order_id']);
// load the selected shipping module
require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping($_SESSION['shipping']);
require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;
$order_total_modules->collect_posts();
$order_total_modules->pre_confirmation_check();
// load the selected payment module
require(DIR_WS_CLASSES . 'payment.php');
Now account history info can see and display the status of the active order total modules.
NOTE: this is NOT a fix, this fixes every other element on the page except sub-total.
In the morning I'll sort out the $0.00 sub-total and post my findings.