Zen Cart Logo
Forums / All Other Contributions/Addons / Ask order question mod

Ask order question mod

Locked

Views: 1,070

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
15 Nov 2006, 5:18 AM
#1
dscott1966 avatar

dscott1966

Zen Follower

Join Date:
Apr 2005
Posts:
298
Plugin Contributions:
0

Ask order question mod

I installed this mod and tested it but for some reason i'm having a problem getting the button to work. When i try to press the button nothing happends.

I looked in the the file tpl_account_history_info_default.php where the button is for that but i can not get it to work can someone please help me with this.

Here is a copy of the file and what i have here:

<?php /** * Page Template * * Loaded automatically by index.php?main_page=account_edit.<br /> * Displays information related to a single specific order * * @package templateSystem * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: tpl_account_history_info_default.php 3306 2006-03-29 07:15:46Z drbyte $ * * Includes adjustments made for the Order Questions Modification by Absolute Solutions. (PM: Absolute) */ ?> <div class="centerColumn" id="accountHistInfo"> <div class="forward"><?php echo HEADING_ORDER_DATE . ' ' . zen_date_long($order->info['date_purchased']); ?></div> <br class="clearBoth" /> <table border="0" width="100%" cellspacing="0" cellpadding="0" summary="Itemized listing of previous order, includes number ordered, items and prices"> <caption><h2 id="orderHistoryDetailedOrder"><?php echo HEADING_TITLE . ORDER_HEADING_DIVIDER . sprintf(HEADING_ORDER_NUMBER, $_GET['order_id']); ?></h2></caption> <tr class="tableHeading"> <th scope="col" id="myAccountQuantity"><?php echo HEADING_QUANTITY; ?></th> <th scope="col" id="myAccountProducts"><?php echo HEADING_PRODUCTS; ?></th> <?php if (sizeof($order->info['tax_groups']) > 1) { ?> <th scope="col" id="myAccountTax"><?php echo HEADING_TAX; ?></th> <?php } ?> <th scope="col" id="myAccountTotal"><?php echo HEADING_TOTAL; ?></th> </tr> <?php for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { ?> <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($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>
<?php } ?> </table> <hr /> <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 } ?> </div> <?php /** * Used to display any downloads associated with the cutomers account */ if (DOWNLOAD_ENABLED == 'true') require($template->get_template_dir('tpl_modules_downloads.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_downloads.php'); ?> <?php /** * Used to loop thru and display order status information */ // ABSOLUTE SOLUTIONS MODIFICATION TO IMPROVE THE APPEARANCE OF STATUS LISTING ?> <table border="0" width="100%" cellspacing="0" cellpadding="0" id="myAccountOrdersStatus" summary="Table contains the date, order status and any comments regarding the order"> <caption><h2 id="orderHistoryStatus"><?php echo HEADING_ORDER_HISTORY; ?></h2></caption> <tr class="tableHeading"> <th scope="col" id="myAccountStatusDate"> </th> <th scope="col" id="myAccountStatusDate"><?php echo TABLE_HEADING_STATUS_DATE; ?></th> <th scope="col" id="myAccountStatus"><?php echo TABLE_HEADING_STATUS_ORDER_STATUS; ?></th> <th scope="col" id="myAccountStatusComments"><?php echo TABLE_HEADING_STATUS_COMMENTS; ?></th> </tr> <?php foreach ($statusArray as $statuses) { ?> <tr> <td height="20" width="20"> <?php if (empty($statuses['comments'])) { echo ' '; } else { echo '<img src="' . DIR_WS_IMAGES . ($statuses['author'] == 'a' ? 'admin_icon' : 'customer_icon') . '.gif" alt="' . ($statuses['author'] == 'a' ? TEXT_ADMIN_COMMENT : TEXT_CUSTOMER_COMMENT) . '"height="20" width="20" />'; } ?> </td> <td><?php echo zen_date_short($statuses['date_added']); ?></td> <td><?php echo $statuses['orders_status_name']; ?></td> <td><?php echo (empty($statuses['comments']) ? ' ' : nl2br(zen_output_string_protected($statuses['comments']))); ?></td> </tr> <?php } ?> </table> <?php // END OF ABSOLUTE SOLUTIONS MODIFICATION TO IMPROVE THE APPEARANCE OF STATUS LISTING ?> <hr /> <!-- Start of Order Question Module --> <?php if (ALLOW_ORDER_QUESTION == 'true') { // '<a href="' . . '" target="ask_question">' . zen_image_button(BUTTON_IMAGE_ORDER_QUESTION, BUTTON_ORDER_QUESTION_ALT, 'onClick=javascript:window.open("' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_ORDER_QUESTION . '?order_id=' . $_GET['order_id'] . '", echo '<div class="order_history_question" style="text-align:center;"><br />' . TEXT_ORDER_QUESTION_LINK . '<br /><br />' . zen_image_button(BUTTON_IMAGE_ORDER_QUESTION, BUTTON_ORDER_QUESTION_ALT, 'onClick=\'javascript:window.open("' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_ORDER_QUESTION . '?order_id=' . $_GET['order_id'] . '", "ask_question","toolbar=no,width=300,height=425")\' style="cursor:hand;"') . '<br /></div>'; echo '<hr />'; } ?> <!-- End of Order Question Module --> <div id="myAccountShipInfo" class="floatingBox back"> <?php if ($order->delivery != false) { ?> <h3><?php echo HEADING_DELIVERY_ADDRESS; ?></h3> <address><?php echo zen_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br />'); ?></address> <?php } ?> <?php if (zen_not_null($order->info['shipping_method'])) { ?> <h4><?php echo HEADING_SHIPPING_METHOD; ?></h4> <div><?php echo $order->info['shipping_method']; ?></div> <?php } else { // temporary just remove these 4 lines ?> <div>WARNING: Missing Shipping Information</div> <?php } ?> </div> <div id="myAccountPaymentInfo" class="floatingBox forward"> <h3><?php echo HEADING_BILLING_ADDRESS; ?></h3> <address><?php echo zen_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br />'); ?></address> <h4><?php echo HEADING_PAYMENT_METHOD; ?></h4> <div><?php echo $order->info['payment_method']; ?></div> </div> <br class="clearBoth" /> </div>