virtuemart empty cart link

go to /components/com_virtuemart/controllers/cart.php and add this fuction

public function deleteall() {
$mainframe = JFactory::getApplication();

$cart = VirtueMartCart::getCart();
$cart->emptyCart();
$mainframe->redirect(JRoute::_(‘index.php?option=com_virtuemart&view=cart’));
}

Go to your cart template and add

<a title=“<?php echo JText::_(‘COM_VIRTUEMART_CART_DELETE’) ?>“ align=“middle“ href=“<?php echo JRoute::_(‘index.php?option=com_virtuemart&view=cart&task=deleteall’) ?>“><i></i></a>

С етикет: , , ,
Публикувано в Joomla
Един коментар по “virtuemart empty cart link
  1. Arminas каза:

    Hi,

    maybe you can tell how to redirect to a product page after cart is deleted?

Вашият коментар

Вашият имейл адрес няма да бъде публикуван. Задължителните полета са отбелязани с *

*