setRedirect( 'index.php?option=com_virtuemart&view=calc', vmText::_('COM_VIRTUEMART_NO_ITEMS_SELECTED') ); return false; } $model = VmModel::getModel('calc'); if ($model->orderCalc($id, -1)) { $msg = vmText::_('COM_VIRTUEMART_ITEM_MOVED_UP'); } $this->setRedirect( 'index.php?option=com_virtuemart&view=calc', $msg ); } /** * Save the calc order * * @author jseros */ public function orderDown() { // Check token vRequest::vmCheckToken(); $id = 0; $cid = vRequest::getInt( 'cid', array() ); if (isset($cid[0]) && $cid[0]) { $id = $cid[0]; } else { $this->setRedirect( 'index.php?option=com_virtuemart&view=calc', vmText::_('COM_VIRTUEMART_NO_ITEMS_SELECTED') ); return false; } //getting the model $model = VmModel::getModel('calc'); $msg = ''; if ($model->orderCalc($id, 1)) { $msg = vmText::_('COM_VIRTUEMART_ITEM_MOVED_DOWN'); } $this->setRedirect( 'index.php?option=com_virtuemart&view=calc', $msg ); } /** * Save the categories order */ public function saveOrder() { // Check for request forgeries vRequest::vmCheckToken(); $cid = vRequest::getInt( 'cid', array() ); $model = VmModel::getModel('calc'); $order = vRequest::getInt('order'); $msg = ''; if ($model->setOrder($cid,$order)) { $msg = vmText::_('COM_VIRTUEMART_NEW_ORDERING_SAVED'); } $this->setRedirect('index.php?option=com_virtuemart&view=calc', $msg ); } } // pure php no closing tag