Hi everyone. Looking for a quick reply as helping out a new client using CMSMS and I have never used before.
They are wanting to add their Shopify products to a page within their CMSMS developed site.
I have created a new page, disabled the WYSIWYG editor and pasted the code generated by Shopify for their "Buy Button" that allows placement of products on any site or blog. All I get is a page of errors like below.
Can anyone steer me in the right direction to get this working please?
-----
string(120) "Smarty error: [in content:content_en line 5]: syntax error: unrecognized tag 'var' (Smarty_Compiler.class.php, line 590)" string(129) "Smarty error: [in content:content_en line 8]: syntax error: unrecognized tag: loadScript(); (Smarty_Compiler.class.php, line 446)" string(117) "Smarty error: [in content:content_en line 8]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(129) "Smarty error: [in content:content_en line 9]: syntax error: unrecognized tag: loadScript(); (Smarty_Compiler.class.php, line 446)" string(117) "Smarty error: [in content:content_en line 9]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(121) "Smarty error: [in content:content_en line 11]: syntax error: unrecognized tag 'var' (Smarty_Compiler.class.php, line 590)" string(121) "Smarty error: [in content:content_en line 17]: syntax error: unrecognized tag 'var' (Smarty_Compiler.class.php, line 590)" string(530) "Smarty error: [in content:content_en line 22]: syntax error: unrecognized tag: ui.createComponent('product', { id: [509534208058], node: document.getElementById('product-component-115228cb691'), moneyFormat: '%24%7B%7Bamount%7D%7D', options: { "product": { "variantId": "all", "contents": { "imgWithCarousel": false, "variantTitle": false, "description": false, "buttonWithQuantity": false, "quantity": false (Smarty_Compiler.class.php, line 446)" string(118) "Smarty error: [in content:content_en line 22]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(267) "Smarty error: [in content:content_en line 35]: syntax error: unrecognized tag: "product": { "@media (min-width: 601px)": { "max-width": "100%", "margin-left": "0", "margin-bottom": "50px" (Smarty_Compiler.class.php, line 446)" string(118) "Smarty error: [in content:content_en line 35]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(136) "Smarty error: [in content:content_en line 41]: syntax error: unrecognized tag: "font-size": "12px" (Smarty_Compiler.class.php, line 446)" string(118) "Smarty error: [in content:content_en line 41]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(152) "Smarty error: [in content:content_en line 44]: syntax error: unrecognized tag: "contents": { "button": true (Smarty_Compiler.class.php, line 446)" string(118) "Smarty error: [in content:content_en line 44]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(167) "Smarty error: [in content:content_en line 46]: syntax error: unrecognized tag: "footer": { "background-color": "#ffffff" (Smarty_Compiler.class.php, line 446)" string(118) "Smarty error: [in content:content_en line 46]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(297) "Smarty error: [in content:content_en line 50]: syntax error: unrecognized tag: "contents": { "img": false, "imgWithCarousel": true, "variantTitle": false, "buttonWithQuantity": true, "button": false, "quantity": false (Smarty_Compiler.class.php, line 446)" string(118) "Smarty error: [in content:content_en line 50]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(268) "Smarty error: [in content:content_en line 57]: syntax error: unrecognized tag: "product": { "@media (min-width: 601px)": { "max-width": "100%", "margin-left": "0px", "margin-bottom": "0px" (Smarty_Compiler.class.php, line 446)" string(118) "Smarty error: [in content:content_en line 57]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(223) "Smarty error: [in content:content_en line 65]: syntax error: unrecognized tag: "styles": { "products": { "@media (min-width: 601px)": { "margin-left": "-20px" (Smarty_Compiler.class.php, line 446)" string(118) "Smarty error: [in content:content_en line 65]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"
------
Adding Javascript code to Page Content
-
- New Member
- Posts: 1
- Joined: Tue Feb 20, 2018 4:20 am
Re: Adding Javascript code to Page Content
Make sure that all curly brackets { } have a space before and after them. Else the Smarty engine used in CMS Made Simple will try to interpret it as tag which doesn't exist.
so for example: should be
so for example:
Code: Select all
function() {var foo=bar;}
Code: Select all
function() { var foo=bar; }
Re: Adding Javascript code to Page Content
Or wrap the code within {literal} {/literal}
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -