public function __construct() { global $osC_Language; $this->_page_title = $osC_Language->get('heading_title'); if (!empty($_GET[$this->_module]) && is_numeric($_GET[$this->_module])) { $this->_page_contents = 'zones.php'; $this->_page_title .= ': ' . osC_Address::getCountryName($_GET[$this->_module]); } }
function getZones() { global $toC_Json; foreach (osC_Address::getZones($_REQUEST['countries_id']) as $zone) { $zones_array[] = array('id' => $zone['id'], 'text' => $zone['name']); } $response = array(EXT_JSON_READER_ROOT => $zones_array); echo $toC_Json->encode($response); }
function osc_cfg_set_zones_pulldown_menu($default, $key = null) { $name = !empty($key) ? 'configuration[' . $key . ']' : 'configuration_value'; $zones_array = array(); foreach (osC_Address::getZones() as $zone) { $zones_array[] = array('id' => $zone['id'], 'text' => $zone['name'], 'group' => $zone['country_name']); } return osc_draw_pull_down_menu($name, $zones_array, $default); }
function quote($method = '') { global $osC_Language, $osC_ShoppingCart; if (!empty($method) && isset($this->types[$method])) { $prod = $method; } else { if ($osC_ShoppingCart->getShippingAddress('country_iso_code_2') == 'CA') { $prod = 'STD'; } else { $prod = 'GNDRES'; } } if ($method) { $this->_upsAction('3'); } // return a single quote $this->_upsProduct($prod); $this->_upsOrigin(SHIPPING_ORIGIN_ZIP, osC_Address::getCountryIsoCode2(SHIPPING_ORIGIN_COUNTRY)); $this->_upsDest($osC_ShoppingCart->getShippingAddress('postcode'), $osC_ShoppingCart->getShippingAddress('country_iso_code_2')); $this->_upsRate(MODULE_SHIPPING_UPS_PICKUP); $this->_upsContainer(MODULE_SHIPPING_UPS_PACKAGE); $this->_upsWeight($osC_ShoppingCart->getWeight()); $this->_upsRescom(MODULE_SHIPPING_UPS_RES); $upsQuote = $this->_upsGetQuote(); if (is_array($upsQuote) && sizeof($upsQuote) > 0) { $this->quotes = array('id' => $this->_code, 'module' => $this->_title . ' (' . $osC_ShoppingCart->numberOfShippingBoxes() . ' x ' . $osC_ShoppingCart->getWeight() . 'lbs)'); $methods = array(); $allowed_methods = explode(",", MODULE_SHIPPING_UPS_TYPES); $std_rcd = false; $qsize = sizeof($upsQuote); for ($i = 0; $i < $qsize; $i++) { list($type, $cost) = each($upsQuote[$i]); if ($type == 'STD') { if ($std_rcd) { continue; } else { $std_rcd = true; } } if (!in_array($type, $allowed_methods)) { continue; } $methods[] = array('id' => $type, 'title' => $this->types[$type], 'cost' => ($cost + MODULE_SHIPPING_UPS_HANDLING) * $osC_ShoppingCart->numberOfShippingBoxes()); } $this->quotes['methods'] = $methods; if ($this->tax_class > 0) { $this->quotes['tax_class_id'] = $this->tax_class; } } else { $this->quotes = array('module' => $this->_title, 'error' => 'We are unable to obtain a rate quote for UPS shipping.<br>Please contact the store if no other alternative is shown.'); } if (!empty($this->icon)) { $this->quotes['icon'] = osc_image($this->icon, $this->_title); } return $this->quotes; }
function format($address, $new_line = "\n") { global $osC_Database; $address_format = ''; if (is_numeric($address)) { $Qaddress = $osC_Database->query('select ab.entry_firstname as firstname, ab.entry_lastname as lastname, ab.entry_company as company, ab.entry_street_address as street_address, ab.entry_suburb as suburb, ab.entry_city as city, ab.entry_postcode as postcode, ab.entry_state as state, ab.entry_zone_id as zone_id, ab.entry_country_id as country_id, ab.entry_telephone as telephone_number, z.zone_code as zone_code, c.countries_name as country_title from :table_address_book ab left join :table_zones z on (ab.entry_zone_id = z.zone_id), :table_countries c where ab.address_book_id = :address_book_id and ab.entry_country_id = c.countries_id'); $Qaddress->bindTable(':table_address_book', TABLE_ADDRESS_BOOK); $Qaddress->bindTable(':table_zones', TABLE_ZONES); $Qaddress->bindTable(':table_countries', TABLE_COUNTRIES); $Qaddress->bindInt(':address_book_id', $address); $Qaddress->execute(); $address = $Qaddress->toArray(); } $firstname = $lastname = ''; if (isset($address['firstname']) && !empty($address['firstname'])) { $firstname = $address['firstname']; $lastname = $address['lastname']; } elseif (isset($address['name']) && !empty($address['name'])) { $firstname = $address['name']; } $state = $address['state']; $state_code = $address['zone_code']; if (isset($address['zone_id']) && is_numeric($address['zone_id']) && $address['zone_id'] > 0) { $state = osC_Address::getZoneName($address['zone_id']); $state_code = osC_Address::getZoneCode($address['zone_id']); } $country = $address['country_title']; if (empty($country) && isset($address['country_id']) && is_numeric($address['country_id']) && $address['country_id'] > 0) { $country = osC_Address::getCountryName($address['country_id']); } if (isset($address['format'])) { $address_format = $address['format']; } elseif (isset($address['country_id']) && is_numeric($address['country_id']) && $address['country_id'] > 0) { $address_format = osC_Address::getFormat($address['country_id']); } if (empty($address_format)) { $address_format = ":name\n:street_address\n:postcode :city\n:country"; } if (defined('DISPLAY_TELEPHONE_NUMBER') && (int) DISPLAY_TELEPHONE_NUMBER == 1) { if (strpos($address_format, 'telephone_number') == false) { $address_format .= "\n:telephone_number"; } } $find_array = array('/\\:name\\b/', '/\\:street_address\\b/', '/\\:suburb\\b/', '/\\:city\\b/', '/\\:postcode\\b/', '/\\:state\\b/', '/\\:state_code\\b/', '/\\:country\\b/', '/\\:telephone_number\\b/'); $replace_array = array(osc_output_string_protected($firstname . ' ' . $lastname), osc_output_string_protected($address['street_address']), osc_output_string_protected($address['suburb']), osc_output_string_protected($address['city']), osc_output_string_protected($address['postcode']), osc_output_string_protected($state), osc_output_string_protected($state_code), osc_output_string_protected($country), osc_output_string_protected($address['telephone_number'])); $formated = preg_replace($find_array, $replace_array, $address_format); if (ACCOUNT_COMPANY > -1 && !empty($address['company'])) { $company = osc_output_string_protected($address['company']); $formated = $company . $new_line . $formated; } if ($new_line != "\n") { $formated = str_replace("\n", $new_line, $formated); } return $formated; }
function getZones() { global $toC_Json; foreach (osC_Address::getZones() as $zone) { if ($zone['country_id'] == STORE_COUNTRY) { $zones_array[] = array('id' => $zone['id'], 'text' => $zone['name'], 'group' => $zone['country_name']); } } $response = array(EXT_JSON_READER_ROOT => $zones_array); echo $toC_Json->encode($response); }
function osc_cfg_set_zones_pulldown_menu($default, $key = null) { $name = !empty($key) ? 'configuration[' . $key . ']' : 'configuration_value'; $zones_array = array(); foreach (osC_Address::getZones() as $zone) { $zones_array[] = array('id' => $zone['id'], 'text' => $zone['name'], 'group' => $zone['country_name']); } $control = array(); $control['name'] = $name; $control['type'] = 'combobox'; $control['mode'] = 'remote'; $control['module'] = 'cfg'; $control['action'] = 'get_zones'; return $control; }
echo $Qaddresses->valueProtected('firstname') . ' ' . $Qaddresses->valueProtected('lastname'); ?> </b></td> <td align="right"><?php echo osc_draw_radio_field('address', $Qaddresses->valueInt('address_book_id'), $osC_ShoppingCart->getBillingAddress('id')); ?> </td> <td width="10"> </td> </tr> <tr> <td width="10"> </td> <td colspan="3"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td width="10"> </td> <td><?php echo osC_Address::format($Qaddresses->toArray(), ', '); ?> </td> <td width="10"> </td> </tr> </table></td> <td width="10"> </td> </tr> </table></td> <td width="10"> </td> </tr> <?php $radio_buttons++; } ?>
<p><?php echo $osC_ShoppingCart->getShippingMethod('title'); ?> </p> <?php } } ?> </td> <td valign="top"> <p><?php echo '<b>' . $osC_Language->get('order_billing_address_title') . '</b> '; ?> </p> <p><?php echo osC_Address::format($osC_ShoppingCart->getBillingAddress(), '<br />'); ?> </p> <p><?php echo '<b>' . $osC_Language->get('order_payment_method_title') . '</b> '; ?> </p> <p><?php echo implode(', ', $osC_ShoppingCart->getCartBillingMethods()); ?> </p> </td> </tr> <tr> <td width="100%" colspan="2" valign="top">
function listCreditsMemo() { global $toC_Json, $osC_Database, $osC_Language; $osC_Currencies = new osC_Currencies_Admin(); $start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start']; $limit = empty($_REQUEST['limit']) ? MAX_DISPLAY_SEARCH_RESULTS : $_REQUEST['limit']; $Qslips = $osC_Database->query('select r.* from :table_orders_refunds r '); if (isset($_REQUEST['customers_id']) && !empty($_REQUEST['customers_id'])) { $Qslips->appendQuery(', ' . TABLE_ORDERS . ' o where r.orders_id = o.orders_id and o.customers_id = :customers_id and r.orders_refunds_type = :orders_refunds_type'); $Qslips->bindInt(':customers_id', $_REQUEST['customers_id']); } else { $Qslips->appendQuery('where orders_refunds_type = :orders_refunds_type'); } if (isset($_REQUEST['orders_id']) && !empty($_REQUEST['orders_id'])) { $Qslips->appendQuery('and orders_id = :orders_id '); $Qslips->bindInt(':orders_id', $_REQUEST['orders_id']); } $Qslips->bindTable(':table_orders_refunds', TABLE_ORDERS_REFUNDS); $Qslips->bindInt(':orders_refunds_type', ORDERS_RETURNS_TYPE_CREDIT_SLIP); $Qslips->setExtBatchLimit($start, $limit); $Qslips->execute(); $records = array(); while ($Qslips->next()) { $orders_refunds_id = $Qslips->value('orders_refunds_id'); $Qproducts = $osC_Database->query("select orders_products_id, products_quantity from :table_orders_refunds_products where orders_refunds_id = :orders_refunds_id"); $Qproducts->bindTable(':table_orders_refunds_products', TABLE_ORDERS_REFUNDS_PRODUCTS); $Qproducts->bindInt(':orders_refunds_id', $orders_refunds_id); $Qproducts->execute(); $products_ids = array(); $products_qty = array(); while ($Qproducts->next()) { $products_ids[] = $Qproducts->valueInt('orders_products_id'); $products_qty[$Qproducts->valueInt('orders_products_id')] = $Qproducts->valueInt('products_quantity'); } $total = 0; $quantity = 0; $products = array(); $osC_Order = new osC_Order($Qslips->valueInt('orders_id')); $products_table = '<table width="100%">'; foreach ($osC_Order->getProducts() as $product) { if (in_array($product['orders_products_id'], $products_ids)) { $product_info = $products_qty[$product['orders_products_id']] . ' x ' . $product['name']; if ($product['type'] == PRODUCT_TYPE_GIFT_CERTIFICATE) { $product_info .= '<br /><nobr> <i>' . $osC_Language->get('senders_name') . ': ' . $product['senders_name'] . '</i></nobr>'; if ($product['gift_certificates_type'] == GIFT_CERTIFICATE_TYPE_EMAIL) { $product_info .= '<br /><nobr> <i>' . $osC_Language->get('senders_email') . ': ' . $product['senders_email'] . '</i></nobr>'; } $product_info .= '<br /><nobr> <i>' . $osC_Language->get('recipients_name') . ': ' . $product['recipients_name'] . '</i></nobr>'; if ($product['gift_certificates_type'] == GIFT_CERTIFICATE_TYPE_EMAIL) { $product_info .= '<br /><nobr> <i>' . $osC_Language->get('recipients_email') . ': ' . $product['recipients_email'] . '</i></nobr>'; } $product_info .= '<br /><nobr> <i>' . $osC_Language->get('messages') . ': ' . $product['messages'] . '</i></nobr>'; } if (isset($product['variants']) && is_array($product['variants']) && sizeof($product['variants']) > 0) { foreach ($product['variants'] as $variants) { $product_info .= '<br /><nobr> <i>' . $variants['groups_name'] . ': ' . $variants['values_name'] . '</i></nobr>'; } } $products[] = $product_info; $quantity += $products_qty[$product['orders_products_id']]; $products_table .= '<tr><td>' . $product_info . '</td><td width="60" valign="top" align="right">' . $osC_Currencies->displayPriceWithTaxRate($product['final_price'], $product['tax'], 1, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . '</td></tr>'; } } $products_table .= '</table>'; $order_total = '<table width="100%">'; $order_total .= '<tr><td align="right">' . $osC_Language->get("field_sub_total") . ' </td><td width="60" align="right">' . $osC_Currencies->format($Qslips->value('sub_total')) . '</td></tr>'; $order_total .= '<tr><td align="right">' . $osC_Language->get("field_shipping_fee") . ' </td><td width="60" align="right">' . $osC_Currencies->format($Qslips->value('shipping')) . '</td></tr>'; $order_total .= '<tr><td align="right">' . $osC_Language->get("field_handling") . ' </td><td width="60" align="right">' . $osC_Currencies->format($Qslips->value('handling')) . '</td></tr>'; $order_total .= '<tr><td align="right">' . $osC_Language->get("field_refund_total") . ' </td><td width="60" align="right">' . $osC_Currencies->format($Qslips->value('refund_total')) . '</td></tr>'; $order_total .= '</table>'; $records[] = array('orders_refunds_id' => $Qslips->valueInt('orders_refunds_id'), 'credit_slips_id' => $Qslips->valueInt('credit_slips_id'), 'orders_id' => $Qslips->valueInt('orders_id'), 'customers_name' => $osC_Order->getCustomer('name'), 'total_products' => $quantity, 'total_refund' => $osC_Currencies->format($Qslips->value('refund_total')), 'sub_total' => $osC_Currencies->format($Qslips->value('sub_total')), 'date_added' => osC_DateTime::getShort($Qslips->value('date_added')), 'shipping_address' => osC_Address::format($osC_Order->getDelivery(), '<br />'), 'shipping_method' => $osC_Order->getDeliverMethod(), 'billing_address' => osC_Address::format($osC_Order->getBilling(), '<br />'), 'payment_method' => $osC_Order->getPaymentMethod(), 'comments' => $Qslips->value('comments'), 'products' => $products_table, 'totals' => $order_total); } $response = array(EXT_JSON_READER_TOTAL => $Qslips->getBatchSize(), EXT_JSON_READER_ROOT => $records); echo $toC_Json->encode($response); }
$Qzones->bindTable(':table_zones', TABLE_ZONES); $Qzones->bindInt(':zone_country_id', $_POST['country']); $Qzones->execute(); $zones_array = array(); while ($Qzones->next()) { $zones_array[] = array('id' => $Qzones->value('zone_name'), 'text' => $Qzones->value('zone_name')); } echo osc_draw_pull_down_menu('state', $zones_array); } else { echo osc_draw_input_field('state'); } } else { if (isset($Qentry)) { $zone = $Qentry->value('entry_state'); if ($Qentry->valueInt('entry_zone_id') > 0) { $zone = osC_Address::getZoneName($Qentry->valueInt('entry_zone_id')); } } echo osc_draw_input_field('state', isset($Qentry) ? $zone : null); } ?> </div> </div> <?php } ?> <?php if (ACCOUNT_TELEPHONE > -1) { ?>
?> </li> <?php } ?> <li><?php echo osc_draw_label($osC_Language->get('field_customer_city'), null, 'billing_city', true) . osc_draw_input_field('billing_city', $city); ?> </li> <li> <?php echo osc_draw_label($osC_Language->get('field_customer_country'), null, 'billing_country', true); $countries_array = array(array('id' => '', 'text' => $osC_Language->get('pull_down_default'))); foreach (osC_Address::getCountries() as $country) { $countries_array[] = array('id' => $country['id'], 'text' => $country['name']); } echo osc_draw_pull_down_menu('billing_country', $countries_array, $country_id, "class=country"); ?> </li> <?php if (ACCOUNT_STATE > -1) { ?> <li id="billing-state"> <?php echo osc_draw_label($osC_Language->get('field_customer_state'), null, 'state_ship', ACCOUNT_STATE > 0); $Qzones = $osC_Database->query('select zone_name from :table_zones where zone_country_id = :zone_country_id order by zone_name'); $Qzones->bindTable(':table_zones', TABLE_ZONES); $Qzones->bindInt(':zone_country_id', $country_id);
function getZones() { global $toC_Json; $country_id = isset($_REQUEST['country_id']) ? $_REQUEST['country_id'] : null; $records = array(); foreach (osC_Address::getZones($country_id) as $zone) { $records[] = array('zone_code' => $zone['code'], 'zone_name' => $zone['name']); } echo $toC_Json->encode(array(EXT_JSON_READER_ROOT => $records)); }
echo $order->info['shipping_method']; ?> </p> <?php } } ?> <h6><?php echo $osC_Language->get('order_billing_address_title'); ?> </h6> <p><?php echo osC_Address::format($order->billing, '<br />'); ?> </p> <h6><?php echo $osC_Language->get('order_payment_method_title'); ?> </h6> <p><?php echo $order->info['payment_method']; ?> </p> </td> <td width="70%" valign="top"> <div style="border: 1px; border-style: solid; border-color: #CCCCCC; background-color: #FBFBFB; padding: 5px;">
function sendEmail($id) { global $osC_Database, $osC_Language, $osC_Currencies; $Qorder = $osC_Database->query('select * from :table_orders where orders_id = :orders_id limit 1'); $Qorder->bindTable(':table_orders', TABLE_ORDERS); $Qorder->bindInt(':orders_id', $id); $Qorder->execute(); if ($Qorder->numberOfRows() === 1) { $email_order = STORE_NAME . "\n" . $osC_Language->get('email_order_separator') . "\n" . sprintf($osC_Language->get('email_order_order_number'), $id) . "\n" . sprintf($osC_Language->get('email_order_invoice_url'), osc_href_link(FILENAME_ACCOUNT, 'orders=' . $id, 'SSL', false, true, true)) . "\n" . sprintf($osC_Language->get('email_order_date_ordered'), osC_DateTime::getLong()) . "\n\n" . $osC_Language->get('email_order_products') . "\n" . $osC_Language->get('email_order_separator') . "\n"; $Qproducts = $osC_Database->query('select orders_products_id, products_model, products_name, products_price, products_tax, products_quantity from :table_orders_products where orders_id = :orders_id order by orders_products_id'); $Qproducts->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS); $Qproducts->bindInt(':orders_id', $id); $Qproducts->execute(); while ($Qproducts->next()) { $email_order .= $Qproducts->valueInt('products_quantity') . ' x ' . $Qproducts->value('products_name') . ' (' . $Qproducts->value('products_model') . ') = ' . $osC_Currencies->displayPriceWithTaxRate($Qproducts->value('products_price'), $Qproducts->value('products_tax'), $Qproducts->valueInt('products_quantity'), false, $Qorder->value('currency'), $Qorder->value('currency_value')) . "\n"; $Qvariants = $osC_Database->query('select group_title, value_title from :table_orders_products_variants where orders_id = :orders_id and orders_products_id = :orders_products_id order by id'); $Qvariants->bindTable(':table_orders_products_variants', TABLE_ORDERS_PRODUCTS_VARIANTS); $Qvariants->bindInt(':orders_id', $id); $Qvariants->bindInt(':orders_products_id', $Qproducts->valueInt('orders_products_id')); $Qvariants->execute(); while ($Qvariants->next()) { $email_order .= "\t" . $Qvariants->value('group_title') . ': ' . $Qvariants->value('value_title') . "\n"; } } unset($Qproducts); unset($Qvariants); $email_order .= $osC_Language->get('email_order_separator') . "\n"; $Qtotals = $osC_Database->query('select title, text from :table_orders_total where orders_id = :orders_id order by sort_order'); $Qtotals->bindTable(':table_orders_total', TABLE_ORDERS_TOTAL); $Qtotals->bindInt(':orders_id', $id); $Qtotals->execute(); while ($Qtotals->next()) { $email_order .= strip_tags($Qtotals->value('title') . ' ' . $Qtotals->value('text')) . "\n"; } unset($Qtotals); if (osc_empty($Qorder->value('delivery_name')) === false && osc_empty($Qorder->value('delivery_street_address')) === false) { $address = array('name' => $Qorder->value('delivery_name'), 'company' => $Qorder->value('delivery_company'), 'street_address' => $Qorder->value('delivery_street_address'), 'suburb' => $Qorder->value('delivery_suburb'), 'city' => $Qorder->value('delivery_city'), 'state' => $Qorder->value('delivery_state'), 'zone_code' => $Qorder->value('delivery_state_code'), 'country_title' => $Qorder->value('delivery_country'), 'country_iso2' => $Qorder->value('delivery_country_iso2'), 'country_iso3' => $Qorder->value('delivery_country_iso3'), 'postcode' => $Qorder->value('delivery_postcode'), 'format' => $Qorder->value('delivery_address_format')); $email_order .= "\n" . $osC_Language->get('email_order_delivery_address') . "\n" . $osC_Language->get('email_order_separator') . "\n" . osC_Address::format($address) . "\n"; unset($address); } $address = array('name' => $Qorder->value('billing_name'), 'company' => $Qorder->value('billing_company'), 'street_address' => $Qorder->value('billing_street_address'), 'suburb' => $Qorder->value('billing_suburb'), 'city' => $Qorder->value('billing_city'), 'state' => $Qorder->value('billing_state'), 'zone_code' => $Qorder->value('billing_state_code'), 'country_title' => $Qorder->value('billing_country'), 'country_iso2' => $Qorder->value('billing_country_iso2'), 'country_iso3' => $Qorder->value('billing_country_iso3'), 'postcode' => $Qorder->value('billing_postcode'), 'format' => $Qorder->value('billing_address_format')); $email_order .= "\n" . $osC_Language->get('email_order_billing_address') . "\n" . $osC_Language->get('email_order_separator') . "\n" . osC_Address::format($address) . "\n\n"; unset($address); $Qstatus = $osC_Database->query('select orders_status_name from :table_orders_status where orders_status_id = :orders_status_id and language_id = :language_id'); $Qstatus->bindTable(':table_orders_status', TABLE_ORDERS_STATUS); $Qstatus->bindInt(':orders_status_id', $Qorder->valueInt('orders_status')); $Qstatus->bindInt(':language_id', $osC_Language->getID()); $Qstatus->execute(); $email_order .= sprintf($osC_Language->get('email_order_status'), $Qstatus->value('orders_status_name')) . "\n" . $osC_Language->get('email_order_separator') . "\n"; unset($Qstatus); $Qstatuses = $osC_Database->query('select date_added, comments from :table_orders_status_history where orders_id = :orders_id and comments != "" order by orders_status_history_id'); $Qstatuses->bindTable(':table_orders_status_history', TABLE_ORDERS_STATUS_HISTORY); $Qstatuses->bindInt(':orders_id', $id); $Qstatuses->execute(); while ($Qstatuses->next()) { $email_order .= osC_DateTime::getLong($Qstatuses->value('date_added')) . "\n\t" . wordwrap(str_replace("\n", "\n\t", $Qstatuses->value('comments')), 60, "\n\t", 1) . "\n\n"; } unset($Qstatuses); // if (is_object($GLOBALS[$payment])) { // $email_order .= $osC_Language->get('email_order_payment_method') . "\n" . // $osC_Language->get('email_order_separator') . "\n"; // $email_order .= $osC_ShoppingCart->getBillingMethod('title') . "\n\n"; // if (isset($GLOBALS[$payment]->email_footer)) { // $email_order .= $GLOBALS[$payment]->email_footer . "\n\n"; // } // } osc_email($Qorder->value('customers_name'), $Qorder->value('customers_email_address'), $osC_Language->get('email_order_subject'), $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); // send emails to other people if (SEND_EXTRA_ORDER_EMAILS_TO != '') { osc_email('', SEND_EXTRA_ORDER_EMAILS_TO, $osC_Language->get('email_order_subject'), $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } } unset($Qorder); }
function listOrdersReturns() { global $toC_Json, $osC_Language, $osC_Database; $start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start']; $limit = empty($_REQUEST['limit']) ? MAX_DISPLAY_SEARCH_RESULTS : $_REQUEST['limit']; $Qreturns = $osC_Database->query('select r.orders_returns_id, r.orders_id, r.orders_returns_status_id, r.customers_comments, r.admin_comments, r.date_added, o.customers_name, ors.orders_returns_status_name from :table_orders o, :table_orders_returns r, :table_orders_returns_status ors where r.orders_id = o.orders_id and r.orders_returns_status_id = ors.orders_returns_status_id and ors.languages_id = :languages_id'); if (isset($_REQUEST['orders_id']) && !empty($_REQUEST['orders_id'])) { $Qreturns->appendQuery('and r.orders_id = :orders_id '); $Qreturns->bindInt(':orders_id', $_REQUEST['orders_id']); } if (isset($_REQUEST['customers_id']) && !empty($_REQUEST['customers_id'])) { $Qreturns->appendQuery('and o.customers_id = :customers_id '); $Qreturns->bindInt(':customers_id', $_REQUEST['customers_id']); } if (isset($_REQUEST['orders_returns_status_id']) && !empty($_REQUEST['orders_returns_status_id'])) { $Qreturns->appendQuery('and r.orders_returns_status_id = :orders_returns_status_id '); $Qreturns->bindInt(':orders_returns_status_id', $_REQUEST['orders_returns_status_id']); } $Qreturns->appendQuery('order by r.orders_returns_id desc '); $Qreturns->bindTable(':table_orders', TABLE_ORDERS); $Qreturns->bindTable(':table_orders_returns', TABLE_ORDERS_RETURNS); $Qreturns->bindTable(':table_orders_returns_status', TABLE_ORDERS_RETURNS_STATUS); $Qreturns->bindInt(':languages_id', $osC_Language->getID()); $Qreturns->setExtBatchLimit($start, $limit); $Qreturns->execute(); $records = array(); while ($Qreturns->next()) { $orders_returns_id = $Qreturns->value('orders_returns_id'); $Qproducts = $osC_Database->query("select orders_products_id, products_quantity from :table_orders_returns_products where orders_returns_id = :orders_returns_id"); $Qproducts->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS); $Qproducts->bindTable(':table_orders_returns_products', TABLE_ORDERS_RETURNS_PRODUCTS); $Qproducts->bindInt(':orders_returns_id', $orders_returns_id); $Qproducts->execute(); $return_products_ids = array(); $return_products_qty = array(); while ($Qproducts->next()) { $return_products_ids[] = $Qproducts->valueInt('orders_products_id'); $return_products_qty[$Qproducts->valueInt('orders_products_id')] = $Qproducts->valueInt('products_quantity'); } $total = 0; $quantity = 0; $products = array(); $return_quantity = array(); $osC_Order = new osC_Order($Qreturns->valueInt('orders_id')); foreach ($osC_Order->getProducts() as $product) { if (in_array($product['orders_products_id'], $return_products_ids)) { $product_info = $return_products_qty[$product['orders_products_id']] . ' x ' . $product['name']; if ($product['type'] == PRODUCT_TYPE_GIFT_CERTIFICATE) { $product_info .= '<br /><nobr> <i>' . $osC_Language->get('senders_name') . ': ' . $product['senders_name'] . '</i></nobr>'; if ($product['gift_certificates_type'] == GIFT_CERTIFICATE_TYPE_EMAIL) { $product_info .= '<br /><nobr> <i>' . $osC_Language->get('senders_email') . ': ' . $product['senders_email'] . '</i></nobr>'; } $product_info .= '<br /><nobr> <i>' . $osC_Language->get('recipients_name') . ': ' . $product['recipients_name'] . '</i></nobr>'; if ($product['gift_certificates_type'] == GIFT_CERTIFICATE_TYPE_EMAIL) { $product_info .= '<br /><nobr> <i>' . $osC_Language->get('recipients_email') . ': ' . $product['recipients_email'] . '</i></nobr>'; } $product_info .= '<br /><nobr> <i>' . $osC_Language->get('messages') . ': ' . $product['messages'] . '</i></nobr>'; } if (isset($product['variants']) && is_array($product['variants']) && sizeof($product['variants']) > 0) { foreach ($product['variants'] as $variants) { $product_info .= '<br /><nobr> <i>' . $variants['groups_name'] . ': ' . $variants['values_name'] . '</i></nobr>'; } } $products[] = $product_info; $total += $return_products_qty[$product['orders_products_id']] * $product['final_price'] * (1 + $product['tax'] / 100); $quantity += $return_products_qty[$product['orders_products_id']]; $return_quantity[] = $product['orders_products_id'] . ':' . $return_products_qty[$product['orders_products_id']]; } } $action = array(); $orders_returns_status_id = $Qreturns->value('orders_returns_status_id'); if ($orders_returns_status_id == ORDERS_RETURNS_STATUS_REFUNDED_CREDIT_MEMO || $orders_returns_status_id == ORDERS_RETURNS_STATUS_REFUNDED_STORE_CREDIT || $orders_returns_status_id == ORDERS_RETURNS_STATUS_REJECT) { $action[] = array('class' => 'icon-edit-gray-record', 'qtip' => $osC_Language->get('icon_edit')); $action[] = array('class' => 'icon-credit-slip-gray-record', 'qtip' => $osC_Language->get('icon_credit_slip')); $action[] = array('class' => 'icon-store-credit-gray-record', 'qtip' => $osC_Language->get('icon_issue_store_credit')); } else { $action[] = array('class' => 'icon-edit-record', 'qtip' => $osC_Language->get('icon_edit')); $action[] = array('class' => 'icon-credit-slip-record', 'qtip' => $osC_Language->get('icon_credit_slip')); $action[] = array('class' => 'icon-store-credit-record', 'qtip' => $osC_Language->get('icon_issue_store_credit')); } $records[] = array('orders_returns_id' => $orders_returns_id, 'orders_id' => $Qreturns->valueInt('orders_id'), 'orders_returns_customer' => $Qreturns->value('customers_name'), 'quantity' => $quantity, 'date_added' => osC_DateTime::getShort($Qreturns->value('date_added')), 'status' => $Qreturns->value('orders_returns_status_name'), 'status_id' => $orders_returns_status_id, 'products' => implode('<br />', $products), 'return_quantity' => implode(';', $return_quantity), 'billing_address' => osC_Address::format($osC_Order->getBilling(), '<br />'), 'customers_comments' => $Qreturns->value('customers_comments'), 'admin_comments' => $Qreturns->value('admin_comments'), 'total' => number_format($total, 2, '.', ''), 'action' => $action); } $response = array(EXT_JSON_READER_TOTAL => $Qreturns->getBatchSize(), EXT_JSON_READER_ROOT => $records); echo $toC_Json->encode($response); }
<p align="center"><?php echo '<input type="button" value="' . $osC_Language->get('button_back') . '" onclick="document.location.href=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&cID=' . $_GET['cID'] . '&search=' . $_GET['search'] . '&page=' . $_GET['page'] . '&action=save&tabIndex=tabAddressBook') . '\';" class="operationButton" />'; ?> </p> <?php } else { ?> <p><?php echo $osC_Language->get('introduction_delete_address_book_entry'); ?> </p> <p><?php echo '<b>' . osC_Address::format($osC_ObjectInfo_AddressBook->getAll(), ', ') . '</b>'; ?> </p> <p align="center"><?php echo osc_draw_hidden_field('subaction', 'confirm') . '<input type="submit" value="' . $osC_Language->get('button_delete') . '" class="operationButton" /> <input type="button" value="' . $osC_Language->get('button_cancel') . '" onclick="document.location.href=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&cID=' . $_GET['cID'] . '&search=' . $_GET['search'] . '&page=' . $_GET['page'] . '&action=save&tabIndex=tabAddressBook') . '\';" class="operationButton" />'; ?> </p> <?php } ?> </form> </div>
<p><?php echo osC_Address::format($osC_Order->getDelivery(), '<br />'); ?> </p> </fieldset> </td> <td width="33%" valign="top"> <fieldset style="border: 0; height: 100%;"> <legend style="margin-left: -20px; font-weight: bold;"><?php echo osc_icon('bill.png') . ' ' . $osC_Language->get('subsection_billing_address'); ?> </legend> <p><?php echo osC_Address::format($osC_Order->getBilling(), '<br />'); ?> </p> </fieldset> </td> </tr> <tr> <td width="33%" valign="top"> <fieldset style="border: 0; height: 100%;"> <legend style="margin-left: -20px; font-weight: bold;"><?php echo osc_icon('payment.png') . ' ' . $osC_Language->get('subsection_payment_method'); ?> </legend> <p><?php echo $osC_Order->getPaymentMethod();
function buildMessage() { global $osC_Database, $osC_Language, $osC_Currencies; $Qorder = $osC_Database->query('select * from :table_orders where orders_id = :orders_id limit 1'); $Qorder->bindTable(':table_orders', TABLE_ORDERS); $Qorder->bindInt(':orders_id', $this->_order_id); $Qorder->execute(); if ($Qorder->numberOfRows() === 1) { $this->addRecipient($Qorder->value('customers_name'), $Qorder->value('customers_email_address')); $order_number = $this->_order_id; $invoice_link = osc_href_link(FILENAME_ACCOUNT, 'orders=' . $this->_order_id, 'SSL', false, true, true); $date_ordered = osC_DateTime::getLong(); $order_details = $osC_Language->get('email_order_products') . "<br />" . $osC_Language->get('email_order_separator') . "<br />"; $Qproducts = $osC_Database->query('select orders_products_id, products_sku, products_name, final_price, products_tax, products_quantity from :table_orders_products where orders_id = :orders_id order by orders_products_id'); $Qproducts->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS); $Qproducts->bindInt(':orders_id', $this->_order_id); $Qproducts->execute(); while ($Qproducts->next()) { $order_details .= $Qproducts->valueInt('products_quantity') . ' x ' . $Qproducts->value('products_name') . ' (' . $Qproducts->value('products_sku') . ') = ' . $osC_Currencies->displayPriceWithTaxRate($Qproducts->value('final_price'), $Qproducts->value('products_tax'), $Qproducts->valueInt('products_quantity'), $Qorder->value('currency'), $Qorder->value('currency_value')) . "<br />"; $Qvariants = $osC_Database->query('select products_variants_groups as groups_name, products_variants_values as values_name from :table_orders_products_variants where orders_id = :orders_id and orders_products_id = :orders_products_id order by orders_products_variants_id'); $Qvariants->bindTable(':table_orders_products_variants', TABLE_ORDERS_PRODUCTS_VARIANTS); $Qvariants->bindInt(':orders_id', $this->_order_id); $Qvariants->bindInt(':orders_products_id', $Qproducts->valueInt('orders_products_id')); $Qvariants->execute(); while ($Qvariants->next()) { $order_details .= "\t" . $Qvariants->value('groups_name') . ': ' . $Qvariants->value('values_name') . "<br />"; } } unset($Qproducts); unset($Qvariants); $order_details .= $osC_Language->get('email_order_separator') . "<br />"; $Qtotals = $osC_Database->query('select title, text from :table_orders_total where orders_id = :orders_id order by sort_order'); $Qtotals->bindTable(':table_orders_total', TABLE_ORDERS_TOTAL); $Qtotals->bindInt(':orders_id', $this->_order_id); $Qtotals->execute(); while ($Qtotals->next()) { $order_details .= strip_tags($Qtotals->value('title') . ' ' . $Qtotals->value('text')) . "<br />"; } unset($Qtotals); if (osc_empty($Qorder->value('delivery_name') === false) && osc_empty($Qorder->value('delivery_street_address') === false)) { $address = array('name' => $Qorder->value('delivery_name'), 'company' => $Qorder->value('delivery_company'), 'street_address' => $Qorder->value('delivery_street_address'), 'suburb' => $Qorder->value('delivery_suburb'), 'city' => $Qorder->value('delivery_city'), 'state' => $Qorder->value('delivery_state'), 'zone_code' => $Qorder->value('delivery_state_code'), 'country_title' => $Qorder->value('delivery_country'), 'country_iso2' => $Qorder->value('delivery_country_iso2'), 'country_iso3' => $Qorder->value('delivery_country_iso3'), 'postcode' => $Qorder->value('delivery_postcode'), 'format' => $Qorder->value('delivery_address_format')); $delivery_address = osC_Address::format($address, "<br />"); unset($address); } $address = array('name' => $Qorder->value('billing_name'), 'company' => $Qorder->value('billing_company'), 'street_address' => $Qorder->value('billing_street_address'), 'suburb' => $Qorder->value('billing_suburb'), 'city' => $Qorder->value('billing_city'), 'state' => $Qorder->value('billing_state'), 'zone_code' => $Qorder->value('billing_state_code'), 'country_title' => $Qorder->value('billing_country'), 'country_iso2' => $Qorder->value('billing_country_iso2'), 'country_iso3' => $Qorder->value('billing_country_iso3'), 'postcode' => $Qorder->value('billing_postcode'), 'format' => $Qorder->value('billing_address_format')); $billing_address = osC_Address::format($address, "<br />"); unset($address); $Qstatus = $osC_Database->query('select orders_status_name from :table_orders_status where orders_status_id = :orders_status_id and language_id = :language_id'); $Qstatus->bindTable(':table_orders_status', TABLE_ORDERS_STATUS); $Qstatus->bindInt(':orders_status_id', $Qorder->valueInt('orders_status')); $Qstatus->bindInt(':language_id', $osC_Language->getID()); $Qstatus->execute(); $order_status = $Qstatus->value('orders_status_name'); unset($Qstatus); $Qstatuses = $osC_Database->query('select date_added, comments from :table_orders_status_history where orders_id = :orders_id and comments != "" order by orders_status_history_id'); $Qstatuses->bindTable(':table_orders_status_history', TABLE_ORDERS_STATUS_HISTORY); $Qstatuses->bindInt(':orders_id', $this->_order_id); $Qstatuses->execute(); $order_comments = ''; while ($Qstatuses->next()) { $order_comments .= osC_DateTime::getLong($Qstatuses->value('date_added')) . "<br />\t" . wordwrap(str_replace("<br />", "<br />\t", $Qstatuses->value('comments')), 60, "<br />\t", 1) . "<br /><br />"; } unset($Qstatuses); $replaces = array($order_number, $invoice_link, $date_ordered, $order_details, $delivery_address, $billing_address, $order_status, $order_comments, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS); $this->_title = str_replace($this->_keywords, $replaces, $this->_title); $this->_email_text = str_replace($this->_keywords, $replaces, $this->_content); } unset($Qorder); }
<td><?php echo '<a href="mailto:' . $osC_Order->getCustomer('email_address') . '"><u>' . $osC_Order->getCustomer('email_address') . '</u></a>'; ?> </td> </tr> </table></td> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td><b><?php echo $osC_Language->get('subsection_shipping_address'); ?> </b></td> </tr> <tr> <td><?php echo osC_Address::format($osC_Order->getDelivery(), '<br />'); ?> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td> </td> </tr> <tr> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td><b><?php echo $osC_Language->get('subsection_payment_method');
<h1><?php echo $osC_Template->getPageTitle(); ?> </h1> <div class="moduleBox"> <h6><?php echo $osC_Language->get('address_book_delete_address_title'); ?> </h6> <div class="content"> <div style="float: right; padding: 0px 0px 10px 20px;"> <?php echo osC_Address::format($_GET['address_book'], '<br />'); ?> </div> <div style="float: right; padding: 0px 0px 10px 20px; text-align: center;"> <?php echo '<b>' . $osC_Language->get('selected_address_title') . '</b><br />' . osc_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?> </div> <?php echo $osC_Language->get('address_book_delete_address_description'); ?> <div style="clear: both;"></div> </div>
function loadSummaryData() { global $toC_Json, $osC_Language; $osC_Order = new osC_Order($_REQUEST['orders_id']); $response['customer'] = '<p style="margin-left:10px;">' . osC_Address::format($osC_Order->getCustomer(), '<br />') . '</p>' . '<p style="margin-left:10px;>' . osc_icon('telephone.png') . $osC_Order->getCustomer('telephone') . '<br />' . osc_icon('write.png') . $osC_Order->getCustomer('email_address') . '</p>'; $response['shippingAddress'] = '<p style="margin-left:10px;">' . osC_Address::format($osC_Order->getDelivery(), '<br />') . '</p>'; $response['billingAddress'] = '<p style="margin-left:10px;">' . osC_Address::format($osC_Order->getBilling(), '<br />') . '</p>'; $response['paymentMethod'] = '<p style="margin-left:10px;">' . $osC_Order->getPaymentMethod() . '</p>'; if ($osC_Order->isValidCreditCard()) { $response['paymentMethod'] .= ' <table border="0" cellspacing="0" cellpadding="0"> <tr> <td>' . $osC_Language->get('credit_card_type') . '</td> <td>' . $osC_Order->getCreditCardDetails('type') . '</td> </tr> <tr> <td>' . $osC_Language->get('credit_card_owner_name') . '</td> <td>' . $osC_Order->getCreditCardDetails('owner') . '</td> </tr> <tr> <td>' . $osC_Language->get('credit_card_number') . '</td> <td>' . $osC_Order->getCreditCardDetails('number') . '</td> </tr> <tr> <td>' . $osC_Language->get('credit_card_expiry_date') . '</td> <td>' . $osC_Order->getCreditCardDetails('expires') . '</td> </tr> </table>'; } $response['status'] = '<p style="margin-left:10px;">' . $osC_Order->getStatus() . '<br />' . ($osC_Order->getDateLastModified() > $osC_Order->getDateCreated() ? osC_DateTime::getShort($osC_Order->getDateLastModified(), true) : osC_DateTime::getShort($osC_Order->getDateCreated(), true)) . '</p>' . '<p style="margin-left:10px;">' . $osC_Language->get('number_of_comments') . ' ' . $osC_Order->getNumberOfComments() . '</p>'; $response['total'] = '<p style="margin-left:10px;">' . $osC_Order->getTotal() . '</p>' . '<p style="margin-left:10px;">' . $osC_Language->get('number_of_products') . ' ' . $osC_Order->getNumberOfProducts() . '<br />' . $osC_Language->get('number_of_items') . ' ' . $osC_Order->getNumberOfItems() . '</p>'; echo $toC_Json->encode($response); }
function process() { global $osC_Database, $osC_Customer, $osC_Currencies, $osC_ShoppingCart, $osC_Language, $messageStack, $osC_CreditCard; $this->_verifyData(); $this->_order_id = osC_Order::insert(); $post_string = '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . '<WIRECARD_BXML xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xsi:noNamespaceSchemaLocation="wirecard.xsd">' . "\n" . ' <W_REQUEST>' . "\n" . ' <W_JOB>' . "\n" . ' <JobID>Job 1</JobID>' . "\n" . ' <BusinessCaseSignature>' . MODULE_PAYMENT_WIRECARD_CC_BUSINESS_SIGNATURE . '</BusinessCaseSignature>' . "\n" . ' <FNC_CC_PREAUTHORIZATION>' . "\n" . ' <FunctionID>Preauthorization 1</FunctionID>' . "\n" . ' <CC_TRANSACTION mode="' . MODULE_PAYMENT_WIRECARD_CC_TRANSACTION_MODE . '">' . "\n" . ' <TransactionID>' . $this->_order_id . '</TransactionID>' . "\n" . ' <CommerceType>eCommerce</CommerceType>' . "\n" . ' <Amount>' . $osC_Currencies->formatRaw($osC_ShoppingCart->getTotal(), $osC_Currencies->getCode()) * 100 . '</Amount>' . "\n" . ' <Currency>' . $osC_Currencies->getCode() . '</Currency>' . "\n" . ' <CountryCode>' . osC_Address::getCountryIsoCode2(STORE_COUNTRY) . '</CountryCode>' . "\n" . ' <Usage>' . STORE_NAME . '</Usage>' . "\n" . ' <RECURRING_TRANSACTION>' . "\n" . ' <Type>Single</Type>' . "\n" . ' </RECURRING_TRANSACTION>' . "\n" . ' <CREDIT_CARD_DATA>' . "\n" . ' <CreditCardNumber>' . $osC_CreditCard->getNumber() . '</CreditCardNumber>' . "\n"; if (MODULE_PAYMENT_WIRECARD_CC_VERIFY_WITH_CVC == '1') { $post_string .= ' <CVC2>' . $osC_CreditCard->getCVC() . '</CVC2>' . "\n"; } $post_string .= ' <ExpirationYear>' . $osC_CreditCard->getExpiryYear() . '</ExpirationYear>' . "\n" . ' <ExpirationMonth>' . $osC_CreditCard->getExpiryMonth() . '</ExpirationMonth>' . "\n" . ' <CardHolderName>' . $osC_CreditCard->getOwner() . '</CardHolderName>' . "\n" . ' </CREDIT_CARD_DATA>' . "\n" . ' <CONTACT_DATA>' . "\n" . ' <IPAddress>' . osc_get_ip_address() . '</IPAddress>' . "\n" . ' </CONTACT_DATA>' . "\n" . ' <CORPTRUSTCENTER_DATA>' . "\n" . ' <ADDRESS>' . "\n" . ' <FirstName>' . $osC_ShoppingCart->getBillingAddress('firstname') . '</FirstName>' . "\n" . ' <LastName>' . $osC_ShoppingCart->getBillingAddress('lastname') . '</LastName>' . "\n" . ' <Address1>' . $osC_ShoppingCart->getBillingAddress('street_address') . '</Address1>' . "\n" . ' <City>' . $osC_ShoppingCart->getBillingAddress('city') . '</City>' . "\n" . ' <ZipCode>' . $osC_ShoppingCart->getBillingAddress('postcode') . '</ZipCode>' . "\n"; if (osc_empty($osC_ShoppingCart->getBillingAddress('zone_code')) === false) { $post_string .= ' <State>' . $osC_ShoppingCart->getBillingAddress('zone_code') . '</State>' . "\n"; } $post_string .= ' <Country>' . $osC_ShoppingCart->getBillingAddress('country_iso_code_2') . '</Country>' . "\n" . ' <Phone>' . $osC_ShoppingCart->getBillingAddress('telephone_number') . '</Phone>' . "\n" . ' <Email>' . $osC_Customer->getEmailAddress() . '</Email>' . "\n" . ' </ADDRESS>' . "\n" . ' </CORPTRUSTCENTER_DATA>' . "\n" . ' </CC_TRANSACTION>' . "\n" . ' </FNC_CC_PREAUTHORIZATION>' . "\n" . ' </W_JOB>' . "\n" . ' </W_REQUEST>' . "\n" . '</WIRECARD_BXML>'; $this->_transaction_response = $this->sendTransactionToGateway($this->_gateway_url, $post_string, array('Content-type: text/xml')); if (empty($this->_transaction_response) === false) { $osC_XML = new osC_XML($this->_transaction_response); $result = $osC_XML->toArray(); } else { $result = array(); } $error = false; if (isset($result['WIRECARD_BXML']['W_RESPONSE']['W_JOB']['FNC_CC_PREAUTHORIZATION']['CC_TRANSACTION']['PROCESSING_STATUS']['FunctionResult'])) { if ($result['WIRECARD_BXML']['W_RESPONSE']['W_JOB']['FNC_CC_PREAUTHORIZATION']['CC_TRANSACTION']['PROCESSING_STATUS']['FunctionResult'] != 'ACK') { $errno = $result['WIRECARD_BXML']['W_RESPONSE']['W_JOB']['FNC_CC_PREAUTHORIZATION']['CC_TRANSACTION']['PROCESSING_STATUS']['ERROR']['Number']; switch ($errno) { case '14': case '20109': $error = $osC_Language->get('payment_wirecard_cc_error_unkown_card'); break; case '33': case '20071': $error = $osC_Language->get('payment_wirecard_cc_error_' . (int) $errno); break; default: $error = $osC_Language->get('payment_wirecard_cc_error_general'); break; } } } else { $error = $osC_Language->get('payment_wirecard_cc_error_general'); } if ($error === false) { osC_Order::process($this->_order_id, $this->order_status); $Qtransaction = $osC_Database->query('insert into :table_orders_transactions_history (orders_id, transaction_code, transaction_return_value, transaction_return_status, date_added) values (:orders_id, :transaction_code, :transaction_return_value, :transaction_return_status, now())'); $Qtransaction->bindTable(':table_orders_transactions_history', TABLE_ORDERS_TRANSACTIONS_HISTORY); $Qtransaction->bindInt(':orders_id', $this->_order_id); $Qtransaction->bindInt(':transaction_code', 1); $Qtransaction->bindValue(':transaction_return_value', $this->_transaction_response); $Qtransaction->bindInt(':transaction_return_status', 1); $Qtransaction->execute(); } else { osC_Order::remove($this->_order_id); $messageStack->add_session('checkout_payment', $error, 'error'); osc_redirect(osc_href_link(FILENAME_CHECKOUT, 'payment&wirecard_cc_owner=' . $osC_CreditCard->getOwner() . '&wirecard_cc_expires_month=' . $osC_CreditCard->getExpiryMonth() . '&wirecard_cc_expires_year=' . $osC_CreditCard->getExpiryYear() . (MODULE_PAYMENT_WIRECARD_CC_VERIFY_WITH_CVC == '1' ? '&wirecard_cc_cvc=' . $osC_CreditCard->getCVC() : ''), 'SSL')); } }
echo $order->info['payment_method']; ?> </p> </td> <td valign="top"> <?php if ($order->delivery != false) { ?> <h6><?php echo $osC_Language->get('order_delivery_address_title'); ?> </h6> <p><?php echo osC_Address::format($order->delivery, '<br />'); ?> </p> <?php if (!empty($order->info['shipping_method'])) { ?> <h6><?php echo $osC_Language->get('order_shipping_method_title'); ?> </h6> <p><?php echo $order->info['shipping_method']; ?>
http://www.oscommerce.com Copyright (c) 2009 osCommerce This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 (1991) as published by the Free Software Foundation. */ $osC_ObjectInfo = new osC_ObjectInfo(osC_ZoneGroups_Admin::getEntry($_GET['zeID'])); $countries_array = array(array('id' => '', 'text' => $osC_Language->get('all_countries'))); foreach (osC_Address::getCountries() as $country) { $countries_array[] = array('id' => $country['id'], 'text' => $country['name']); } $zones_array = array(array('id' => '', 'text' => $osC_Language->get('all_zones'))); if ($osC_ObjectInfo->get('zone_country_id') > 0) { foreach (osC_Address::getZones($osC_ObjectInfo->get('zone_country_id')) as $zone) { $zones_array[] = array('id' => $zone['id'], 'text' => $zone['name']); } } ?> <script type="text/javascript"><!-- function update_zone(theForm) { var NumState = theForm.zone_id.options.length; var SelectedCountry = ""; while(NumState > 0) { NumState--; theForm.zone_id.options[NumState] = null; }