X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Custom JS not loading (https://forum.x-cart.com/showthread.php?t=78681)

Ed B. 01-05-2025 08:09 AM

Custom JS not loading
 
Hi, we have X-Cart 5.4.1.49 with Theme tweaker 4.5. I followed https://developer.x-cart.com/5.4/design_changes/adding_custom_javascript_code_to_the_page#custom-js-code-for-every-page
but the script I put in the custom JS code area (admin panel -> Look and feel -> Custom CSS and Custom JS -> Custom JS) doesn't show in the store. What did I do wrong here?

pauldodman 01-13-2025 02:42 AM

Re: Custom JS not loading
 
Did you try rebuilding the store/cache?

Ed B. 01-25-2025 02:21 AM

Re: Custom JS not loading
 
Quote:

Originally Posted by pauldodman
Did you try rebuilding the store/cache?





Yes, it still doesn't load.


On the other hand, if I create a twig template under themetweaker, it loads.


However, it turned out that my JS code wouldn't run in line anyway, so I needed to use the method getJSfile in a view class.


But, if there is admin page for adding custom java script code, the java script added via the page should load...


All times are GMT -8. The time now is 10:39 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.