function xtc_get_country_list($name, $selected = '', $parameters = '') { // $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); // Probleme mit register_globals=off -> erstmal nur auskommentiert. Kann u.U. gelöscht werden. $countries = xtc_get_countriesList(); $countries_top_qry = xtc_db_query("select countries_id, countries_name from " . TABLE_COUNTRIES . " where top = '1' order by countries_name"); while ($countries_values = xtc_db_fetch_array($countries_top_qry)) { $countries_array_top[] = array('countries_id' => $countries_values['countries_id'], 'countries_name' => $countries_values['countries_name']); } for ($i = 0, $n = sizeof($countries_array_top); $i < $n; $i++) { $countries_array[] = array('id' => $countries_array_top[$i]['countries_id'], 'text' => $countries_array_top[$i]['countries_name']); } $countries_array[] = array('id' => '', 'text' => '----------------', 'disabled' => 'disabled'); for ($i = 0, $n = sizeof($countries); $i < $n; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } if (is_array($name)) { return xtc_draw_pull_down_menuNote($name, $countries_array, $selected, $parameters); } return xtc_draw_pull_down_menu($name, $countries_array, $selected, $parameters); }
function xtc_get_country_name($country_id) { $country_array = xtc_get_countriesList($country_id); return $country_array['countries_name']; }
require DIR_FS_CATALOG . DIR_WS_CLASSES . 'xtcPrice.php'; $xtPrice = new xtcPrice($order->info['currency'], $order->info['status']); require_once DIR_FS_INC . 'xtc_get_tax_class_id.inc.php'; require_once DIR_FS_INC . 'xtc_get_tax_rate.inc.php'; require_once DIR_FS_INC . 'xtc_oe_get_options_name.inc.php'; require_once DIR_FS_INC . 'xtc_oe_get_options_values_name.inc.php'; require_once DIR_FS_INC . 'xtc_oe_customer_infos.inc.php'; require_once DIR_FS_INC . 'xtc_get_countries.inc.php'; require_once DIR_FS_INC . 'xtc_get_address_format_id.inc.php'; // Benötigte Funktionen und Klassen Ende $action = isset($_GET['action']) ? $_GET['action'] : ''; // Adressbearbeitung Anfang if ($action == 'address_edit') { $customers_country = xtc_get_countriesList(xtc_db_prepare_input($_POST['customers_country_id'])); $delivery_country = xtc_get_countriesList(xtc_db_prepare_input($_POST['delivery_country_id']), true); $billing_country = xtc_get_countriesList(xtc_db_prepare_input($_POST['billing_country_id']), true); $lang_query = xtc_db_query("select languages_id from " . TABLE_LANGUAGES . " where directory = '" . $order->info['language'] . "'"); $lang = xtc_db_fetch_array($lang_query); $status_query = xtc_db_query("select customers_status_name from " . TABLE_CUSTOMERS_STATUS . " where customers_status_id = '" . (int) $_POST['customers_status'] . "' and language_id = '" . (int) $lang['languages_id'] . "' "); $status = xtc_db_fetch_array($status_query); $sql_data_array = array('customers_vat_id' => xtc_db_prepare_input($_POST['customers_vat_id']), 'customers_status' => xtc_db_prepare_input($_POST['customers_status']), 'customers_status_name' => xtc_db_prepare_input($status['customers_status_name']), 'customers_company' => xtc_db_prepare_input($_POST['customers_company']), 'customers_firstname' => xtc_db_prepare_input($_POST['customers_firstname']), 'customers_lastname' => xtc_db_prepare_input($_POST['customers_lastname']), 'customers_name' => xtc_db_prepare_input($_POST['customers_firstname']) . ' ' . xtc_db_prepare_input($_POST['customers_lastname']), 'customers_street_address' => xtc_db_prepare_input($_POST['customers_street_address']), 'customers_suburb' => xtc_db_prepare_input($_POST['customers_suburb']), 'customers_city' => xtc_db_prepare_input($_POST['customers_city']), 'customers_postcode' => xtc_db_prepare_input($_POST['customers_postcode']), 'customers_country' => $customers_country['countries_name'], 'customers_telephone' => xtc_db_prepare_input($_POST['customers_telephone']), 'customers_email_address' => xtc_db_prepare_input($_POST['customers_email_address']), 'customers_address_format_id' => xtc_get_address_format_id($_POST['customers_country_id']), 'customers_cid' => xtc_db_prepare_input($_POST['customers_cid']), 'delivery_company' => xtc_db_prepare_input($_POST['delivery_company']), 'delivery_firstname' => xtc_db_prepare_input($_POST['delivery_firstname']), 'delivery_lastname' => xtc_db_prepare_input($_POST['delivery_lastname']), 'delivery_name' => xtc_db_prepare_input($_POST['delivery_firstname']) . ' ' . xtc_db_prepare_input($_POST['delivery_lastname']), 'delivery_street_address' => xtc_db_prepare_input($_POST['delivery_street_address']), 'delivery_suburb' => xtc_db_prepare_input($_POST['delivery_suburb']), 'delivery_city' => xtc_db_prepare_input($_POST['delivery_city']), 'delivery_postcode' => xtc_db_prepare_input($_POST['delivery_postcode']), 'delivery_country' => $delivery_country['countries_name'], 'delivery_country_iso_code_2' => $delivery_country['countries_iso_code_2'], 'delivery_address_format_id' => xtc_get_address_format_id($_POST['delivery_country_id']), 'billing_company' => xtc_db_prepare_input($_POST['billing_company']), 'billing_firstname' => xtc_db_prepare_input($_POST['billing_firstname']), 'billing_lastname' => xtc_db_prepare_input($_POST['billing_lastname']), 'billing_name' => xtc_db_prepare_input($_POST['billing_firstname']) . ' ' . xtc_db_prepare_input($_POST['billing_lastname']), 'billing_street_address' => xtc_db_prepare_input($_POST['billing_street_address']), 'billing_suburb' => xtc_db_prepare_input($_POST['billing_suburb']), 'billing_city' => xtc_db_prepare_input($_POST['billing_city']), 'billing_postcode' => xtc_db_prepare_input($_POST['billing_postcode']), 'billing_country' => $billing_country['countries_name'], 'billing_country_iso_code_2' => $billing_country['countries_iso_code_2'], 'billing_address_format_id' => xtc_get_address_format_id($_POST['billing_country_id']), 'last_modified' => 'now()'); xtc_db_perform(TABLE_ORDERS, $sql_data_array, 'update', 'orders_id = \'' . (int) $_POST['oID'] . '\''); xtc_redirect(xtc_href_link(FILENAME_ORDERS_EDIT, 'edit_action=address&oID=' . (int) $_POST['oID'])); } // Adressbearbeitung Ende // Artikeldaten einfügen / bearbeiten Anfang: // Artikel bearbeiten Anfang: if ($action == 'product_edit') { $lang_query = xtc_db_query("select languages_id from " . TABLE_LANGUAGES . " where directory = '" . $order->info['language'] . "'"); $lang = xtc_db_fetch_array($lang_query); $status = get_customers_taxprice_status();
<?php /* ----------------------------------------------------------------------------------------- $Id$ modified eCommerce Shopsoftware http://www.modified-shop.org Copyright (c) 2009 - 2013 [www.modified-shop.org] ----------------------------------------------------------------------------------------- Released under the GNU General Public License ---------------------------------------------------------------------------------------*/ require_once DIR_FS_EXTERNAL . 'paypal/classes/PayPalPayment.php'; $paypal_cart = new PayPalPayment('paypalcart'); if ($paypal_cart->enabled === true && $paypal_cart->get_config('MODULE_PAYMENT_' . strtoupper($paypal_cart->code) . '_SHOW_PRODUCT') == '1') { $info_smarty->assign('ADD_CART_BUTTON_PAYPAL', $paypal_cart->product_checkout_button()); } $paypal_installment = new PayPalPayment('paypalinstallment'); require_once DIR_FS_INC . 'xtc_get_countries.inc.php'; $country = xtc_get_countriesList(isset($_SESSION['country']) ? $_SESSION['country'] : (isset($_SESSION['customer_country_id']) ? $_SESSION['customer_country_id'] : STORE_COUNTRY), true); if ($paypal_installment->enabled === true && $country['countries_iso_code_2'] == 'DE') { $amount = $xtPrice->xtcGetPrice($product->data['products_id'], false, 1, $product->data['products_tax_class_id'], $product->data['products_price']); $presentment = $paypal_installment->get_presentment_details($amount, $_SESSION['currency'], $country['countries_iso_code_2'], 'product', true); $info_smarty->assign('PAYPAL_INSTALLMENT', $presentment); }
function xtc_get_countries_with_iso_codes($countries_id) { return xtc_get_countriesList($countries_id, true); }