View Single Post
  #14  
Old 11-21-2011, 08:58 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Colorbox in 4.4.4

Quote:
Originally Posted by cflsystems
You said calling

<link rel="stylesheet" type="text/css" href="{$SkinDir}/lib/colorbox/colorbox.css" />
<script type="text/javascript" src="{$SkinDir}/lib/colorbox/jquery.colorbox-min.js"></script>

will still not load it if js/css tool is on? This doesn't sound right. It should load just fine - these are direct calls and have nothing to do with cache. Have you tried putting it in home.tpl just before </head> and no ifs. Look in the sourse code if it's loaded, no matter if it works or not.
By the way if you are calling it from product_details.tpl there is no need for the if statement - that IS $main = product

Correct. NOT in 4.4.4 with "Use speed-up tool for Javascript" enabled.

Looks like there a some differences in how to call js in version 4.4

http://help.qtmsoft.com/index.php?title=X-Cart:CSS_and_JavaScript_optimization

Look at my followup on bugtracker:

https://bugtracker.qtmsoft.com/view.php?id=40610

SO -- for anyone reading, MY SOLUTION was to make a .js file for the <script> and not use inline <script> calls from templates - even with {literal} tags.

I placed my script link into common_files/customer/service_js.tpl
and it works with the speedup tool enabled.

HOWEVER - this is a script for the ENTIRE site.

This is not a solution for page-specific inline scripting.

I think there is more to learn about the new js implementation in version 4.4.4 -- I look forward to discovering it as needed...

But for now, my solution is to make js files and call them the same as other js files in common_files/customer/service_js.tpl

Anyone doing extensive work with 4.4.4 ? Let's share what we know about using js, since it's NOT the same as 4.3 and earlier.

Thx
J
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote