Empty cart message

  • Posts: 292
  • Thank you received: 5
  • Hikashop Business
13 years 5 months ago #18806

Add to product cart, go to checkout, delete product from cart.
Returns to main page with empty cart message

Is it possible to have an option which disables the empty cart message please - our main shop page shows the cart module which says empty, so don't need the message twice.

See screenshot.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 5 months ago #18820

There is an option in the cart module to change the cart empty message so you should be able to remove that one. You could also enter the message in that option and then change the translation of the other one CART_EMPTY to remove it. That way, you would have the message in the cart module and not on the page.

Please Log in or Create an account to join the conversation.

  • Posts: 292
  • Thank you received: 5
  • Hikashop Business
13 years 5 months ago #18870

The empty cart message override in the module did not appear to work.

In the language override I set:

CART_EMPTY=""
  MY_CART_EMPTY="The cart is empty"

Then had to modify the product cart.php template.
$desc = $this->params->get('comp_description');
if(empty($desc)){
  $this->params->set('comp_description',JText::_('MY_CART_EMPTY'));
}

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 5 months ago #18872

Mmm. I had a look at the code. It should be msg instead of comp_description. Could you try with that (3 places in that file)?

Please Log in or Create an account to join the conversation.

  • Posts: 292
  • Thank you received: 5
  • Hikashop Business
13 years 5 months ago #18875

That fixed it, thanks.
I have got rid of MY_CART_EMPTY.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 5 months ago #18876

great. We'll add that to next release !

Please Log in or Create an account to join the conversation.

  • Posts: 13
  • Thank you received: 0
12 years 11 months ago #33044

Hi

Have had a read through of posts on this. I'd like to do a similar thing - completely remove the message that appears on the page: "the cart is empty". I have options set to show mini cart all the time so no need for message really. Could you advise - didn't really understand the instructions above.

Thanks for your help

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 11 months ago #33061

Hi,

To remove the message, you can just override its translation, as any text in HikaShop:
www.hikashop.com/en/download/languages.html#modify

Please Log in or Create an account to join the conversation.

  • Posts: 34
  • Thank you received: 1
11 years 3 months ago #117094

Joomla 3.1, hikashop 2.2

Info that may prove useful to others - another way of editing this message is via the products / cart.php override, especially if you want to add additional html markup or customisation rather than just removing the message.

if($cart_type == 'wishlist'){
   ...
}
else {
$empty= <edit this to customise>
}

Please Log in or Create an account to join the conversation.

Time to create page: 0.094 seconds
Powered by Kunena Forum