getView('custom', 'json'); // Now display the view. $view->display(null); } function save($data = 0) { if($data===0)$data = vRequest::getPost(); $data['custom_desc'] = vRequest::getHtml('custom_desc'); $data['custom_value'] = vRequest::getHtml('custom_value'); $data['layout_pos'] = vRequest::getCmd('layout_pos'); if(isset($data['params'])){ $data['params'] = vRequest::getHtml('params',''); } // onSaveCustom plugin; parent::save($data); } /** * Clone a product * * @author Max Milbers */ public function createClone() { $mainframe = vFactory::getApplication(); /* Load the view object */ $view = $this->getView('custom', 'html'); $model = VmModel::getModel('custom'); $msgtype = ''; $cids = vRequest::getInt($this->_cidName, vRequest::getInt('virtuemart_custom_id')); foreach ($cids as $custom_id) { if ($model->createClone($custom_id)) $msg = vmText::_('COM_VIRTUEMART_CUSTOM_CLONED_SUCCESSFULLY'); else { $msg = vmText::_('COM_VIRTUEMART_CUSTOM_NOT_CLONED_SUCCESSFULLY').' : '.$custom_id; $msgtype = 'error'; } } $mainframe->redirect('index.php?option=com_virtuemart&view=custom', $msg, $msgtype); } } // pure php no closing tag