Skip to content

How to inject RecSys into chuyendohanquoc.vn

Duc Doan Hoang Minh edited this page Jun 20, 2015 · 2 revisions

chuyendohanquoc.vn information

chuyendohanquoc.vn is e-commerce site which is built by using Joomla

Admin Control Panel

Inject RecSys frontcode

Step 1:

Access Admin Control Panel

Step 2:

Access File Manager module

Step 3: Edit file layout for injecting RecSys script in entire website

  • File location: /chuyendohanquoc_sourcecode/templates/ja_larix/index.php
  • At line 20, after <script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl();?>/scripts/ja.script.js"></script>, append this code:
<script type="text/javascript">
    (function() {
        var rs = window.rs || (window.rs = {});
        if (!rs.loaded) {
            var rsScript = document.createElement('script');
            rsScript.async = true;
            rsScript.src = 'http://richanchor.com/rs-cdn/rs.js';
            var s = document.getElementsByTagName('script')[0];
            s.parentNode.insertBefore(rsScript, s);
            rs.loaded = true;
        }
    })();
</script>
  • Save this file

Step 4: Add RecSys template in right sidebar

  • File location: /chuyendohanquoc_sourcecode/templates/ja_larix/index.php
  • At line 137, after this code <jdoc:include type="modules" name="right" style="rounded" />, append this code:
<div data-rs>
    <script type="text/template">
    	<div>
    		<h3>SẢN PHẨM LIÊN QUAN</h3>
    	</div>
    	<div data-rs-list>
	    	<div style="padding: 3px 3px 5px 3px;	vertical-align: top;	border: 1px solid #e1e0e0;	max-width: 215px;	margin-right: 10px;	margin-bottom: 10px;	border-radius: 5px;">
	    		<a href="{{url}}" style="font-size: 13px; font-weight: bold;">{{title}}</a>
	    		<p>{{meta}}</p>
	    	</div>
    	</div>
    </script>
</div>
  • Save this file