//end if (tep_db_num_rows($download_query) > 0) { } //end if (DOWNLOAD_ENABLED == 'true') { //end downloads } //end foreach($_POST['add_product_options'] as $option_id => $option_value_id) { } //end if (isset($_POST['add_product_options'])) { // Get Product Info //BOF Added languageid (otherwise products_name is empty) //$product_query = tep_db_query("select p.products_model, p.products_price, pd.products_name, p.products_tax_class_id from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pd.products_id = p.products_id where p.products_id = '" . (int)$add_product_products_id . "'"); $product_query = tep_db_query("select p.products_model, p.products_price, pd.products_name, p.products_tax_class_id from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pd.products_id = p.products_id where p.products_id = '" . (int) $add_product_products_id . "' and pd.language_id = '" . $languages_id . "'"); //EOF Added languageid $product = tep_db_fetch_array($product_query); $country_id = oe_get_country_id($order->delivery["country"]); $zone_id = oe_get_zone_id($country_id, $order->delivery['state']); $products_tax = tep_get_tax_rate($product['products_tax_class_id'], $country_id, $zone_id); // 2.1.3 Pull specials price from db if there is an active offer $special_price = tep_db_query("\r\n\t\t\tSELECT specials_new_products_price \r\n\t\t\tFROM " . TABLE_SPECIALS . " \r\n\t\t\tWHERE products_id =" . $add_product_products_id . " \r\n\t\t\tAND status"); $new_price = tep_db_fetch_array($special_price); if ($new_price) { $product['products_price'] = $new_price['specials_new_products_price']; } //sppc patch //Set to false by default, configurable in the Order Editor section of the admin panel //thanks to whistlerxj for the original version of this patch if (ORDER_EDITOR_USE_SPPC == 'true') { // first find out the customer associated with this order ID.. $c_id_result = tep_db_query('SELECT customers_id FROM orders WHERE orders_id="' . (int) $oID . '"');
function adjust_zones() { $customer_country_id = oe_get_country_id($this->customer['country']); $this->customer['country'] = array('id' => $customer_country_id, 'title' => $this->customer['country'], 'iso_code_2' => oe_get_country_iso_code_2($customer_country_id), 'iso_code_3' => oe_get_country_iso_code_3($customer_country_id)); $this->customer['zone_id'] = oe_get_zone_id($customer_country_id, $this->customer['state']); $billing_country_id = oe_get_country_id($this->billing['country']); $this->billing['country'] = array('id' => $billing_country_id, 'title' => $this->billing['country'], 'iso_code_2' => oe_get_country_iso_code_2($billing_country_id), 'iso_code_3' => oe_get_country_iso_code_3($billing_country_id)); $this->billing['zone_id'] = oe_get_zone_id($billing_country_id, $this->billing['state']); $delivery_country_id = oe_get_country_id($this->delivery['country']); $this->delivery['country'] = array('id' => $delivery_country_id, 'title' => $this->delivery['country'], 'iso_code_2' => oe_get_country_iso_code_2($delivery_country_id), 'iso_code_3' => oe_get_country_iso_code_3($delivery_country_id)); $this->delivery['zone_id'] = oe_get_zone_id($delivery_country_id, $this->delivery['state']); }