Hi
I have a question about cart table (pricelist). If I add something to the cart it is shown in form of a table on the index.php?option=com_virtuemart&view=cart page.
But, if I remove all the products, the table remains. It deletes only quantity and prices.
In the VM 1.1 when products were deleted it shows only information, that cart is empty, but no table.
Is it possible to make that in VM2?
add to your default.php in your cart folder
at line 58
if (count($this->cart->products) >=1) {
?>
and at the end (line 181)
<?php
}
else {
echo JText::_ ('COM_VIRTUEMART_CART_NO_PRODUCT');
}
?>
That's right! Thank you! :)
Hi, is this also possible in VM3 please? I have tried but does not work. This does however work if you want to hide the other elements such as the checkout button when the cart is empty.
I am using VirtueMart 3.8.4 and Joomla! 3.9.21
already works perfectly on the standard VM checkout .. so there must be something different about your install...
That is strange then,i have put it back to the default cart layout (which I have not modified) and tried with the Beez template, but still shows the table when the cart is empty? Is there an option in the configuration then as i can't seem to see it.
May I suggest you use this
If there are no cart products use this
if (!$this->cart->cartProductsData){
or use this for when there are cart products
if ($this->cart->cartProductsData){
I guess you still have some active overrides or plugin in the cart.
This is like AH sais not normal behaviour, You have something still active.
Jörgen @ Kreativ Fotografi
Thanks AH, does not work in default.php, but works in default_pricelist.php
Nice to hear it works.
I hope You have overidden the files in the template and not the core files ;)
Jörgen
Hi Jörgen, yes indeed :)
Thanks