Hi,
For the product name ; it is something that I will add into HikaMarket because the vendor should not provide an empty value for the product name (if he has the right to edit the product name).
About the price it is something more complicated because some store can authorize products without prices.
So I'll more recommend the usage of a custom plugin and the triggers "onBeforeProductCreate / onBeforeProductUpdate".
public function onBeforeProductCreate(&$product, &$do) {
$this->onBeforeProductUpdate($product, $do);
}
public function onBeforeProductUpdate(&$product, &$do) {
$app = JFactory::getApplication();
if($app->isAdmin())
return;
$option = JRequest::getCmd('option', '');
if($option != 'com_hikamarket' || !defined('HIKAMARKET_COMPONENT'))
return;
// Check for empty product name
if(isset($product->product_name) && empty($product->product_name)) {
$app->enqueueMessage(JText::sprintf('HIKAM_FIELD_REQUIRED', JText::_('PRODUCT_NAME')), 'error');
$do = false;
return;
}
}
Regards,