• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Adding Javascript code to Page Content
PostPosted: Tue Feb 20, 2018 4:42 am 
Offline
New Member
New Member

Joined: Tue Feb 20, 2018 4:20 am
Posts: 1
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)"
------


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Adding Javascript code to Page Content
PostPosted: Tue Feb 20, 2018 3:05 pm 
Offline
Dev Team Member
Dev Team Member

Joined: Mon Nov 28, 2011 9:29 am
Posts: 2975
Location: The Netherlands
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:
Code:
function() {var foo=bar;}
should be
Code:
function() { var foo=bar; }


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Adding Javascript code to Page Content
PostPosted: Tue Feb 20, 2018 3:33 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 7500
Location: The Netherlands
Or wrap the code within {literal} {/literal}

_________________
Image

Did my post help you solving a problem at your (customers) website and it saved you many hours of work? Great!! Consider buying me a cup of coffee in return! [ Click here ]



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: googlebot


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
HostPapa CMS Made Simple hosting