function getDefaultOrderStatus() { $filter = array(); $filter[] = 'default_status=1'; $filter[] = '(o.page_uid=\'0\' or o.page_uid=\'' . $this->showCatalogFromPage . '\') and o.deleted=0 and o.id=od.orders_status_id and od.language_id=\'0\''; $record = mslib_befe::getRecord('', 'tx_multishop_orders_status o, tx_multishop_orders_status_description od', '', $filter); return $record; }
$subpartArray['###LABEL_PRODUCT_SEARCH_ENGINE_INDEXING_OFF_CHECKED###'] = (!$product['search_engines_allow_indexing'] and $_REQUEST['action'] == 'edit_product') ? 'checked="checked"' : ''; $subpartArray['###LABEL_ADMIN_NO_INDEXING###'] = $this->pi_getLL('admin_no'); $subpartArray['###LABEL_PRODUCT_CATEGORY###'] = $this->pi_getLL('admin_category'); //categories path $old_current_categories_id = mslib_fe::getProductToCategories($this->get['pid'], $product['categories_id']); $current_categories_id = $old_current_categories_id; if ($this->get['action'] == 'add_product' && $this->get['cid'] > 0) { $old_current_categories_id = ''; $current_categories_id = $this->get['cid']; } $subpartArray['###VALUE_OLD_CATEGORY_ID###'] = $old_current_categories_id; //$product['categories_id']; $subpartArray['###INPUT_CATEGORY_TREE###'] = '<input type="hidden" name="categories_id" id="categories_id" class="categoriesIdSelect2BigDropWider" value="' . $current_categories_id . '" />'; $subpartArray['###INPUT_CATEGORY_TREE_DEFAULT_PATH###'] = ''; if ($this->get['action'] == 'edit_product' && $this->ms['MODULES']['ENABLE_DEFAULT_CRUMPATH'] > 0) { $product_path = mslib_befe::getRecord($this->get['pid'], 'tx_multishop_products_to_categories', 'products_id', array('is_deepest=1 and default_path=1')); $default_path = 0; if (is_array($product_path) && count($product_path)) { $default_path = $product_path['node_id']; } $p2c_cats = explode(',', $old_current_categories_id); $default_path_sb = '<select name="default_path_categories_id" id="default_path_categories_id" class="categoriesIdSelect2BigDropWider">'; $default_path_sb .= '<option value="">' . $this->pi_getLL('choose') . '</option>'; foreach ($p2c_cats as $p2c_cat) { if ($p2c_cat > 0) { $cats = mslib_fe::Crumbar($p2c_cat, '', array()); $cats = array_reverse($cats); $catpath = array(); foreach ($cats as $cat_idx => $cat) { $catpath[] = $cat['name']; }
<div class="col-md-10"> <input type="text" class="form-control text" name="meta_description[' . $language['uid'] . ']" id="meta_description[' . $language['uid'] . ']" value="' . htmlspecialchars($lngcat[$language['uid']]['meta_description']) . '"> </div> </div>'; $categories_meta_block .= '</div></div></div>'; } // INPUT_CATEGORY_TREE $tmpcontent = ''; if ($this->conf['enableMultipleShops'] && $this->ms['MODULES']['ENABLE_CATEGORIES_TO_CATEGORIES']) { $shopPids = explode(',', $this->conf['connectedShopPids']); $tmpcontent .= '<div class="form-group" class="msEditCategoriesInputMultipleShopCategory"> <label>' . $this->pi_getLL('link_to_categories_in_other_shops') . '</label> <div class="msAttributesWrapper">'; foreach ($shopPids as $shopPid) { if (is_numeric($shopPid) and $shopPid != $this->shop_pid) { $pageinfo = mslib_befe::getRecord($shopPid, 'pages', 'uid', array('deleted=0 and hidden=0')); if ($pageinfo['uid']) { $categories_to_categories = ''; $shop_checkbox = ''; $select2_block_visibility = ' style="display:none"'; if ($this->get['action'] == 'edit_category') { $categories_to_categories = mslib_fe::getCategoriesToCategories($this->get['cid'], $pageinfo['uid']); if (!empty($categories_to_categories)) { $shop_checkbox = ' checked="checked"'; $select2_block_visibility = ' style="display:block"'; } } $tmpcontent .= '<div class="msAttributes"> <input type="checkbox" class="enableMultipleShopsCheckbox" id="enableMultipleShops_' . $pageinfo['uid'] . '" name="tx_multishop_pi1[enableMultipleShops][]" value="' . $pageinfo['uid'] . '" rel="' . $pageinfo['uid'] . '"' . $shop_checkbox . ' /> <label for="enableMultipleShops_' . $pageinfo['uid'] . '">' . $pageinfo['title'] . '</label> <div class="msEditCategoriesInputMultipleShopCategory" id="msEditCategoriesInputMultipleShopCategory' . $pageinfo['uid'] . '"' . $select2_block_visibility . '>
function createAttributeOptionValue($data) { if (!is_numeric($data['products_options_id'])) { return; } // ADD PRODUCT ATTRIBUTE OPTION $filter = array(); //$filter[]='language_id='.$data['language_id']; $filter[] = 'povp.products_options_id=' . $data['products_options_id']; //$filter[]='pov.products_options_values_name=\''.addslashes($data['products_options_values_name']).'\''; $filter[] = 'povp.products_options_values_id=pov.products_options_values_id'; $from = 'tx_multishop_products_options_values_to_products_options povp, tx_multishop_products_options_values pov'; //$str2="SELECT pov.products_options_values_id from tx_multishop_products_options_values_to_products_options povp, tx_multishop_products_options_values pov where // povp.products_options_id='".addslashes($products_options_id)."' and // pov.products_options_values_name='".addslashes($option_value)."' and // povp.products_options_values_id=pov.products_options_values_id"; if (mslib_befe::ifExists($data['products_options_values_name'], $from, 'pov.products_options_values_name', $filter)) { $record = mslib_befe::getRecord($data['products_options_values_name'], $from, 'pov.products_options_values_name', $filter); $products_options_values_id = $record['products_options_values_id']; } else { $insertArray = array(); $insertArray['language_id'] = $data['language_id']; $insertArray['products_options_values_name'] = $data['products_options_values_name']; $query = $GLOBALS['TYPO3_DB']->INSERTquery('tx_multishop_products_options_values', $insertArray); $GLOBALS['TYPO3_DB']->sql_query($query); $products_options_values_id = $GLOBALS['TYPO3_DB']->sql_insert_id(); } if ($data['products_options_id'] && $products_options_values_id) { $filter = array(); $filter[] = 'products_options_id=' . $data['products_options_id']; if (!mslib_befe::ifExists($products_options_values_id, 'tx_multishop_products_options_values_to_products_options', 'products_options_values_id', $filter)) { $insertArray = array(); $insertArray['products_options_id'] = $data['products_options_id']; $insertArray['products_options_values_id'] = $products_options_values_id; $query = $GLOBALS['TYPO3_DB']->INSERTquery('tx_multishop_products_options_values_to_products_options', $insertArray); $GLOBALS['TYPO3_DB']->sql_query($query); } return $products_options_values_id; } }
// check if all image are unresized if ($image_type == 'products') { $crop_all_checked = 0; $image_size_array = array(); $image_size_array[] = 50; $image_size_array[] = 100; $image_size_array[] = 200; $image_size_array[] = 300; $image_size_array[] = 'enlarged'; $return_data['cropped_image']['thumblist_50'] = false; $return_data['cropped_image']['thumblist_100'] = false; $return_data['cropped_image']['thumblist_200'] = false; $return_data['cropped_image']['thumblist_300'] = false; $return_data['cropped_image']['thumblist_enlarged'] = false; foreach ($image_size_array as $image_size) { $tmp_image_data = mslib_befe::getRecord($image_name, 'tx_multishop_product_crop_image_coordinate', 'image_filename', array('image_size=\'' . $image_size . '\'')); if (!is_array($tmp_image_data)) { $crop_all_checked += 1; } else { $return_data['cropped_image']['thumblist_' . $image_size] = true; } } if ($crop_all_checked == 5) { $return_data['crop_all_checked'] = true; } else { $return_data['crop_all_checked'] = false; } } echo json_encode($return_data); exit; break;
$qry = $GLOBALS['TYPO3_DB']->sql_query($str); $messages[] = $str; } // add invoice_grand_total_excluding_vat column $str = "select invoice_grand_total_excluding_vat from tx_multishop_invoices limit 1"; $qry = $GLOBALS['TYPO3_DB']->sql_query($str); if (!$qry) { $str = "ALTER TABLE `tx_multishop_invoices` ADD `invoice_grand_total_excluding_vat` decimal(24,14) default '0.00000000000000'"; $qry = $GLOBALS['TYPO3_DB']->sql_query($str); $messages[] = $str; } $sql_order = "select id, orders_id, invoice_id, reversal_invoice from tx_multishop_invoices"; $qry_order = $GLOBALS['TYPO3_DB']->sql_query($sql_order); if ($GLOBALS['TYPO3_DB']->sql_num_rows($qry_order)) { while ($invoices_row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry_order)) { $order_record = mslib_befe::getRecord($invoices_row['orders_id'], 'tx_multishop_orders', 'orders_id', array(), 'grand_total, grand_total_excluding_vat'); if ($order_record['grand_total_excluding_vat'] > 0) { $updateArray = array(); if ($invoices_row['reversal_invoice'] > 0) { // credit invoices if ($order_record['grand_total'] < 0) { // reverse to positive value if the tx_multishop_orders.grand_total already minus $updateArray['invoice_grand_total'] = str_replace('-', '', $order_record['grand_total']); $updateArray['invoice_grand_total_excluding_vat'] = str_replace('-', '', $order_record['grand_total_excluding_vat']); } else { $updateArray['invoice_grand_total'] = '-' . $order_record['grand_total']; $updateArray['invoice_grand_total_excluding_vat'] = '-' . $order_record['grand_total_excluding_vat']; } } else { $updateArray['invoice_grand_total'] = $order_record['grand_total']; $updateArray['invoice_grand_total_excluding_vat'] = $order_record['grand_total_excluding_vat'];
} else { if ($this->post['manufacturers_id']) { $updateArray['last_modified'] = time(); $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_manufacturers', 'manufacturers_id=\'' . $this->post['manufacturers_id'] . '\'', $updateArray); if (!($res = $GLOBALS['TYPO3_DB']->sql_query($query))) { $postErno[] = array('status' => 'error', 'message' => $GLOBALS['TYPO3_DB']->sql_error()); } else { $manufacturers_id = $this->post['manufacturers_id']; } } } if ($manufacturers_id) { if ($this->ms['MODULES']['ADMIN_CROP_MANUFACTURERS_IMAGES']) { if ($update_manufacturers_image) { $image_filename = $update_manufacturers_image; $image_crop_data = mslib_befe::getRecord($image_filename, 'tx_multishop_manufacturers_crop_image_coordinate', 'image_filename', array('manufacturers_id=\'0\'')); if (is_array($image_crop_data) && $image_crop_data['id'] > 0) { $updateArray = array(); $updateArray['manufacturers_id'] = $manufacturers_id; $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_manufacturers_crop_image_coordinate', 'id=\'' . $image_crop_data['id'] . '\'', $updateArray); $res = $GLOBALS['TYPO3_DB']->sql_query($query); } } } foreach ($this->post['content'] as $key => $value) { $str = "select 1 from tx_multishop_manufacturers_cms where manufacturers_id='" . $manufacturers_id . "' and language_id='" . $key . "'"; $qry = $GLOBALS['TYPO3_DB']->sql_query($str); $updateArray = array(); $updateArray['content'] = $this->post['content'][$key]; $updateArray['content_footer'] = $this->post['content_footer'][$key]; $updateArray['shortdescription'] = $this->post['shortdescription'][$key];
$option_value_id = $GLOBALS['TYPO3_DB']->sql_insert_id(); } else { $row2 = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry2); $option_value_id = $row2['products_options_values_id']; } } // LANGUAGE OVERLAYS for products options foreach ($this->languages as $langKey => $langTitle) { if ($langKey > 0) { $insertArray = array(); $insertArray['products_options_values_id'] = $option_value_id; $insertArray['language_id'] = $language_id; $insertArray['products_options_values_name'] = $option_value; $insertArray['language_id'] = $langKey; // get existing record $record = mslib_befe::getRecord($option_value_id, 'tx_multishop_products_options_values', 'products_options_values_id', array(0 => 'language_id=' . $langKey)); if ($record['products_options_values_id']) { $insertArray = mslib_befe::rmNullValuedKeys($insertArray); $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_products_options_values', 'products_options_values_id=' . $option_value_id . ' and language_id=' . $langKey, $insertArray); $res = $GLOBALS['TYPO3_DB']->sql_query($query); } else { // add new record $insertArray = mslib_befe::rmNullValuedKeys($insertArray); $query = $GLOBALS['TYPO3_DB']->INSERTquery('tx_multishop_products_options_values', $insertArray); if (!($res = $GLOBALS['TYPO3_DB']->sql_query($query))) { $erno[] = $query . '<br/>' . $GLOBALS['TYPO3_DB']->sql_error(); } } } } // LANGUAGE OVERLAYS for products options values EOL
} // make sure the payment fallback marker are replaced with empty string if the plugin not installed $array1 = array(); $array2 = array(); $array1[] = '###PAYMENT_FALLBACK_LINK###'; $array2[] = ''; $array1[] = '###PAYMENT_PAGE_LINK###'; $array2[] = ''; $content = str_replace($array1, $array2, $content); // custom hook that can be controlled by third-party plugin eof break; // psp thank you or error pages eof // psp thank you or error pages eof case 'payment_reminder_checkout': if ($this->get['tx_multishop_pi1']['hash']) { $tmpArray = mslib_befe::getRecord($this->get['tx_multishop_pi1']['hash'], 'tx_multishop_orders', 'hash'); if ($tmpArray['orders_id']) { $order = mslib_fe::getOrder($tmpArray['orders_id']); // replacing the variables with dynamic values $billing_address = ''; $delivery_address = ''; $full_customer_name = $order['billing_first_name']; if ($order['billing_middle_name']) { $full_customer_name .= ' ' . $order['billing_middle_name']; } if ($order['billing_last_name']) { $full_customer_name .= ' ' . $order['billing_last_name']; } $delivery_full_customer_name = $order['delivery_first_name']; if ($order['delivery_middle_name']) { $delivery_full_customer_name .= ' ' . $order['delivery_middle_name'];
public function mailUser($user, $subject, $body, $from_email = '*****@*****.**', $from_name = 'TYPO3 Multishop', $attachments = array(), $options = array()) { if ($user['email']) { $mail = new PHPMailer(); $mail->CharSet = 'UTF-8'; $mail->Encoding = 'base64'; $mail->XMailer = ' '; if ($GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport'] == 'smtp') { $mail->IsSMTP(); if (strstr($GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_server'], ':')) { // Hostname also has port number $array = explode(':', $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_server']); $mail->Host = $array[0]; $mail->Port = $array[1]; } else { $mail->Host = $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_server']; } if (isset($GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_username'])) { $mail->SMTPAuth = true; if (!empty($GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_encrypt'])) { $mail->SMTPSecure = $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_encrypt']; } $mail->Username = $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_username']; $mail->Password = $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_password']; } } if (is_array($options['add_custom_header'])) { foreach ($options['add_custom_header'] as $custom_header) { $mail->AddCustomHeader($custom_header); } } // $mail->IsSendmail(); // telling the class to use SendMail transport if (isset($options['email_tmpl_path']) && $options['email_tmpl_path']) { $template = $this->cObj->fileResource($options['email_tmpl_path']); } else { if ($this->conf['email_tmpl_path']) { $template = $this->cObj->fileResource($this->conf['email_tmpl_path']); } else { $template = $this->cObj->fileResource(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath('multishop') . 'templates/email_template.tmpl'); } } $markerArray = array(); $markerArray['###SUBJECT###'] = $subject; $markerArray['###BODY###'] = $body; // ADDITIONAL OPTIONAL MARKERS $markerArray['###STORE_NAME###'] = $this->ms['MODULES']['STORE_NAME']; $markerArray['###STORE_EMAIL###'] = $this->ms['MODULES']['STORE_EMAIL']; $markerArray['###STORE_DOMAIN###'] = $this->server['HTTP_HOST']; $markerArray['###STORE_URL###'] = $this->FULL_HTTP_URL; $markerArray['###STORE_ADDRESS###'] = ''; $markerArray['###STORE_ZIP###'] = ''; $markerArray['###STORE_CITY###'] = ''; $markerArray['###STORE_COUNTRY###'] = ''; if (!empty($this->conf['tt_address_record_id_store']) && $this->conf['tt_address_record_id_store'] > 0) { $address = mslib_befe::getRecord($this->conf['tt_address_record_id_store'], 'tt_address', 'uid'); if (is_array($address) && $address['uid']) { $markerArray['###STORE_ADDRESS###'] = $address['address']; $markerArray['###STORE_ZIP###'] = $address['zip']; $markerArray['###STORE_CITY###'] = $address['city']; $markerArray['###STORE_COUNTRY###'] = mslib_fe::getTranslatedCountryNameByEnglishName($this->lang, $address['country']); } } if (is_array($options['markerArray']) && count($options['markerArray'])) { foreach ($options['markerArray'] as $key => $val) { $markerArray[$key] = $val; } } if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['mailUserBodyTemplatePreProc'])) { $params = array('markerArray' => &$markerArray, 'user' => &$user, 'subject' => &$subject, 'body' => &$body, 'from_email' => &$from_email, 'from_name' => &$from_name, 'attachments' => &$attachments, 'options' => &$options); foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['mailUserBodyTemplatePreProc'] as $funcRef) { \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this); } } $body = $this->cObj->substituteMarkerArray($template, $markerArray); // try to change URL images to embedded $mail->SetFrom($from_email, $from_name); if (!empty($this->ms['MODULES']['STORE_REPLY_TO_EMAIL'])) { $mail->AddReplyTo($this->ms['MODULES']['STORE_REPLY_TO_EMAIL']); } if (count($attachments)) { foreach ($attachments as $path) { if ($path and is_file($path)) { $mail->AddAttachment($path); } } } $mail->Subject = $subject; //$mail->AltBody=$this->pi_getLL('admin_label_email_html_warning'); // optional, comment out and test if (!$options['withoutImageEmbedding']) { self::MsgHTMLwithEmbedImages($mail, $body); } else { $mail->MsgHTML($body, $this->DOCUMENT_ROOT); } if (!isset($options['skipSending'])) { $options['skipSending'] = 0; } //hook to let other plugins further manipulate the query if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['mailUserSendPreProc'])) { $params = array('user' => &$user, 'subject' => &$subject, 'body' => &$body, 'from_email' => &$from_email, 'from_name' => &$from_name, 'attachments' => &$attachments, 'options' => &$options, 'mailObj' => &$mail); foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['mailUserSendPreProc'] as $funcRef) { \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this); } } $mail->AddAddress($user['email'], $user['username']); if (!$options['skipSending']) { //hook to let other plugins further manipulate the query $return_status = $mail->Send(); if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['mailUserSendPostProc'])) { $params = array('user' => &$user, 'subject' => &$subject, 'body' => &$body, 'from_email' => &$from_email, 'from_name' => &$from_name, 'attachments' => &$attachments, 'options' => &$options, 'return_status' => &$return_status, 'mailObj' => &$mail); foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['mailUserSendPostProc'] as $funcRef) { \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this); } } if ($return_status) { return 1; } else { return 0; } } else { // Skip sending but return true return 1; } } else { return 0; } }
select2_sb(target_input_element_id, cb_value); } else { jQuery(target_input_element_id).select2("destroy"); jQuery(target_div_element_id).hide(); }; }); }); </script> '; if ($this->post && (is_array($this->post['tx_multishop_pi1']['merge_attribute_options_src']) and count($this->post['tx_multishop_pi1']['merge_attribute_options_src'])) && (is_array($this->post['tx_multishop_pi1']['merge_attribute_options_target']) and count($this->post['tx_multishop_pi1']['merge_attribute_options_target']))) { $new_attribute_option_id = array(); foreach ($this->post['tx_multishop_pi1']['merge_attribute_options_src'] as $src_option_id => $item) { $new_option = false; $target_option_id = $this->post['tx_multishop_pi1']['merge_attribute_options_target'][$src_option_id]; // make sure the manual input is not option id $is_target_option_id_exist = mslib_befe::getRecord($target_option_id, 'tx_multishop_products_options', 'products_options_id', array('language_id=\'0\'')); if (!is_array($is_target_option_id_exist) || isset($new_attribute_option_id[$target_option_id]) && $new_attribute_option_id[$pa_option_name] > 0) { $new_option = true; } if ($new_option) { $pa_option_name = $target_option_id; if (isset($new_attribute_option_id[$pa_option_name]) && $new_attribute_option_id[$pa_option_name] > 0) { $target_option_id = $new_attribute_option_id[$pa_option_name]; } else { $sql_chk = $GLOBALS['TYPO3_DB']->SELECTquery('products_options_id', 'tx_multishop_products_options', '', '', 'products_options_id desc', '1'); $qry_chk = $GLOBALS['TYPO3_DB']->sql_query($sql_chk); $rs_chk = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry_chk); $max_optid = $rs_chk['products_options_id'] + 1; // use microtime as the default sorting $tmp_mtime = explode(" ", microtime()); $mtime = array_sum($tmp_mtime);
if (!$this->ms['MODULES']['ADMIN_CUSTOMERS_IMPORT_TYPE']) { $script = 'admin_customer_import.php'; } if (strstr($this->ms['MODULES']['ADMIN_CUSTOMERS_IMPORT_TYPE'], "..")) { die('error in ADMIN_CUSTOMERS_IMPORT_TYPE value'); } else { if (strstr($this->ms['MODULES']['ADMIN_CUSTOMERS_IMPORT_TYPE'], "/")) { // relative mode $script = $this->DOCUMENT_ROOT . $this->ms['MODULES']['ADMIN_CUSTOMERS_IMPORT_TYPE'] . '.php'; } else { $script = 'admin_customer_import.php'; } } if ($this->get['action'] == 'run_job' && $this->get['code']) { $this->get['job_id'] = ''; $record = mslib_befe::getRecord($this->get['code'], 'tx_multishop_import_jobs', 'code'); if (is_array($record) && $record['id']) { $this->get['job_id'] = $record['id']; } if (is_numeric($this->get['job_id'])) { require $script; } if (!$this->ADMIN_USER) { exit; } } elseif ($this->ADMIN_USER) { require $script; } break; case 'admin_system_update_catalog_languages': if ($this->ADMIN_USER) {
$array1[] = '###ORDER_LINK###'; $array2[] = ''; $array1[] = '###CUSTOMER_ID###'; $array2[] = $order['customer_id']; $array1[] = '###CUSTOMER_COMMENTS###'; $array2[] = $order['customer_comments']; // ADDITIONAL OPTIONAL MARKERS $array1[] = '###STORE_EMAIL###'; $array2[] = $this->ms['MODULES']['STORE_EMAIL']; $array1[] = '###STORE_DOMAIN###'; $array2[] = $this->server['HTTP_HOST']; $array1[] = '###STORE_URL###'; $array2[] = $this->FULL_HTTP_URL; $setEmptyStoreMarkers = 1; if (!empty($this->conf['tt_address_record_id_store']) && $this->conf['tt_address_record_id_store'] > 0) { $address = mslib_befe::getRecord($this->conf['tt_address_record_id_store'], 'tt_address', 'uid'); if (is_array($address) && $address['uid']) { $array1[] = '###STORE_ADDRESS###'; $array2[] = $address['address']; $array1[] = '###STORE_ZIP###'; $array2[] = $address['zip']; $array1[] = '###STORE_CITY###'; $array2[] = $address['city']; $array1[] = '###STORE_TELEPHONE###'; $array2[] = $address['telephone']; $array1[] = '###STORE_COUNTRY###'; $array2[] = mslib_fe::getTranslatedCountryNameByEnglishName($this->lang, $address['country']); $setEmptyStoreMarkers = 0; } } if ($setEmptyStoreMarkers) {
break; case 'products_multiplication': $tmpcontent .= $row['products_multiplication']; break; case 'minimum_quantity': $tmpcontent .= $row['minimum_quantity']; break; case 'maximum_quantity': $tmpcontent .= $row['maximum_quantity']; break; case 'manufacturers_products_id': $tmpcontent .= $row['vendor_code']; break; case 'foreign_products_id': if ($this->ms['MODULES']['FLAT_DATABASE']) { $row2 = mslib_befe::getRecord($row['products_id'], 'tx_multishop_products', 'products_id'); $row['foreign_products_id'] = $row2['foreign_products_id']; } $tmpcontent .= $row['foreign_products_id']; break; case 'products_url': $where = ''; if ($row['categories_id']) { // get all cats to generate multilevel fake url $level = 0; if (count($row['categories_crum']) > 0) { foreach ($row['categories_crum'] as $cat) { $where .= "categories_id[" . $level . "]=" . $cat['id'] . "&"; $level++; } $where = substr($where, 0, strlen($where) - 1);
} // if ($this->ms['MODULES']['ORDER_EDIT']) eol // editable properties of orders, even when ORDERS_EDIT is disabled if ($this->post) { $updateArray = array(); $updateArray['expected_delivery_date'] = ''; if ($this->post['expected_delivery_date'] && $this->post['expected_delivery_date_local']) { $updateArray['expected_delivery_date'] = strtotime($this->post['expected_delivery_date']); } if ($this->post['track_and_trace_code']) { $updateArray['track_and_trace_code'] = $this->post['track_and_trace_code']; } if ($this->post['order_memo']) { $updateArray['order_memo'] = $this->post['order_memo']; } $order_memo_rec = mslib_befe::getRecord($this->get['orders_id'], 'tx_multishop_orders', 'orders_id', array(), 'order_memo'); if ($this->post['order_memo']) { if ($order_memo_rec['order_memo'] != $this->post['order_memo']) { $updateArray['memo_crdate'] = time(); } } if (count($updateArray)) { $close_window = 1; $updateArray['orders_last_modified'] = time(); $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_orders', 'orders_id=\'' . $this->get['orders_id'] . '\'', $updateArray); $res = $GLOBALS['TYPO3_DB']->sql_query($query); $orders['expected_delivery_date'] = ''; if (!empty($this->post['expected_delivery_date_local'])) { $orders['expected_delivery_date'] = $this->post['expected_delivery_date']; } $orders['track_and_trace_code'] = $this->post['track_and_trace_code'];