} exit; break; case 'admin_update_orders_status': if ($this->ADMIN_USER) { $returnOutput = ''; if (is_numeric($this->post['tx_multishop_pi1']['orders_id']) and is_numeric($this->post['tx_multishop_pi1']['orders_status_id'])) { // hook if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/ajax_pages/core.php']['adminUpdateOrdersStatus'])) { $params = array('orders_id' => &$this->post['tx_multishop_pi1']['orders_id'], 'orders_status_id' => $this->post['tx_multishop_pi1']['orders_status_id'], 'returnOutput' => &$returnOutput); foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/ajax_pages/core.php']['adminUpdateOrdersStatus'] as $funcRef) { \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this); } } // hook eof mslib_befe::updateOrderStatus($this->post['tx_multishop_pi1']['orders_id'], $this->post['tx_multishop_pi1']['orders_status_id'], 1); echo $returnOutput; } } exit; break; case 'admin_update_order_product_status': if ($this->ADMIN_USER) { if (is_numeric($this->post['tx_multishop_pi1']['orders_id']) and is_numeric($this->post['tx_multishop_pi1']['order_product_id']) and is_numeric($this->post['tx_multishop_pi1']['orders_status_id'])) { mslib_befe::updateOrderProductStatus($this->post['tx_multishop_pi1']['orders_id'], $this->post['tx_multishop_pi1']['order_product_id'], $this->post['tx_multishop_pi1']['orders_status_id']); } } exit; break; case 'update_currency': // change selected currency + exchange rate and save it in temporary session
} } // if (!$order['is_locked']) eol if ($this->post['order_status']) { // first get current status if ($this->post['order_status'] == $orders['status']) { // no new order status has been defined. only mail when the email text box is containing content if ($this->post['comments']) { $continue_update = 1; } } else { $continue_update = 1; } if ($continue_update) { // dynamic variables mslib_befe::updateOrderStatus($this->get['orders_id'], $this->post['order_status'], $this->post['customer_notified']); } } if ($redirect_after_delete) { header("Location: " . $this->FULL_HTTP_URL . mslib_fe::typolink($this->shop_pid . ',2003', '&tx_multishop_pi1[page_section]=edit_order&orders_id=' . $this->get['orders_id'] . '&action=edit_order' . $is_proposal_params, 1)); exit; } else { if ($close_window) { if ($this->post['tx_multishop_pi1']['referrer']) { if (strpos($this->post['tx_multishop_pi1']['referrer'], 'edit_product') !== false || strpos($this->post['tx_multishop_pi1']['referrer'], 'edit_order') !== false) { $this->post['tx_multishop_pi1']['referrer'] = $this->FULL_HTTP_URL . mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=admin_orders' . $is_proposal_params); } header("Location: " . $this->post['tx_multishop_pi1']['referrer']); exit; } else { header("Location: " . $this->FULL_HTTP_URL . mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=admin_orders' . $is_proposal_params, 1));
$postErno[] = array('status' => 'error', 'message' => 'Failed to create invoice order: ' . $orders_id . '. Error(s): ' . implode('<br/>', $returnStatus['erno'])); } else { $postErno[] = array('status' => 'info', 'message' => 'Created invoice ' . $returnStatus['invoice_id'] . ' for order: ' . $orders_id); } } } } break; case 'change_order_status_for_selected_orders': if (is_array($this->post['selected_orders']) and count($this->post['selected_orders']) and is_numeric($this->post['tx_multishop_pi1']['update_to_order_status'])) { foreach ($this->post['selected_orders'] as $orders_id) { if (is_numeric($orders_id)) { $orders = mslib_fe::getOrder($orders_id); if ($orders['orders_id'] and $orders['status'] != $this->post['tx_multishop_pi1']['update_to_order_status']) { // mslib_befe::updateOrderStatus($orders['orders_id'],$this->post['tx_multishop_pi1']['update_to_order_status']); if (mslib_befe::updateOrderStatus($orders['orders_id'], $this->post['tx_multishop_pi1']['update_to_order_status'], 1)) { $postErno[] = array('status' => 'info', 'message' => 'Updated order status for orders is: ' . $orders['orders_id']); } else { $postErno[] = array('status' => 'error', 'message' => 'Order status not updated for orders id: ' . $orders['orders_id']); } } } } //hook to let other plugins further manipulate the settings if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/admin_pages/admin_orders.php']['adminOrdersUpdateOrderStatusForSelectedOrdersPostProc'])) { $params = array('content' => &$content); foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/admin_pages/admin_orders.php']['adminOrdersUpdateOrderStatusForSelectedOrdersPostProc'] as $funcRef) { \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this); } } }