Two equal CSS files

  • Posts: 152
  • Thank you received: 11
10 months 1 week ago #351846

-- HikaShop version -- : 4.7.2
-- Joomla version -- : 4.3.1
-- PHP version -- : 8.0.28
-- Browser(s) name and version -- : Chrome

When in HikaShop Cart notification Plugin, i set Popup in Display location option I see two new css files.
notify-metro.css is the same as notify-metro.css?v=472
I think it is useless to upload two identical files

Attachments:

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

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
10 months 1 week ago #351848

Hi,

Indeed, that's a nice catch.
The line:
$doc->addStyleSheet($base.'/media/com_hikashop/css/notify-metro.css');
in the file plugins/hikashop/cartnotify/cartnotify.php should be removed. It serves no purpose there. It's just a wrong copy/paste.
Remove it and it should still all work the same while not having the file loaded twice.
We'll make that change on our end for the next version of HikaShop.
Thanks !

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

  • Posts: 152
  • Thank you received: 11
10 months 1 week ago #351860

Is it possible to create plugin overrides?

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

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
10 months 1 week ago #351863

No. There is no such mechanism in Joomla. If you want to modify the code of a plugin in a way that won't be overwritten during updates of the plugin, the only solution is to make a copy of the plugin and change the name of the plugin. Then, you can disable the one provided by the developer, and use instead your copy, which won't be updated in the future.

However, this does not apply here. You can directly modify the file since we'll add the change on our end for the next version of HikaShop. So no need for an override.
And if you don't know how to do the change, you can just wait for the update of HikaShop, which will include the change. It will be out in June.

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

Time to create page: 0.067 seconds
Powered by Kunena Forum