Beispiel #1
0
    echo TABLE_HEADING_COMMENTS;
    ?>
</b></td>
          </tr>
<?php 
    $orders_status_historytable = $oostable['orders_status_history'];
    $orders_history_result = $dbconn->Execute("SELECT orders_status_id, date_added, customer_notified, comments FROM {$orders_status_historytable} WHERE orders_id = '" . oos_db_input($oID) . "' ORDER BY date_added");
    if ($orders_history_result->RecordCount()) {
        while ($orders_history = $orders_history_result->fields) {
            echo '          <tr>' . "\n" . '            <td class="smallText" align="center">' . oos_datetime_short($orders_history['date_added']) . '</td>' . "\n" . '            <td class="smallText" align="center">';
            if ($orders_history['customer_notified'] == '1') {
                echo oos_image(OOS_IMAGES . 'icons/tick.gif', ICON_TICK) . "</td>\n";
            } else {
                echo oos_image(OOS_IMAGES . 'icons/cross.gif', ICON_CROSS) . "</td>\n";
            }
            echo '            <td class="smallText">' . $orders_status_array[$orders_history['orders_status_id']] . '</td>' . "\n" . '            <td class="smallText">' . nl2br(oosDBOutput($orders_history['comments'])) . '&nbsp;</td>' . "\n" . '          </tr>' . "\n";
            // Move that ADOdb pointer!
            $orders_history_result->MoveNext();
        }
    } else {
        echo '          <tr>' . "\n" . '            <td class="smallText" colspan="5">' . TEXT_NO_ORDER_HISTORY . '</td>' . "\n" . '          </tr>' . "\n";
    }
    ?>
        </table></td>
      </tr>
      <tr>
        <td class="main"><br /><b><?php 
    echo TABLE_HEADING_COMMENTS;
    ?>
</b></td>
      </tr>
    }
    ?>
          </tr>
<?php 
    $orders_history_result = $dbconn->Execute("select * from " . $oostable['orders_status_history'] . " WHERE orders_id = '" . oos_db_input($oID) . "' order by date_added");
    if ($orders_history_result->RecordCount()) {
        while ($orders_history = $orders_history_result->fields) {
            echo '          <tr>' . "\n" . '            <td class="smallText" align="center">' . oos_datetime_short($orders_history['date_added']) . '</td>' . "\n" . '            <td class="smallText" align="center">';
            if ($orders_history['customer_notified'] == '1') {
                echo oos_image(OOS_IMAGES . 'icons/tick.gif', ICON_TICK) . "</td>\n";
            } else {
                echo oos_image(OOS_IMAGES . 'icons/cross.gif', ICON_CROSS) . "</td>\n";
            }
            echo '            <td class="smallText">' . $orders_status_array[$orders_history['orders_status_id']] . '</td>' . "\n";
            if ($CommentsWithStatus) {
                echo '            <td class="smallText">' . nl2br(oosDBOutput($orders_history['comments'])) . '&nbsp;</td>' . "\n";
            }
            echo '          </tr>' . "\n";
            // Move that ADOdb pointer!
            $orders_history_result->MoveNext();
        }
    } else {
        echo '          <tr>' . "\n" . '            <td class="smallText" colspan="5">' . TEXT_NO_ORDER_HISTORY . '</td>' . "\n" . '          </tr>' . "\n";
    }
    ?>
        </table></td>
      </tr>

      <tr>
        <td class="main"><br /><b><?php 
    echo TABLE_HEADING_COMMENTS;
    $total_cost += $total_products_price;

    $products_ordered .= $oOrder->products[$i]['qty'] . ' x ' . $oOrder->products[$i]['name'] . ' (' . $oOrder->products[$i]['model'] . ') = ' . $oCurrencies->display_price($oOrder->products[$i]['final_price'], $oOrder->products[$i]['tax'], $oOrder->products[$i]['qty']) . $products_ordered_attributes . "\n";
}


$oOrderTotalModules->apply_credit();

// lets start with the email confirmation
$email_order = STORE_NAME . "\n" .
               $aLang['email_separator'] . "\n" .
               $aLang['email_text_order_number'] . ' ' . $insert_id . "\n" .
               $aLang['email_text_invoice_url'] . ' ' . oos_href_link($aPages['account_history_info'], 'order_id=' . $insert_id, 'SSL', false) . "\n" .
               $aLang['email_text_date_ordered'] . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
if ($oOrder->info['comments']) {
    $email_order .= oosDBOutput($oOrder->info['comments']) . "\n\n";
}


if (isset($_SESSION['campaigns_id'])) {
    $email_order .= $aLang['email_separator'] . "\n" .
                    $aLang['email_text_campaigns'] . "\n" .
                    oos_get_campaigns_name($_SESSION['campaigns_id']) . "\n\n";
}


$email_order .= $aLang['email_text_products'] . "\n" .
                $aLang['email_separator'] . "\n" .
                $products_ordered .
                $aLang['email_separator'] . "\n";