Empty shopping cart msg?

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Thu Jan 24, 2013 10:01 pm
Reply with quote
Report this post
Gents,

When the shopping cart is empty, there is no message.

Please can you tell me how we can display a message that says something like "your shopping cart is empty"?

Thx
User avatar
Gold Boarder

GK User
Fri Jan 25, 2013 6:18 pm
Reply with quote
Report this post
The pop-up cart just default virtuemart cart module loaded in pop-up window so if you want to make changes in this cart you need to modify virtuemart cart module. To add you custom changes you need to modify file in
Code: Select all
template/html/mod_virtuemart_cart/default.php
User avatar
Platinum Boarder

GK User
Sat Jan 26, 2013 12:55 am
Reply with quote
Report this post
Thanks bkrztuk.

I've been playing around with that file but just can't work out what I need to display.

I know in the official VM2 demo there is an empty cart message:-
http://demo.virtuemart.net/index.php/20 ... pping-cart

And in the en-GB.com_virtuemart.ini file there is the language COM_VIRTUEMART_CART_NO_PRODUCT

But I don't know how to display this conditionally? Please can you advise me?
As this is in the default Virtuemart, does this mean you guys chose to leave it out of bike store?
User avatar
Gold Boarder

GK User
Sat Jan 26, 2013 8:14 pm
Reply with quote
Report this post
Please just try to add this code :

Code: Select all
<?php if(count($data->products) == 0) : ?>
         <h3><?php echo JText::_('NO_PRODUCTS_MESSAGE'); ?></h3>
      <?php endif; ?>


below this part :

Code: Select all
   <h3><?php echo JText::_('TPL_GK_LANG_MY_CART'); ?></h3>


(line 66-68)
User avatar
Platinum Boarder

GK User
Sun Jan 27, 2013 3:13 pm
Reply with quote
Report this post
Thanks so much bkrztuk - that was exactly the info. I needed and my shopping cart now looks just how I want it to! :-)

I suppose there is just one more thing I'd like your input - is it possible to replace the view SHOW CART in the empty cart with CONTINUE SHOPPING and then have it show SHOW CART when there is something in the cart to show???
User avatar
Gold Boarder

GK User
Mon Jan 28, 2013 9:16 am
Reply with quote
Report this post
I don't think it is possible because this demands to load two different views - our cart load only default VM cart. If you need you can always look for some custom mini cart at extensions.joomla.org.
User avatar
Platinum Boarder

GK User
Tue Jan 29, 2013 6:25 pm
Reply with quote
Report this post
OK.

Meanwhile, can you tell me how to display a similar empty message in the full cart view that you reach by clicking on the SHOW CART button on the pop up cart?

I'd also like to hide the CHECK OUT NOW button until an item is in the basket. How can this be achieved?

Thanks!
User avatar
Gold Boarder

GK User
Thu Jan 31, 2013 10:22 am
Reply with quote
Report this post
Sorry but all this changes are changes in VirtueMart views I gave you details which files you need to modify but preparing complete code is beyond our support. This are not small changes so maybe you should ask on VirtueMart support forum.
User avatar
Platinum Boarder

GK User
Mon Jul 15, 2013 2:22 pm
Reply with quote
Report this post
Hi there,
I had same issue and this worked perfect.
BUT
I want to also add this to the actual cart page: http://www.buildersinburnley.org/index. ... ;view=cart

So that if cart is empty none of the register, billing or tables appear, just the message 'Your Cart is Empty'.

Please can you tell me how I make this work.

Thanks,
Sean R.
User avatar
Junior Boarder

GK User
Tue Jul 16, 2013 11:02 am
Reply with quote
Report this post
All changes you need to make in this file :

template/html/mod_virtuemart_cart/default.php


and there is no some code that I can give you because the data that you want to display is generated by VirtueMart view so the only way is to find proper VM file, copy the content to cart view.
User avatar
Platinum Boarder


cron