本文整理汇总了PHP中Modules::create_order方法的典型用法代码示例。如果您正苦于以下问题:PHP Modules::create_order方法的具体用法?PHP Modules::create_order怎么用?PHP Modules::create_order使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Modules
的用法示例。
在下文中一共展示了Modules::create_order方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process_data
public function process_data()
{
global $temp_orders_id;
$strlen = strlen(get_class($this));
if (isset($_POST[$this->type])) {
if (substr($_POST[$this->type], 0, $strlen) == get_class($this)) {
if ($temp_orders_id == 0) {
$temp_orders_id = parent::create_order();
} else {
tep_db_query('UPDATE temp_orders SET payment_method = "' . $_POST[$this->type] . '", orders_status = "' . $this->instances[$_POST[$this->type]]['order_status_id'] . '", payment_method_extra = "" WHERE orders_id = "' . $temp_orders_id . '"');
}
}
return true;
} else {
$this->errors[$this->type] = Translate('Kies a.u.b. een betaalmethode.');
return false;
}
}
示例2: process_data
public function process_data()
{
global $temp_orders_id;
if ($temp_orders_id == 0) {
$temp_orders_id = parent::create_order();
tep_db_query('INSERT INTO temp_orders_status_history (orders_id, date_added, customer_notified, comments) VALUES("' . $temp_orders_id . '", NOW(), 0, "' . $_POST[$this->type] . '")');
} else {
//check if orders_status_history instance for this order exists
$osh_query = tep_db_query('SELECT orders_status_history_id FROM temp_orders_status_history WHERE orders_id = "' . $temp_orders_id . '" ORDER BY orders_status_history_id desc LIMIT 1');
if (tep_db_num_rows($osh_query) > 0) {
$osh = tep_db_fetch_array($osh_query);
tep_db_query('UPDATE temp_orders_status_history SET comments = "' . $_POST[$this->type] . '", date_added = NOW() WHERE orders_status_history_id = "' . $osh['orders_status_history_id'] . '"');
} else {
tep_db_query('INSERT INTO temp_orders_status_history (orders_id, date_added, customer_notified, comments) VALUES("' . $temp_orders_id . '", NOW(), 0, "' . $_POST[$this->type] . '")');
}
}
return true;
}
示例3: process_data
public function process_data()
{
global $temp_orders_id, $currencies;
$strlen = strlen(get_class($this));
if (isset($_POST[$this->type])) {
if (substr($_POST[$this->type], 0, $strlen) == get_class($this)) {
if ($temp_orders_id == 0) {
$temp_orders_id = parent::create_order();
}
$ot_query = tep_db_query('SELECT orders_total_id FROM temp_orders_total WHERE orders_id = "' . $temp_orders_id . '" AND class="' . $this->type . '"');
if (tep_db_num_rows($ot_query) > 0) {
tep_db_query('UPDATE temp_orders_total SET title="' . $this->instances[$_POST[$this->type]]['title'] . '", text="' . $currencies->display_price($this->instances[$_POST[$this->type]]['quote'], 0) . '", value="' . $this->instances[$_POST[$this->type]]['quote'] . '", sort_order="' . $this->instances[$_POST[$this->type]]['sort_order'] . '" WHERE orders_id = "' . $temp_orders_id . '" AND class="' . $this->type . '"');
} else {
tep_db_query('INSERT INTO temp_orders_total (orders_id, title, text, value, class, sort_order) VALUES ("' . $temp_orders_id . '", "' . $this->instances[$_POST[$this->type]]['title'] . '", "' . $currencies->display_price($this->instances[$_POST[$this->type]]['quote'], 0) . '", "' . $this->instances[$_POST[$this->type]]['quote'] . '", "' . $this->type . '", "' . $this->instances[$_POST[$this->type]]['sort_order'] . '")');
}
tep_db_query('UPDATE temp_orders SET shipping_method = "' . $_POST[$this->type] . '" WHERE orders_id = "' . $temp_orders_id . '"');
if (extension_loaded('apc') && ini_get('apc.enabled')) {
apc_delete('temp_orders_total_' . $temp_orders_id);
}
}
return true;
} else {
$this->errors[$this->type] = Translate('Kies a.u.b. een verzendmethode.');
return false;
}
}
示例4: process_data
public function process_data()
{
global $temp_orders_id, $currencies;
if (isset($_POST[$this->type])) {
if ($_POST[$this->type] == get_class($this)) {
if ($temp_orders_id == 0) {
$temp_orders_id = parent::create_order();
}
$ot_query = tep_db_query('SELECT orders_total_id FROM temp_orders_total WHERE orders_id = "' . $temp_orders_id . '" AND class="' . $this->type . '"');
if (tep_db_num_rows($ot_query) > 0) {
tep_db_query('UPDATE temp_orders_total SET title="' . $this->config['title'] . '", text="' . $currencies->display_price($this->getQuote(), 0) . '", value="' . $this->getQuote() . '", sort_order="' . $this->config['sort_order'] . '" WHERE orders_id = "' . $temp_orders_id . '" AND class="' . $this->type . '"');
} else {
tep_db_query('INSERT INTO temp_orders_total (orders_id, title, text, value, class, sort_order) VALUES ("' . $temp_orders_id . '", "' . $this->config['title'] . '", "' . $currencies->display_price($this->getQuote(), 0) . '", "' . $this->getQuote() . '", "' . $this->type . '", "' . $this->config['sort_order'] . '")');
}
if (isset($_POST[get_class($this) . '_submit']) && $_POST[get_class($this) . '_submit'] == 'search_postcode') {
//Search kialo points with postcode
return false;
}
if (!isset($_POST[get_class($this) . '_kp'])) {
$this->errors[$this->type] = Translate('Kies a.u.b. een Kiala punt.');
return false;
}
tep_db_query('UPDATE temp_orders SET shipping_method = "' . $_POST[$this->type] . '", shipping_method_extra = "' . $_POST[get_class($this) . '_kp'] . '" WHERE orders_id = "' . $temp_orders_id . '"');
}
if ($temp_orders_id > 0) {
$this->temp_data = Checkout::get_all_data_from_temp_db($temp_orders_id);
foreach ($this->temp_data[$temp_orders_id]['orders_total'] as $key => $data) {
if ($data['class'] == 'order_subtotal') {
$this->order_subtotal = $data['value'];
}
}
}
return true;
} else {
$this->errors[$this->type] = Translate('Kies a.u.b. een verzendmethode.');
if ($temp_orders_id > 0) {
$this->temp_data = Checkout::get_all_data_from_temp_db($temp_orders_id);
foreach ($this->temp_data[$temp_orders_id]['orders_total'] as $key => $data) {
if ($data['class'] == 'order_subtotal') {
$this->order_subtotal = $data['value'];
}
}
}
return false;
}
}
示例5: process_data
public function process_data()
{
global $temp_orders_id, $languages_code, $currency;
$strlen = strlen(get_class($this));
if (isset($_POST[$this->type])) {
if (substr($_POST[$this->type], 0, $strlen) == get_class($this)) {
if ($temp_orders_id == 0) {
$temp_orders_id = parent::create_order();
}
tep_db_query('UPDATE temp_orders SET payment_method = "' . $_POST[$this->type] . '", payment_method_extra = "' . $_POST[$this->type . '_paymentmethod'] . '", orders_status = "' . $this->instances[$_POST[$this->type]]['order_status_id'] . '" WHERE orders_id = "' . $temp_orders_id . '"');
if (extension_loaded('apc') && ini_get('apc.enabled')) {
apc_delete('temp_order_' . $temp_orders_id);
}
}
return true;
} else {
$this->errors[$this->type] = Translate('Kies a.u.b. een betaalmethode.');
return false;
}
}
示例6: process_data
public function process_data()
{
global $temp_orders_id, $currencies;
if (isset($_POST[$this->type])) {
if ($_POST[$this->type] == get_class($this)) {
if ($temp_orders_id == 0) {
$temp_orders_id = parent::create_order();
}
$ot_query = tep_db_query('SELECT orders_total_id FROM temp_orders_total WHERE orders_id = "' . $temp_orders_id . '" AND class="' . $this->type . '"');
if (tep_db_num_rows($ot_query) > 0) {
tep_db_query('UPDATE temp_orders_total SET title="' . $this->config['title'] . '", text="' . $currencies->display_price($this->getQuote(), 0) . '", value="' . $this->getQuote() . '", sort_order="' . $this->config['sort_order'] . '" WHERE orders_id = "' . $temp_orders_id . '" AND class="' . $this->type . '"');
} else {
tep_db_query('INSERT INTO temp_orders_total (orders_id, title, text, value, class, sort_order) VALUES ("' . $temp_orders_id . '", "' . $this->config['title'] . '", "' . $currencies->display_price($this->getQuote(), 0) . '", "' . $this->getQuote() . '", "' . $this->type . '", "' . $this->config['sort_order'] . '")');
}
if (isset($_POST[get_class($this) . '_submit']) && $_POST[get_class($this) . '_submit'] == 'search_postcode') {
//Search Bpost Service points with postcode
return false;
}
if (!isset($_POST[get_class($this) . '_sp'])) {
$this->errors[$this->type] = Translate('Kies a.u.b. een Bpost Service punt.');
return false;
}
if (isset($_POST[get_class($this) . '_postcode']) && !empty($_POST[get_class($this) . '_postcode'])) {
$this->xml = $this->convertXMLtoArray(simplexml_load_file('http://taxipost.geo6.be/Locator?Partner=' . $this->config['account_id'] . '&AppId=' . STORE_NAME . '&Function=search&Format=xml&Zone=' . $_POST[get_class($this) . '_postcode'] . '&Language=' . $languages_code . '&Type=' . $this->config['bpost_types'] . '&Limit=' . $this->config['max_sp']));
} else {
$this->xml = $this->convertXMLtoArray(simplexml_load_file('http://taxipost.geo6.be/Locator?Partner=' . $this->config['account_id'] . '&AppId=' . STORE_NAME . '&Function=search&Format=xml&Zone=' . $this->temp_data[$temp_orders_id]['orders']['delivery_postcode'] . '&Language=' . $languages_code . '&Type=' . $this->config['bpost_types'] . '&Limit=' . $this->config['max_sp']));
}
$type = 1;
foreach ($this->xml['PoiList']['Poi'] as $key => $data) {
if ($data['Record']['Id'] == $_POST[get_class($this) . '_sp']) {
$type = $data['Record']['Type'];
}
}
tep_db_query('UPDATE temp_orders SET shipping_method = "' . $_POST[$this->type] . '", shipping_method_extra = "&Id=' . $_POST[get_class($this) . '_sp'] . '&Type=' . $type . '" WHERE orders_id = "' . $temp_orders_id . '"');
}
if ($temp_orders_id > 0) {
$this->temp_data = Checkout::get_all_data_from_temp_db($temp_orders_id);
foreach ($this->temp_data[$temp_orders_id]['orders_total'] as $key => $data) {
if ($data['class'] == 'order_subtotal') {
$this->order_subtotal = $data['value'];
}
}
}
return true;
} else {
$this->errors[$this->type] = Translate('Kies a.u.b. een verzendmethode.');
if ($temp_orders_id > 0) {
$this->temp_data = Checkout::get_all_data_from_temp_db($temp_orders_id);
foreach ($this->temp_data[$temp_orders_id]['orders_total'] as $key => $data) {
if ($data['class'] == 'order_subtotal') {
$this->order_subtotal = $data['value'];
}
}
}
return false;
}
}