$tmp = new products(); $tmp->saveproduct(); $mainframe->redirect("index.php?option=com_caddy&action=products&task=show&field={$field}&order={$order}&search={$search}", JText::_('SC_PRODUCTSAVED')); break; case "decstore": $pid = JRequest::getCmd('pid'); $qty = JRequest::getCmd('qty'); $oid = JRequest::getCmd('order'); $tmp = new products(); $tmp->decfromstore($pid, $qty); //now get back to this order in edit/view mode JRequest::setvar('task', "edit"); $tmp = new orders(); $order = $tmp->getorder($oid); $details = $tmp->getODetails($oid); display::editOrder($order, $details['lst'], $details['nav']); break; case "remove": $tmp = new products(); $tmp->removeProducts($cid); $mainframe->redirect("index.php?option=com_caddy&action=products&task=show&field={$field}&order={$order}&search={$search}", JText::_('SC_PRODUCTDELETED')); break; case "publish": case "unpublish": $a = new products(); $a->publishproduct($cid, $task == 'publish'); $mainframe->redirect("index.php?option=com_caddy&action=products&task=show&field={$field}&order={$order}&search={$search}"); break; case "addoptgroup": print_r($_REQUEST); $prodid = JRequest::getVar("id");