This is the section on the Account History tpl_account_history_info_default.php that echos out the display:
<tr>
<td class="accountQuantityDisplay"><?php echo $order->products[$i]['qty'] . QUANTITY_SUFFIX; ?></td>
<td class="accountProductDisplay"><?php echo $order->products[$i]['name'];
if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {
echo '<ul id="orderAttribsList">';
for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
echo '<li>' . $order->products[$i]['attributes'][$j]['option'] . TEXT_OPTION_DIVIDER . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value'])) . '</li>';
}
echo '</ul>';
}
?>
</td>
<?php
if (sizeof($order->info['tax_groups']) > 1) {
?>
<td class="accountTaxDisplay"><?php echo zen_display_tax_value($order->products[$i]['tax']) . '%' ?></td>
<?php
}
?>
<td class="accountTotalDisplay"><?php echo $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') ?></td>
</tr>
This is the section of the orders.php class that builds that section ...
$subindex = 0;
$attributes_query = "select products_options_id, products_options_values_id, products_options, products_options_values,
options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . "
where orders_id = '" . (int)$order_id . "'
and orders_products_id = '" . (int)$orders_products->fields['orders_products_id'] . "'";
$attributes = $db->Execute($attributes_query);
if ($attributes->RecordCount()) {
while (!$attributes->EOF) {
$this->products[$index]['attributes'][$subindex] = array('option' => $attributes->fields['products_options'],
'value' => $attributes->fields['products_options_values'],
'prefix' => $attributes->fields['price_prefix'],
'price' => $attributes->fields['options_values_price']);
$subindex++;
$attributes->MoveNext();
}
}
Again you need to load the weight and prefix into the select then add it to the array so it is available in the template ...
Linda McGrath
If you have to think ... you haven't been zenned ...
**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!