Hi,
I'm trying to add a field in the Order Page in the admin, I would like a column to show the name of the user group (Retailer, Shop, wholesaler etc) that I have set up with Seperate Price Per Customer.
I have so far come up with this :
I'm adding the column name here (for people interested admin/orders.php) :
I haven't bothered with language, Group will do fine (ID # is so I can show the ID number of the order, that might help somebody out).Code:<tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" width='30'><?php echo 'ID #'; ?></td> <td class="dataTableHeadingContent">Group</td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td> </tr>
And for the content :
Code:<td class="<?php echo $current_row; ?>"><?php echo '<font face=verdana size=1>' . $orders['orders_id']; ?></font></td> <td class="<?php echo $current_row; ?>"><?php echo '' . $customers['customers_group_id']; ?></font></td> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a>&nbsp;' . $orders['customers_name']; ?></td> <td class="dataTableContent" align="right"><?php echo strip_tags($orders['order_total']); ?></td> <td class="dataTableContent" align="center"><?php echo tep_datetime_short($orders['date_purchased']); ?></td> <td class="dataTableContent" align="right"><?php echo $orders['orders_status_name']; ?></td> <td class="dataTableContent" align="right"><?php if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td>
So the bit of code that I have got wrong is
Actualy I think it might be correct, but I have been told I am calling the group_id from the TABLE_ORDERS, which does not contain a group_id. I must call it from the TABLE_CUSTOMERS. The problem is, I'm not sure how to go about that.Code:<?php echo '' . $customers['customers_group_id']; ?> Anyone know what I should put here ?
Anyone have an idea?
I'm sure there isn't much more to do so that it works, it must be simple...
Thanx a lot.
All The Best with you online shop!




LinkBack URL
About LinkBacks






Bookmarks