function save() { $jinput = JFactory::getApplication()->input; $post = $jinput->post; $btnAction = $post->get('btnAction'); $storeHelper = new storeHelper(); $result = $storeHelper->saveVendorDetails($post); $qtcadminCall = $jinput->get('qtcadminCall'); if ($btnAction == 'vendor.saveAndClose') { $link = JRoute::_('index.php?option=com_quick2cart&view=stores&layout=my&Itemid=' . $this->my_stores_itemid, false); } else { $link = JUri::base() . 'index.php?option=com_quick2cart&view=vendor&layout=createstore&store_id=' . $result['store_id']; } if (!empty($qtcadminCall)) { $link = JUri::root() . 'administrator/index.php?option=com_quick2cart'; } $this->setRedirect($link, $result['msg']); }
function save() { $jinput = JFactory::getApplication()->input; $post = $jinput->post; $model = $this->getModel('vendor'); $storeHelper = new storeHelper(); $storeOwner = $post->get('store_creator_id'); $result = $storeHelper->saveVendorDetails($post, $storeOwner); $msg = $result['msg']; $task = $jinput->get('task'); $btnAction = $post->get('btnAction'); if ($btnAction == 'vendor.saveAndClose') { $link = JUri::base() . "index.php?option=com_quick2cart&view=stores"; $this->setRedirect($link, $msg); } else { switch ($task) { case 'save': $this->setRedirect('index.php?option=com_quick2cart&view=vendor&layout=createstore&store_id=' . $result['store_id'], $msg); break; } } }