News:

Support the VirtueMart project and become a member

Main Menu

Disable auto redirection when deleting product in cart

Started by Tidus692, January 25, 2012, 10:07:21 AM

Previous topic - Next topic

Tidus692

Hi everybody,

I'm trying to change a little function of VirtueMart. When you select products and then go to the cart view, you can update or delete a row.

What I would like to do is when I delete an element it must go to the page I want (there : http://xxxxxxxxx.xxx/index.php?option=com_virtuemart&view=cart)

So I've changed the code in default_prcilesit.php (components/com_virtuemart/views/cart/tmp/default_pricelist.php) like so :

Before :


<a class="vmicon vm2-remove_from_cart" title="<?php echo JText::_('COM_VIRTUEMART_CART_DELETE'?>" align="middle"

href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=cart&task=delete&cart_virtuemart_product_id='.$prow->cart_item_id  ?>">

</a>



After :


<a class="vmicon vm2-remove_from_cart" title="<?php echo JText::_('COM_VIRTUEMART_CART_DELETE'?>" align="middle"
href="<?php echo JRoute::_('http://xxxxxx.xxx/index.php?option=com_virtuemart&view=cart&task=delete&cart_virtuemart_product_id='.$prow->cart_item_id  ?>">
</a>



When I delete the product, there is an automatic redirection to http://xxxxxxx.xxx/index.php/cart

But I would like to stay at the same page (in http://xxxxxxxxx.xxx/index.php?option=com_virtuemart&view=cart)

Is there a way to stay at my page ?


(I've tried this too :)


<a class="vmicon vm2-remove_from_cart" title="<?php echo JText::_('COM_VIRTUEMART_CART_DELETE'?>" align="middle"
href="http://xxxxxx.xxx/index.php?option=com_virtuemart&view=cart&task=delete&cart_virtuemart_product_id=<?php $prow->cart_item_id?>">

</a>



Best regards