Jump to content

Smarty problem when adding jQuery to .tpl


Recommended Posts

I have an external standalone script that uses HTML, CSS and jQuery. 

The script is a complete "T-shirt designer tool". It lets me to create a custom design and then save this to .pdf or .jpg. I would like to attatch this .jpg or .pdf to the product later on.


I want to implement this on one product.


Since I would only use it on one product I have changed following in ProductController.php


if (Tools::getValue('id_product')==8){


} else {




But when i add the jQuery Script in the .designa.tpl i an smarty error:


Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/www/webvol15/lo/an6dxwaf31q62mk/demo.grafikfabriken.nu/public_html/themes/default/example/designa.tpl" on line 443 "customTextParamters: {colors: false, removable: true, resizable: true, draggable: true, rotatable: true, autoCenter: true, boundingBox: "Base"}," - Unexpected ": ", expected one of: "}" , " " , ATTR' in /www/webvol15/lo/an6dxwaf31q62mk/demo.grafikfabriken.nu/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:667 Stack trace: #0 /www/webvol15/lo/an6dxwaf31q62mk/demo.grafikfabriken.nu/public_html/tools/smarty/sysplugins/smarty_internal_templateparser.php(3144): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 /www/webvol15/lo/an6dxwaf31q62mk/demo.grafikfabriken.nu/public_html/tools/smarty/sysplugins/smarty_internal_templateparser.php(3209): Smarty_Internal_Templateparser->yy_syntax_error(2, ': ') #2 /www/webvo in /www/webvol15/lo/an6dxwaf31q62mk/demo.grafikfabriken.nu/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 667


Does anyone have an idea how I can get the scripts.php showing up under the product text in designa.tpl file?


Link to comment
Share on other sites

I did get the script on the page using Nishith sulotion! - THX m8!



The .tpl i'm using for this product is located in my themes dir. (   public_html/themes/default/designa.tpl  )

But i have to put the designer tools .js and css content is in my root dir otherwise it will not show. (    public_html/   )


I think that is why the .js script don't show the designer tool.


How can i get everything to operate and work in the same category?
Edited by mbp (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...