js and css hikashop loaded on all pages
- pulsarinformatique
-
Topic Author
- Offline
-- Joomla version -- : 2.5.14
-- PHP version -- : 5.4.3
Hi,
I saw that hikashop css and js were loaded on all pages of the site, wich is really bad, because I use it only certain pages, and I don't want my performances be slower because of scripts and css needed on other pages. There's no reason these scripts are loaded on all pages.
So I tried to clean that, but the problem is these scripts are called in the file:
administrator/components/com_hikashophelperes/helper.php line 2583
and I cant' succeed in restricting the load of the files to hikashop pages.
Would you know how to do that? I have already many scripts on my all pages, I really need to get rid of what is uselesss.
in advance thanks for your answer
Raphaelle
Please Log in or Create an account to join the conversation.
If the cart is display on all pages, the CSS and the JS would be useful.
If you have a HikaShop system plugin which load HikaShop on every pages, it could insert the JS and CSS too.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
- pulsarinformatique
-
Topic Author
- Offline
for all other cases it's not only useless, it's nocive for the website's speed.If the cart is display on all pages, If you have a HikaShop system plugin which load HikaShop on every pages
In my case for example Hikashop is used only on Hikashop pages, wich represents 20% of my site. So I can't afford to make heavier 80% pages of my site uselessly. I really need to know please how I can remove these scripts from my other pages please?
or saying other: how can I load these scripts only when they're needed?
in advance thanks for your answer
Raphaelle
Please Log in or Create an account to join the conversation.
To find out which ones you can enable, disable all of the enabled system plugins, and reenable them one by one and check the frontend page each time you enable a HikaShop system plugin.
Please Log in or Create an account to join the conversation.
- pulsarinformatique
-
Topic Author
- Offline
when I deactivate the hikashop menu items from this menu, my js and css aren't loaded any more... but I can't access anymore to my hikashop pages! :S
It really looks like a bug, please could you fix it?
in advance thanks for your answer!
Raphaelle
Please Log in or Create an account to join the conversation.
If you don't want the js/CSS files and still want the SEF turned on on your website, renaming the file components/com_hikashop/router.php so that the HikaShop SEF URLs are not optimized anymore by HikaShop and you will see that you don't get the js/CSS files anymore in such cases.
Please Log in or Create an account to join the conversation.
- pulsarinformatique
-
Topic Author
- Offline
can't you unlink the call to js and css to the sef router please?
Please Log in or Create an account to join the conversation.
The only way is for you to remove all the piece of code there which uses parameters of the configuration and it will then work without taking them into account, and without loading the helper of Hikashop. Thr drawback is that the URLs will probably not be like you want and that it's not that easy to change the router for that, and we definitely can't do that by default in HikaShop.
Please Log in or Create an account to join the conversation.
- Posts: 78
- Thank you received: 5
Please Log in or Create an account to join the conversation.
If you display an HikaShop module like the HikaShop cart, a product listing (feature products), the currency switcher or any other Hikashop module, these module could require the HikaShop JS and HikaShop CSS files.
If no HikaShop module and no HikaShop system plugin are published, there is no reason for HikaShop to be loaded and to include is JS & CSS files because HikaShop helper won't be loaded.
More than that, the inclusion of a JS and CSS file will not slow down your server.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
- Posts: 78
- Thank you received: 5
Please Log in or Create an account to join the conversation.
For example, the Affiliate plugin does because it needs to load the parameters of the configuration in order to know if it needs to run or not. But if you don't need an affiliate system on your website, you could disable the plugin since it is to one use to you.
The massaction plugin can also be disabled if you don't use any mass action.
etc
Note that the HikaShop user synchronization plugin should be kept published but it won't load the library unless he has to do some work (like after a user is created or modified).
Please Log in or Create an account to join the conversation.