Hi,
I don't understand what you mean ?
The empty cart message you see when you get redirected to another page is not in a view file.
It's done in a controller file.
For example, if you try to access a HikaShop checkout page while your cart is empty, the message will come from the code:
if(empty($cart) || empty($cart->cart_id) || empty($cart->products)) {
if(!empty($cart->messages)) {
// Display messages
foreach($cart->messages as $msg) {
$this->app->enqueueMessage($msg['msg'], $msg['type']);
}
}
$this->setRedirect($checkoutHelper->getRedirectUrl(), JText::_('CART_EMPTY'));
return true;
}
in the file components/com_hikashop/controllers/checkout.php
You can't change that code with a view override as it's not a view file, it's a controller file.
Now there are many places in HikaShop which will trigger the display of that error message.
For example, there is also the code:
if(empty($cart->products)) {
$checkoutHelper->redirectBeforeDisplay = JText::_('CART_EMPTY');
}
in the file administrator/components/com_hikashop/helpers/checkout/cart.php which is done when the cart is changed on the checkout.
Now, for all of these:
- if you want to change the text of that message, a translation override is the best
- if you want to change the look of that message, it's in your template that you want to do that:
stackoverflow.com/questions/10523287/how...message-php-template
- besides, that then only thing left would be to remove it, and in that case, you would have to alter the code which triggers the display of the message. However, you need to beware that if you do that, you'll loose your changes after each update of HikaShop, and you might end up modifying the behavior of the system so you need to be careful when doing your changes.