mbp Posted January 26, 2014 Share Posted January 26, 2014 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){ $this->setTemplate(_PS_THEME_DIR_.'/example/designa.tpl'); } else { $this->setTemplate(_PS_THEME_DIR_.'product.tpl'); } 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 More sharing options...
El Patron Posted January 26, 2014 Share Posted January 26, 2014 you appear to have a syntax error with your new template at on line 443 Link to comment Share on other sites More sharing options...
mbp Posted January 26, 2014 Author Share Posted January 26, 2014 you appear to have a syntax error with your new template at on line 443 Thats is the line 3 in the jquery script i'm trying do add. The script works fine when its on a single php page? Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted January 28, 2014 Share Posted January 28, 2014 try this... {literal} <script type="text/javascript"> <!-- //your script here... } // --> </script> {/literal} 1 Link to comment Share on other sites More sharing options...
vekia Posted January 28, 2014 Share Posted January 28, 2014 can you show full code that you added please? Link to comment Share on other sites More sharing options...
mbp Posted January 28, 2014 Author Share Posted January 28, 2014 (edited) 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 March 26, 2014 by mbp (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now