<?php

/* mart/template/extension/total/coupon.twig */
class __TwigTemplate_389b8084ed44971ee453404e1abea5b8da94ef0fcfbc43ed6fe0502991417a44 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        echo "<div class=\"panel panel-default\">
  <div class=\"panel-heading\">
    <h4 class=\"panel-title\"><a href=\"#collapse-coupon\" class=\"accordion-toggle\" data-toggle=\"collapse\" data-parent=\"#accordion\">";
        // line 3
        echo (isset($context["heading_title"]) ? $context["heading_title"] : null);
        echo " <i class=\"fa fa-caret-down\"></i></a></h4>
  </div>
  <div id=\"collapse-coupon\" class=\"panel-collapse collapse\">
    <div class=\"panel-body\">
      <label class=\"control-label\" for=\"input-coupon\">";
        // line 7
        echo (isset($context["entry_coupon"]) ? $context["entry_coupon"] : null);
        echo "</label>
      <div class=\"input-group\">
        <input type=\"text\" name=\"coupon\" value=\"";
        // line 9
        echo (isset($context["coupon"]) ? $context["coupon"] : null);
        echo "\" placeholder=\"";
        echo (isset($context["entry_coupon"]) ? $context["entry_coupon"] : null);
        echo "\" id=\"input-coupon\" class=\"form-control\" />
        <span class=\"input-group-btn\">
          <input type=\"button\" value=\"";
        // line 11
        echo (isset($context["button_coupon"]) ? $context["button_coupon"] : null);
        echo "\" id=\"button-coupon\" data-loading-text=\"";
        echo (isset($context["text_loading"]) ? $context["text_loading"] : null);
        echo "\" class=\"btn btn-form\" />
        </span>
      </div>
<script type=\"text/javascript\"><!--
\$('#button-coupon').on('click', function() {
\t\$.ajax({
\t\turl: 'index.php?route=extension/total/coupon/coupon',
\t\ttype: 'post',
\t\tdata: 'coupon=' + encodeURIComponent(\$('input[name=\\'coupon\\']').val()),
\t\tdataType: 'json',
\t\tbeforeSend: function() {
\t\t\t\$('#button-coupon').button('loading');
\t\t},
\t\tcomplete: function() {
\t\t\t\$('#button-coupon').button('reset');
\t\t},
\t\tsuccess: function(json) {
\t\t\t\$('.alert').remove();

\t\t\tif (json['error']) {
\t\t\t  notify(json.error, 'error');
\t\t\t}

\t\t\tif (json['redirect']) {
\t\t\t\tlocation = json['redirect'];
\t\t\t}
\t\t}
\t});
});
//--></script>
    </div>
  </div>
</div>
";
    }

    public function getTemplateName()
    {
        return "mart/template/extension/total/coupon.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  42 => 11,  35 => 9,  30 => 7,  23 => 3,  19 => 1,);
    }
}
/* <div class="panel panel-default">*/
/*   <div class="panel-heading">*/
/*     <h4 class="panel-title"><a href="#collapse-coupon" class="accordion-toggle" data-toggle="collapse" data-parent="#accordion">{{ heading_title }} <i class="fa fa-caret-down"></i></a></h4>*/
/*   </div>*/
/*   <div id="collapse-coupon" class="panel-collapse collapse">*/
/*     <div class="panel-body">*/
/*       <label class="control-label" for="input-coupon">{{ entry_coupon }}</label>*/
/*       <div class="input-group">*/
/*         <input type="text" name="coupon" value="{{ coupon }}" placeholder="{{ entry_coupon }}" id="input-coupon" class="form-control" />*/
/*         <span class="input-group-btn">*/
/*           <input type="button" value="{{ button_coupon }}" id="button-coupon" data-loading-text="{{ text_loading }}" class="btn btn-form" />*/
/*         </span>*/
/*       </div>*/
/* <script type="text/javascript"><!--*/
/* $('#button-coupon').on('click', function() {*/
/* 	$.ajax({*/
/* 		url: 'index.php?route=extension/total/coupon/coupon',*/
/* 		type: 'post',*/
/* 		data: 'coupon=' + encodeURIComponent($('input[name=\'coupon\']').val()),*/
/* 		dataType: 'json',*/
/* 		beforeSend: function() {*/
/* 			$('#button-coupon').button('loading');*/
/* 		},*/
/* 		complete: function() {*/
/* 			$('#button-coupon').button('reset');*/
/* 		},*/
/* 		success: function(json) {*/
/* 			$('.alert').remove();*/
/* */
/* 			if (json['error']) {*/
/* 			  notify(json.error, 'error');*/
/* 			}*/
/* */
/* 			if (json['redirect']) {*/
/* 				location = json['redirect'];*/
/* 			}*/
/* 		}*/
/* 	});*/
/* });*/
/* //--></script>*/
/*     </div>*/
/*   </div>*/
/* </div>*/
/* */
