View Single Post
  #6  
Old 06-01-2012, 01:19 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Flexslider X-Cart 4.4.5 Intergration

Quote:
Originally Posted by gb2world
Also check that anywhere you have added javascript to a template (.tpl file), that you enclose it within {literal} {/literal}
That is probably what is wrong now.

This bit:
PHP Code:
<script type="text/javascript" charset="utf-8">
  $(
window).load(function() {
    $(
'.flexslider').flexslider();
  });
< /
script
Should be:
PHP Code:
<script type="text/javascript" charset="utf-8">
  {
literal}
$(
window).load(function() {
    $(
'.flexslider').flexslider();
  });
{/
literal}
< /
script
The problem is that Smarty uses those same delimiters { and }, see those in the JavaScript?

Another way to escape those is to use {$ldelim} for "{" and {$rdelim} for "}".
Like this:
PHP Code:
<script type="text/javascript" charset="utf-8">
  $(
window).load(function() {$ldelim}
    $(
'.flexslider').flexslider();
{
$rdelim});
< /
script
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote