public static function execute(ApplicationAbstract $application) { $OSCOM_Customer = Registry::get('Customer'); $OSCOM_NavigationHistory = Registry::get('NavigationHistory'); $OSCOM_Language = Registry::get('Language'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); if ($OSCOM_Customer->isLoggedOn() === false) { $OSCOM_NavigationHistory->setSnapshot(); osc_redirect(OSCOM::getLink(null, null, 'LogIn', 'SSL')); } $application->setPageTitle(OSCOM::getDef('orders_heading')); $application->setPageContent('orders.php'); $OSCOM_Language->load('order'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_my_orders'), OSCOM::getLink(null, null, 'Orders', 'SSL')); if (is_numeric($_GET['Orders'])) { $OSCOM_Breadcrumb->add(sprintf(OSCOM::getDef('breadcrumb_order_information'), $_GET['Orders']), OSCOM::getLink(null, null, 'Orders=' . $_GET['Orders'], 'SSL')); } } if (is_numeric($_GET['Orders'])) { if (Order::getCustomerID($_GET['Orders']) !== $OSCOM_Customer->getID()) { osc_redirect(OSCOM::getLink(null, null, null, 'SSL')); } $application->setPageTitle(sprintf(OSCOM::getDef('order_information_heading'), $_GET['Orders'])); $application->setPageContent('orders_info.php'); } }
<?php /** * osCommerce Online Merchant * * @copyright Copyright (c) 2011 osCommerce; http://www.oscommerce.com * @license BSD License; http://www.oscommerce.com/bsdlicense.txt */ use osCommerce\OM\Core\DateTime; use osCommerce\OM\Core\HTML; use osCommerce\OM\Core\OSCOM; use osCommerce\OM\Core\Site\Shop\Address; use osCommerce\OM\Core\Site\Shop\Order; use osCommerce\OM\Core\Site\Shop\Tax; $order = new Order($_GET['Orders']); ?> <h1><?php echo $OSCOM_Template->getPageTitle(); ?> </h1> <div class="moduleBox"> <span style="float: right;"><h6><?php echo OSCOM::getDef('order_total_heading') . ' ' . $order->info['total']; ?> </h6></span> <h6><?php echo OSCOM::getDef('order_date_heading') . ' ' . DateTime::getLong($order->info['date_purchased']) . ' <small>(' . $order->info['orders_status'] . ')</small>'; ?>
public function process() { $OSCOM_ShoppingCart = Registry::get('ShoppingCart'); $OSCOM_Currencies = Registry::get('Currencies'); if (!isset($_SESSION['Shop']['PM']['PAYPAL']['EC']['TOKEN'])) { $this->initializeExpressCheckout(); } $params = array('TOKEN' => $_SESSION['Shop']['PM']['PAYPAL']['EC']['TOKEN'], 'PAYERID' => $_SESSION['Shop']['PM']['PAYPAL']['EC']['PAYERID'], 'AMT' => $OSCOM_ShoppingCart->getTotal(), 'CURRENCYCODE' => $OSCOM_Currencies->getCode()); if ($OSCOM_ShoppingCart->hasShippingAddress()) { $params['SHIPTONAME'] = $OSCOM_ShoppingCart->getShippingAddress('firstname') . ' ' . $OSCOM_ShoppingCart->getShippingAddress('lastname'); $params['SHIPTOSTREET'] = $OSCOM_ShoppingCart->getShippingAddress('street_address'); $params['SHIPTOCITY'] = $OSCOM_ShoppingCart->getShippingAddress('city'); $params['SHIPTOSTATE'] = $OSCOM_ShoppingCart->getShippingAddress('zone_code'); $params['SHIPTOCOUNTRYCODE'] = $OSCOM_ShoppingCart->getShippingAddress('country_iso_code_2'); $params['SHIPTOZIP'] = $OSCOM_ShoppingCart->getShippingAddress('postcode'); } $response_array = $this->doExpressCheckoutPayment($params); if ($response_array['ACK'] != 'Success' && $response_array['ACK'] != 'SuccessWithWarning') { OSCOM::redirect(OSCOM::getLink(null, 'Cart', 'error_message=' . stripslashes($response_array['L_LONGMESSAGE0']), 'SSL')); } $this->_order_id = Order::insert(); Order::process($this->_order_id, $this->_order_status); unset($_SESSION['Shop']['PM']['PAYPAL']); }
</h6></span> <h6><?php echo OSCOM::getDef('order_number') . ' ' . $o['orders_id']; ?> </h6> <div class="content"> <table border="0" width="100%" cellspacing="2" cellpadding="4"> <tr> <td width="50%" valign="top"><?php echo '<b>' . OSCOM::getDef('order_date') . '</b> ' . DateTime::getLong($o['date_purchased']) . '<br /><b>' . $order_type . '</b> ' . HTML::outputProtected($order_name); ?> </td> <td width="30%" valign="top"><?php echo '<b>' . OSCOM::getDef('order_products') . '</b> ' . Order::numberOfProducts($o['orders_id']) . '<br /><b>' . OSCOM::getDef('order_cost') . '</b> ' . strip_tags($o['order_total']); ?> </td> <td width="20%"><?php echo HTML::button(array('href' => OSCOM::getLink(null, null, 'Orders=' . $o['orders_id'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : ''), 'SSL'), 'icon' => 'document', 'title' => OSCOM::getDef('button_view'))); ?> </td> </tr> </table> </div> </div> <?php } ?>
public function process() { $this->_order_id = Order::insert(); Order::process($this->_order_id, $this->_order_status); }
</h6></span> <h6><?php echo OSCOM::getDef('order_number') . ' ' . $Qhistory->valueInt('orders_id'); ?> </h6> <div class="content"> <table border="0" width="100%" cellspacing="2" cellpadding="4"> <tr> <td width="50%" valign="top"><?php echo '<b>' . OSCOM::getDef('order_date') . '</b> ' . DateTime::getLong($Qhistory->value('date_purchased')) . '<br /><b>' . $order_type . '</b> ' . osc_output_string_protected($order_name); ?> </td> <td width="30%" valign="top"><?php echo '<b>' . OSCOM::getDef('order_products') . '</b> ' . Order::numberOfProducts($Qhistory->valueInt('orders_id')) . '<br /><b>' . OSCOM::getDef('order_cost') . '</b> ' . strip_tags($Qhistory->value('order_total')); ?> </td> <td width="20%"><?php echo osc_link_object(OSCOM::getLink(null, null, 'Orders=' . $Qhistory->valueInt('orders_id') . (isset($_GET['page']) ? '&page=' . $_GET['page'] : ''), 'SSL'), osc_draw_image_button('small_view.gif', OSCOM::getDef('button_view'))); ?> </td> </tr> </table> </div> </div> <?php } ?>