_cidName = 'virtuemart_custom_id'; $uniqueCustomfieldtitles = VmConfig::get('unique_customfield_titles','1'); if($uniqueCustomfieldtitles == '1') { $this->setUniqueName('custom_title'); } $this->setObligatoryKeys('field_type'); $this->setLoggable(); $this->setLockable(); $this->setOrderable('ordering',false); $this->setParameterable('custom_params',array()); } function check(){ if($this->field_type == 'E' and empty($this->custom_jplugin_id) ){ vmInfo('Please select the plugin on bottom of the page at "Additional Parameters"'); return false; } return parent::check(); } /* * field from 3 table have to be checked at delete * #__vm_custom_field,#__virtuemart_customs,#__virtuemart_product_customfields */ function delete( $id=null , $where = 0 ){ $this->_db->setQuery('DELETE X,C FROM `#__virtuemart_customs` AS C LEFT JOIN `#__virtuemart_product_customfields` AS X ON X.`virtuemart_custom_id` = C.`virtuemart_custom_id` WHERE C.`virtuemart_custom_id`=' . $id); if ($this->_db->execute() === false) { vmError($this->_db->getError()); return false; } return true; } } // pure php no closing tag