} if (AREA == 'A') { Registry::set('navigation.tabs.comments', array('title' => __('comments'), 'js' => true)); Registry::set('navigation.tabs.actions', array('title' => __('actions'), 'js' => true)); Tygh::$app['view']->assign('is_refund', fn_is_refund_action($return_info['action'])); Tygh::$app['view']->assign('order_info', fn_get_order_info($return_info['order_id'])); } $return_info['extra'] = !empty($return_info['extra']) ? unserialize($return_info['extra']) : array(); if (!is_array($return_info['extra'])) { $return_info['extra'] = array(); } Tygh::$app['view']->assign('reasons', fn_get_rma_properties(RMA_REASON)); Tygh::$app['view']->assign('actions', fn_get_rma_properties(RMA_ACTION)); Tygh::$app['view']->assign('return_info', $return_info); } elseif ($mode == 'print_slip' && !empty($_REQUEST['return_id'])) { if (fn_rma_print_packing_slips($_REQUEST['return_id'], $auth) == false) { return array(CONTROLLER_STATUS_NO_PAGE); } exit; } elseif ($mode == 'returns') { // [Breadcrumbs] if (AREA != 'A') { fn_add_breadcrumb(__('return_requests')); } // [/Breadcrumbs] $params = $_REQUEST; if (AREA == 'C') { $params['user_id'] = $auth['user_id']; if (!empty($auth['order_ids'])) { $params['order_ids'] = $auth['order_ids']; }
} $suffix = ".properties?property_type={$_REQUEST['property_type']}"; } // // Updating return details // if ($mode == 'update_details') { if (fn_rma_update_details($_REQUEST)) { $suffix = ".confirmation"; } else { $suffix = ".details?return_id=" . $_REQUEST['change_return_status']['return_id']; } return array(CONTROLLER_STATUS_OK, 'rma' . $suffix); } if ($mode == 'bulk_slip_print' && !empty($_REQUEST['return_ids'])) { fn_rma_print_packing_slips($_REQUEST['return_ids'], $auth); exit; } if ($mode == 'm_delete_returns' && !empty($_REQUEST['return_ids'])) { foreach ($_REQUEST['return_ids'] as $return_id) { fn_delete_return($return_id); } $suffix = ".returns"; } if ($mode == 'decline_products') { if (!empty($_REQUEST['accepted'])) { $decline_amount = 0; $change_return_status = $_REQUEST['change_return_status']; $order_items = db_get_hash_single_array("SELECT item_id, extra FROM ?:order_details WHERE order_id = ?i", array('item_id', 'extra'), $change_return_status['order_id']); foreach ((array) $_REQUEST['accepted'] as $item_id => $v) { if (isset($v['chosen']) && $v['chosen'] == 'Y') {