components\com_virtuemart\controllers\
public function add() {
$mainframe = JFactory::getApplication();
if (VmConfig::get('use_as_catalog', 0)) {
$msg = JText::_('COM_VIRTUEMART_PRODUCT_NOT_ADDED_SUCCESSFULLY');
$type = 'error';
$mainframe->redirect('index.php', $msg, $type);
}
$cart = VirtueMartCart::getCart();
if ($cart) {
$virtuemart_product_ids = JRequest::getVar('virtuemart_product_id', array(), 'default', 'array');
$success = true;
if ($cart->add($virtuemart_product_ids,$success)) {
$msg = JText::_('COM_VIRTUEMART_PRODUCT_ADDED_SUCCESSFULLY');
$type = '';
} else {
$msg = JText::_('COM_VIRTUEMART_PRODUCT_NOT_ADDED_SUCCESSFULLY');
$type = 'error';
}
$mainframe->enqueueMessage($msg, $type);
$mainframe->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart'));
} else {
$mainframe->enqueueMessage('Cart does not exist?', 'error');
}
}
potrebbe essere qui???