<?xml version="1.0" encoding="UTF-8"?>
<modification>
    <id>Simple Cookie Alert - bottom</id>
    <vqmver>1</vqmver>
    <vqmver>2.X</vqmver>
    <author>arveo (ARST)</author>
	<file name="catalog/view/theme/*/template/common/footer.tpl">
        <operation>
            <search position="after" error="skip"><![CDATA[div class="container">]]></search>
            <add><![CDATA[  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">]]></add>
	    </operation>    
        <operation>
            <search position="before" error="skip"><![CDATA[</footer>]]></search>
            <add><![CDATA[
              <!-- Begin Cookie  plugin -->			 
			<script type="text/javascript">//UNCOMMENT LINE IN PRODUCTION REMOVE 'EN'  this is result: var pageLang = document.documentElement.lang.toLowerCase(); 
var pageLang = 'lang'//document.documentElement.lang.toLowerCase(); 
//SETTINGS START
var langTranslate = {
   'lang' : [
      '<?php echo $entry_cookie_msg; ?>',
      '<?php echo $entry_cookie_more; ?>',
      '<?php echo $entry_cookie_accept; ?>',
      '<?php echo $entry_cookie_link; ?>'
    ], 
}
document.addEventListener("click", function (e) {   
    if (e.target.tagName == "A" && !e.target.hasAttribute("target")) {
        e.target.setAttribute("target", "_blank");
    }
})
//SETTINGS END
var cookieStyle = [
    {
      ID:'cookie-bar',
      SHORT_TEXT_PRIVACY_DESCRIPTION:langTranslate[pageLang][0],
      STYLE:'bottom:0px;left:0px;background:rgba(38, 191, 203, 0.76);padding:20px;width:100%;position:fixed;z-index:10000;box-sizing:border-box;-webkit-box-shadow: 0px 3px 12px 0px rgba(50, 50, 50, 0.75);-moz-box-shadow:0px 3px 12px 0px rgba(50, 50, 50, 0.75);box-shadow:0px 3px 12px 0px rgba(50, 50, 50, 0.75);'
    },
     {
      ID:'cookie-button',
      LINK:langTranslate[pageLang][3],
      TEXT:langTranslate[pageLang][1],
      HOVER:'rgb(236, 236, 236)',
      STYLE:'text-decoration:none;padding:3px 10px; background:rgb(11, 122, 155);border-radius: 2px 2px 2px 2px;-moz-border-radius: 2px 2px 2px 2px;-webkit-border-radius: 2px 2px 2px 2px;float:right;cursor:pointer;color:#FFF;margin-right:10px;'
     },
    {
      ID:'cookie-ok-button',
      TEXT:langTranslate[pageLang][2],
      STYLE:'padding:3px 10px; background:rgb(255, 96, 13);border-radius: 2px 2px 2px 2px;-moz-border-radius: 2px 2px 2px 2px;-webkit-border-radius: 2px 2px 2px 2px;float:right;cursor:pointer;color:#fff;'
    }
  ],data = cookieStyle;

function initBar(){var t=document.createElement("div")
t.id=data[0].ID,t.innerHTML="<style>#"+data[1].ID+" :hover{ background-color:"+data[1].HOVER+"!important; float:left; text-decoration:underline;}#"+data[0].ID+" p{color:#fff;float:left; padding:0px; margin:0px;}</style><p>"+data[0].SHORT_TEXT_PRIVACY_DESCRIPTION+'</p><a onclick="setCookieBar()" href="javascript:void(0);" style="'+data[2].STYLE+'" id="'+data[2].ID+'">'+data[2].TEXT+'</a><a style="'+data[1].STYLE+'" id="'+data[1].ID+'" href="'+data[1].LINK+'">'+data[1].TEXT+"</a>",t.setAttribute("style",data[0].STYLE),document.getElementsByTagName("body")[0].appendChild(t)}function checkCookieBar(){var t=getCookie("privacy_policy_confirmation")
""!=t||initBar()}function setCookieBar(){var t=new Date
t.setTime(t.getTime()+31536e6),document.cookie="privacy_policy_confirmation=1; expires="+t.toGMTString()+"; path=/";document.getElementById(data[0].ID).remove();}function getCookie(t){for(var e=t+"=",a=document.cookie.split(";"),o=0;o<a.length;o++){for(var i=a[o];" "==i.charAt(0);)i=i.substring(1)
if(0==i.indexOf(e))return i.substring(e.length,i.length)}return""}window.onload=checkCookieBar();
</script><style>body{
  margin:0px;
}</style>

<!-- End Cookie plugin -->
                </div>
             </div>
            ]]></add>
	    </operation>
    </file>
	<file name="catalog/language/english/common/footer.php">
        <operation>
            <search position="before" error="skip"><![CDATA[$_['text_newsletter']]]></search>
            <add><![CDATA[
			//Cookie
			$_['entry_cookie_link']            = 'https://en.wikipedia.org/wiki/HTTP_cookie';
			 $_['entry_cookie_more']           = 'Further information';
             $_['entry_cookie_accept']         = 'Ok!';
			 $_['entry_cookie_msg']            = '<span style="font-size: 22px; "><i class="fa fa-exclamation-triangle" style="color: #FF5D5D"></i></span> <span style="font-size: 16px; ">This website uses cookies in order to provide you a better web experience. By continuing navigation in this website your approval of the use of cookies is implicit.</span>';
            ]]></add>
	    </operation>
		</file>
<file name="catalog/language/hungarian/common/footer.php">
        <operation>
            <search position="before" error="skip"><![CDATA[$_['text_newsletter']]]></search>
            <add><![CDATA[
			//Cookie
			$_['entry_cookie_link']            = 'https://hu.wikipedia.org/wiki/HTTP-s%C3%BCti';
			 $_['entry_cookie_more']           = 'Bövebben';
             $_['entry_cookie_accept']         = 'Rendben!';
			 $_['entry_cookie_msg']            = '<span style="font-size: 22px; "><i class="fa fa-hand-o-right" style="color: #FF5D5D"></i></span> <span style="font-size: 16px; "> Ez az oldal cookie-kat használ a felhasználói élmény fokozására. A folytatáshoz el kell fogadnia ezt:</span> ';
            ]]></add>
	    </operation>
		</file>		
	<file name="catalog/language/italian/common/footer.php">
        <operation>
            <search position="before" error="skip"><![CDATA[$_['text_newsletter']]]></search>
            <add><![CDATA[
			//Cookie
			$_['entry_cookie_link']            = 'https://it.wikipedia.org/wiki/Cookie';
			 $_['entry_cookie_more']           = 'Approfondisci qui';
             $_['entry_cookie_accept']         = 'Ok!';
			 $_['entry_cookie_msg']            = '<span style="font-size: 22px;"><i class="fa fa-flag-o" style="color: #FF5D5D"></i></span><span style="font-size: 16px; ">  Questo sito utilizza solo cookie tecnici. Per maggiori informazioni leggi quì. Clicca su OK per non visualizzare piu questa scritta...</span> ';
            ]]></add>
	    </operation>		
		</file>		
		<file name="catalog/language/russian/common/footer.php">
        <operation>
            <search position="before" error="skip"><![CDATA[$_['text_newsletter']]]></search>
            <add><![CDATA[
			//Cookie
			$_['entry_cookie_link']            = 'https://ru.wikipedia.org/wiki/HTTP_cookie';
			 $_['entry_cookie_more']           = 'подробнее';
             $_['entry_cookie_accept']         = 'Ok!';
			 $_['entry_cookie_msg']            = '<span style="font-size: 20px;"><i class="fa fa-exclamation-circle" style="color: #FF5D5D"></i></span>  <span style="font-size: 14px; ">Этот сайт использует cookie для того, чтобы тебе дать лучший сервис. Продолжая навигацию по сайту, ты принимаешь использование файлов cookie, с нашей стороны, нажимая. </span>';
            ]]></add>
	    </operation>		
		</file>		
<file name="catalog/controller/common/footer.php">
        <operation>
            <search position="after" error="skip"><![CDATA[$data['text_newsletter'] = $this->language->get('text_newsletter');]]></search>
            <add><![CDATA[
        $data['entry_cookie_link'] = $this->language->get('entry_cookie_link');
		$data['entry_cookie_more'] = $this->language->get('entry_cookie_more');
		$data['entry_cookie_accept'] = $this->language->get('entry_cookie_accept');
		$data['entry_cookie_msg'] = $this->language->get('entry_cookie_msg');		
		$data['config_cookie'] = $this->config->get('config_cookie');
		
            ]]></add>
	  </operation>	
	  
		</file>	
</modification>	