[Skip to main content](#vessel-content)

#   Can't Customise Display Views

##

- **[workspace](/forum/user/58281-workspace "View workspace's Profile")**
- [![workspace's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58281-workspace "View workspace's Profile") Topic Author
- [ Offline](/forum/user/58281-workspace)

Less More

- Posts: 27
- Thank you received: 0
-
-

7 years 7 months ago [\#305861](#305861) by [workspace](/forum/user/58281-workspace "View workspace's Profile")  *[Can't Customise Display Views](/forum/3-bug-report/897332-cant-customise-display-views#305861 "I've been trying to make various changes to the layout in HikaShop front end, including the removal of the cart is empty notification. I tried by making changes to the product / cart.php file and the...")* was created by *[workspace](/forum/user/58281-workspace "View workspace's Profile")*

I've been trying to make various changes to the layout in HikaShop front end, including the removal of the cart is empty notification. I tried by making changes to the product / cart.php file and the checkout / cart .php file via the Display &gt; Views customisation section. But absolutely no changes seem to be having any impact whatsoever on the front end.

I've even tried completely erasing the cart .php pages and absolutely nothing happens as a result. I tried this with all of the templates too, just incase it was related to the template, but that did nothing.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84OTczMzItY2FudC1jdXN0b21pc2UtZGlzcGxheS12aWV3cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

7 years 7 months ago -  7 years 7 months ago [\#305866](#305866) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Can't Customise Display Views](/forum/3-bug-report/897332-cant-customise-display-views#305866 "I've been trying to make various changes to the layout in HikaShop front end, including the removal of the cart is empty notification. I tried by making changes to the product / cart.php file and the...")*

Hi,

As you said, usually this is because you're doing the modifications for the wrong template.
But since you say it's not that, then I'm not sure.
Do you see the customization after you've saved it ? (a bin icon should appear under the "remove customization" column of the Display&gt;Views menu for the view files with an override).
And if you open the customized view file, do you see your changes or an empty file ?
Sometimes security systems can mess up with the view overrides system as it flags the view overrides as potentially harmful (even if that's not the case). And in such cases, it's possible that the saving is refused, or that the saved override end up empty.

Note that you can also do view overrides via the Joomla override system (both systems are compatible together):
[ docs.joomla.org/Special:MyLanguage/J3.2:...r#Creating\_Overrides](https://docs.joomla.org/Special:MyLanguage/J3.2:How_to_use_the_Template_Manager#Creating_Overrides)

Last edit: 7 years 7 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84OTczMzItY2FudC1jdXN0b21pc2UtZGlzcGxheS12aWV3cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[workspace](/forum/user/58281-workspace "View workspace's Profile")**
- [![workspace's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58281-workspace "View workspace's Profile") Topic Author
- [ Offline](/forum/user/58281-workspace)

Less More

- Posts: 27
- Thank you received: 0
-
-

7 years 6 months ago [\#305890](#305890) by [workspace](/forum/user/58281-workspace "View workspace's Profile")  Replied by *[workspace](/forum/user/58281-workspace "View workspace's Profile")* on topic *[Can't Customise Display Views](/forum/3-bug-report/897332-cant-customise-display-views#305890 "I've been trying to make various changes to the layout in HikaShop front end, including the removal of the cart is empty notification. I tried by making changes to the product / cart.php file and the...")*

Hi Nicolas, I think you may be right. The issue could be simply that I'm editing the wrong file. I tried the config option to show me what view files to edit, and I was able to make changes to elements on the front end. So perhaps my question should more be:

What file do I need to edit to adjust the alert for empty cart? As I edited the files mentioned in my original post which both have the "CART_EMPTY" language tag in them, yet my changes made no difference.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84OTczMzItY2FudC1jdXN0b21pc2UtZGlzcGxheS12aWV3cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

7 years 6 months ago [\#305896](#305896) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Can't Customise Display Views](/forum/3-bug-report/897332-cant-customise-display-views#305896 "I've been trying to make various changes to the layout in HikaShop front end, including the removal of the cart is empty notification. I tried by making changes to the product / cart.php file and the...")*

Hi,

The empty cart message is not displayed by Hikashop but your template provider. HikaShop provides the text (which you can change with a translation override), but the look of it depends on your template:
[ stackoverflow.com/questions/10523287/how...message-php-template](https://stackoverflow.com/questions/10523287/how-to-override-joomla-system-messages-message-php-template)

Note that regarding the translations, there are two of them for the empty cart message: EMPTY_CART_MESSAGE and CART_EMPTY
You you need to change both as they are used in different situations.

Regarding the "Display view files" setting in the Hikashop configuration, it will mark all the view files used by HikaShop. You'll likely not see anything around the empty cart message since, as I said above, the cart empty message is not displayed by HikaShop.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84OTczMzItY2FudC1jdXN0b21pc2UtZGlzcGxheS12aWV3cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[workspace](/forum/user/58281-workspace "View workspace's Profile")**
- [![workspace's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58281-workspace "View workspace's Profile") Topic Author
- [ Offline](/forum/user/58281-workspace)

Less More

- Posts: 27
- Thank you received: 0
-
-

7 years 6 months ago [\#305901](#305901) by [workspace](/forum/user/58281-workspace "View workspace's Profile")  Replied by *[workspace](/forum/user/58281-workspace "View workspace's Profile")* on topic *[Can't Customise Display Views](/forum/3-bug-report/897332-cant-customise-display-views#305901 "I've been trying to make various changes to the layout in HikaShop front end, including the removal of the cart is empty notification. I tried by making changes to the product / cart.php file and the...")*

Thanks, I understood most of that already. The message may not be displayed by HikaCart, but the template still has to be told when to show a message and what to show in it. So my question is about finding what display view file handles the telling the template to show a message.

Because as I said I’ve adjusted two thus far that both mentioned ‘CART_EMPTY’ but my changes made no impact. So I may be editing the wrong file(s)?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84OTczMzItY2FudC1jdXN0b21pc2UtZGlzcGxheS12aWV3cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

7 years 6 months ago [\#305903](#305903) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Can't Customise Display Views](/forum/3-bug-report/897332-cant-customise-display-views#305903 "I've been trying to make various changes to the layout in HikaShop front end, including the removal of the cart is empty notification. I tried by making changes to the product / cart.php file and the...")*

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: Code:

if(empty($cart) &#124;&#124; empty($cart-&gt;cart_id) &#124;&#124; empty($cart-&gt;products)) { if(!empty($cart-&gt;messages)) { // Display messages foreach($cart-&gt;messages as $msg) { $this-&gt;app-&gt;enqueueMessage($msg['msg'], $msg['type']); } } $this-&gt;setRedirect($checkoutHelper-&gt;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: Code:

if(empty($cart-&gt;products)) { $checkoutHelper-&gt;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](https://stackoverflow.com/questions/10523287/how-to-override-joomla-system-messages-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.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84OTczMzItY2FudC1jdXN0b21pc2UtZGlzcGxheS12aWV3cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[workspace](/forum/user/58281-workspace "View workspace's Profile")**
- [![workspace's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58281-workspace "View workspace's Profile") Topic Author
- [ Offline](/forum/user/58281-workspace)

Less More

- Posts: 27
- Thank you received: 0
-
-

7 years 6 months ago [\#306061](#306061) by [workspace](/forum/user/58281-workspace "View workspace's Profile")  Replied by *[workspace](/forum/user/58281-workspace "View workspace's Profile")* on topic *[Can't Customise Display Views](/forum/3-bug-report/897332-cant-customise-display-views#306061 "I've been trying to make various changes to the layout in HikaShop front end, including the removal of the cart is empty notification. I tried by making changes to the product / cart.php file and the...")*

I've found the indirect solution to this has been to do a translation override for the message and set the text to nothing and for some reason this makes the message not display at all.

Which then allows us to create our own empty cart page.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84OTczMzItY2FudC1jdXN0b21pc2UtZGlzcGxheS12aWV3cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.057 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
