Posts o[cscart] using smarty block allows us to add custom javascript snippet into tpls
Post
Cancel

o[cscart] using smarty block allows us to add custom javascript snippet into tpls

source - http://www.webdesignerforum.co.uk/

tested on CSCART v4.3

go to Design > Layouts snap551

go to a group and add block snap552

on modal appear choose the type HTML/Smarty snap553

on content use the smarty tag {literal}**. Using this tag the CSCART doesnt put CDATA in front script…. example :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
//test
{literal}

  $(function() {
     function test(){
          alert("this is a test which allows javascript on a block!");
     }
  })

{/literal}

<div>
     pipiscrew - cscart v4.3 - test
</div>

ofc you MUST clear the cache via » Administration > Storage and choose the Clear Cache

CS-Cart tuts: How to change copyright.tpl with “My Changes” addon

https://www.youtube.com/watch?v=cMA_Ji-0URI

CS-Cart API Class

https://github.com/drahosistvan/cscartapi - reference</strong>

origin - http://www.pipiscrew.com/?p=2975 cscart-use-smarty-block-allows-us-to-add-custom-javascript-snippet-into-tpls

This post is licensed under CC BY 4.0 by the author.
Contents

Trending Tags