Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Custom JS not loading

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 01-05-2025, 08:09 AM
 
Ed B. Ed B. is offline
 

X-Adept
  
Join Date: Apr 2016
Posts: 459
 

Default 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?
__________________
X-cart 5.2.12, php 5.6
Ed from Grenoble, France
Reply With Quote
  #2  
Old 01-13-2025, 02:42 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default Re: Custom JS not loading

Did you try rebuilding the store/cache?
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #3  
Old 01-25-2025, 02:21 AM
 
Ed B. Ed B. is offline
 

X-Adept
  
Join Date: Apr 2016
Posts: 459
 

Default 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...
__________________
X-cart 5.2.12, php 5.6
Ed from Grenoble, France
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:50 AM.

   

 
X-Cart forums © 2001-2020