Traceback (most recent call last):
  File "/home/tridotsuser/BooksGocommerce/apps/frappe/frappe/utils/jinja.py", line 79, in render_template
    return get_jenv().from_string(template).render(context)
  File "/home/tridotsuser/BooksGocommerce/env/lib/python3.5/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/home/tridotsuser/BooksGocommerce/env/lib/python3.5/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/tridotsuser/BooksGocommerce/env/lib/python3.5/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 1, in top-level template code
  File "/home/tridotsuser/BooksGocommerce/apps/cmswebsite/cmswebsite/./templates/Layout/customweb.html", line 77, in top-level template code
    {% block content %} {% endblock %}{% block page_content %} {% endblock %}
  File "<template>", line 27, in block "content"
  File "/home/tridotsuser/BooksGocommerce/env/lib/python3.5/site-packages/jinja2/sandbox.py", line 407, in getattr
    value = getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'product' is undefined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/tridotsuser/BooksGocommerce/apps/frappe/frappe/website/render.py", line 48, in render
    data = render_page_by_language(path)
  File "/home/tridotsuser/BooksGocommerce/apps/frappe/frappe/website/render.py", line 152, in render_page_by_language
    return render_page(path)
  File "/home/tridotsuser/BooksGocommerce/apps/frappe/frappe/website/render.py", line 168, in render_page
    return build(path)
  File "/home/tridotsuser/BooksGocommerce/apps/frappe/frappe/website/render.py", line 175, in build
    return build_page(path)
  File "/home/tridotsuser/BooksGocommerce/apps/frappe/frappe/website/render.py", line 191, in build_page
    html = frappe.render_template(context.source, context)
  File "/home/tridotsuser/BooksGocommerce/apps/frappe/frappe/utils/jinja.py", line 81, in render_template
    throw(title="Jinja Template Error", msg="<pre>{template}</pre><pre>{tb}</pre>".format(template=template, tb=get_traceback()))
  File "/home/tridotsuser/BooksGocommerce/apps/frappe/frappe/__init__.py", line 364, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red')
  File "/home/tridotsuser/BooksGocommerce/apps/frappe/frappe/__init__.py", line 350, in msgprint
    _raise_exception()
  File "/home/tridotsuser/BooksGocommerce/apps/frappe/frappe/__init__.py", line 316, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.ValidationError: <pre>{% extends "templates/Layout/customweb.html" %}
{% block loader %}
{% include "/templates/pages/defaultpageloader.html" %}
{% endblock %}
{% block meta_block %}
{% if MetaDescription %}<meta name="description" content="{{MetaDescription}}">{% endif %}
{% if MetaKeywords %}<meta name="keywords" content="{{MetaKeywords}}">{% endif %}
{% endblock %}
{% block content %}
<div class="title-breadcrumb">
    <div class="container-fluid">
        <div class="row">
            <div class="col-md-12 col-sm-12 col-xs-12">
                <ol class="breadcrumb">
                    <li><a href="/"> <i class="fa fa-home" aria-hidden="true"></i></a></li>
                    <li><a>Question About Product</a></li>
                </ol>
            </div>
        </div>
    </div>
</div>
<section id="enquiryForm">
    <div class="row">
            <div class=" col-md-8">
                <div class="page-body">
                <form>
                    <legend><a href="" id = "item-mob">{{product.item}}</a></legend>
                    <div class = "row">
                            <div class="alert alert-info" role="alert" id = "response">Thankyou for contacting us. Our Team will contact you soon!!!</div>                    
                    </div>
                    <div class="form-group">
                        <label class="col-form-label required" for="SenderEmail">Email <span class="mandatory">*</span></label>
                        <input class="form-control" data-val="true" data-val-email="Wrong email" data-val-required="Email is required." id="sender_email" name="SenderEmail" type="text" placeholder="Enter Your Email" value="">
                        <span class="field-validation-valid text-danger" id="youremail-error" data-valmsg-for="FriendEmail" data-valmsg-replace="true"><span  class="">Enter Valid Email</span></span>

                    </div>
                    <div class="form-group">
                        <label class="col-form-label" for="SenderName">Name <span class="mandatory">*</span></label>
                        <input class="form-control" id="sender_name" name="SenderName" type="text" value="" placeholder="Enter Your Name">
                        <span class="field-validation-valid text-danger" id="name-error" data-valmsg-for="FriendEmail" data-valmsg-replace="true"><span  class="">Enter Your Name</span></span>
                    </div>
                    <div class="form-group">
                        <label class="col-form-label" for="SenderPhone">Phone</label>
                        <input class="form-control" id="sender_phone" name="SenderPhone" type="number" value="" placeholder="Enter Your Phone Number">
                        <span class="field-validation-valid text-danger" data-valmsg-for="SenderPhone" data-valmsg-replace="true"></span>
                    </div>
                    <div class="form-group">
                        <label class="col-form-label required" for="Question">Question <span class="mandatory">*</span></label>
                        <textarea class="personal-message form-control" cols="20" data-val="true" data-val-required="Question is required" id="question" name="Question" rows="1">I have following questions concerning the product {{product.item}}:</textarea>
                        <span class="field-validation-valid text-danger" id="question-error" data-valmsg-for="FriendEmail" data-valmsg-replace="true"><span  class="">Enter your Question</span></span>
                    </div>
                    <div class="form-group row">
                        <div class="col form-control-plaintext">
                            <div class="form-check">
                                <input class="form-check-input" id="GdprConsent" name="GdprConsent" type="checkbox" checked="checked" value="true">
                                <input name="GdprConsent" type="hidden" value="false">
                                <label class="form-check-label" for="GdprConsent">
                                    Yes I've read the <a href="/privacy-policy">privacy policy</a> and agree that my data given by me can be stored electronically. My data will thereby only be used to process my inquiry.
                                </label>
                                <span class="field-validation-valid text-danger" id="checkbox-err" data-valmsg-for="FriendEmail" data-valmsg-replace="true"><span class="">Accept The Terms and Condition</span></span>
                            </div>

                            <span class="field-validation-valid" data-valmsg-for="GdprConsent" data-valmsg-replace="true"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <button type="button" name="send-email" class="btn primary send-email-a-friend-button" onclick="sendQuestion()">
                            <i class="fa fa-envelope"></i>
                            <span> SEND</span>
                        </button>
                    </div>
                </form>
                </div>
            </div>
<!-- <------------Recent Products------------- -->

<div class="col-md-4 hide123">
<div class="product1">
        <div class="headline" style="padding: 0px; margin: 0px;">
            <h2 style="font-size: 15px;">Recent products</h2>
        </div>
        <div class="row">
        {% for item in recent_products %}
           <!--  <div class="related-products"> -->
        <div class="item1">
        <div class="pad-5 right-item">                                  
        <div class="product-single-right" data-itemrate="150.0">
    <a href="/{{item.route}}" class="img-link"><img alt="#" class="img-responsive lazyloaded" src="{% if item.detail_thumbnail %}{{item.detail_thumbnail}}{% else %}/assets/cmswebsite/images/no-image-800x511.png{% endif %}"></a>
    <div class="itemTag"></div>
    <div class="rating">
    <div class="hot-wid-rating-right" data-item-name="parsely">
    <div class="hiding">
        <h4><a href="/{{item.route}}"> {{item.item}}</a>
        </h4>
    </div>
    <div class="product-wid-right-price clearfix">             
    <ins>Rs {{item.price}}</ins>
    <input type="hidden" id="hdnProductRate" value="74.25"> 
    </div>
    </div>
</div>
</div>
</div>
</div>
            <!--  </div> -->{% endfor %}
            </div>
        </div>
    </div>

   <!--  <----------End--------- -->

        </div>
    </section>
        
<style type="text/css">

    legend {
        display: block;
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin-bottom: 3.5rem;
        font-size: 2.5rem;
        line-height: inherit;
        color: inherit;
        white-space: normal;
    }
    .form-group {
        margin-bottom: 1rem;
    }
    label {
        display: inline-block;
        margin-bottom: .5rem;
    }
    .page-body{
        margin: 55px 30px;
    }
    legend{
    border-bottom: 0px;
}

    legend a{

        font-size: 30px;
    }
    .product1{
   padding: 15px 15px 0px 15px;
    background: #fff;
    margin: 55px 30px;
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
}
@media screen and (max-width: 992px) {
    .hide123{
        display: none;
    }
}
.hiding h4 a{ 
  height: 18px;
  width: 260px;
  overflow: hidden;
  position: relative;
  text-overflow: ellipsis;
  white-space: nowrap;
} 
.rating .hot-wid-rating-right{
    padding-left: 25px;
}
.item1 .right-item{
  padding: 10px 15px;
}
.rating .product-wid-right-price ins{
        color: #ff5500;
}
.item1 .product-single-right img {
  margin: 0 auto;
    float: none;
}
.item1 .product-single-right .img-link
{

    width: 55px;
    float: left;
    text-align: center;
    display: inline-block;
    border: 1px solid #ddd;
    padding: 2px;

}
.item1 .product-single-right h4 {
    font-size: 12px;
    margin-top: 0;
    }
    .rating .hot-wid-rating-right{
    padding-left: 15px;
}
    .mandatory{
        color: red;
    }
    .form-check-label a{
        color: #157702;
    }
    .send-email-a-friend-button{
        padding:10px 16px;
    }
    .form-check-label{
        font-weight: normal;
    }
    .form-control {
        display: block;
        width: 100%;
        padding: 2.625rem 1rem;
        font-size: 1.3rem;
        line-height: 1.5;
        color: #596167;
        background-color: #fff;
        background-clip: padding-box;
        border: 1px solid #ced4da;
        border-radius: .125rem;
        box-shadow: none;
        transition: none;
    }
    .text-danger {
        color: #f44336 !important;
        display: none;  
    }
    #response{
        display: none;
        margin-left: 15px;
        color: black;
    }
    input[type=number]::-webkit-inner-spin-button, 
    input[type=number]::-webkit-outer-spin-button { 
        -webkit-appearance: none;
        appearance: none;
        margin: 0; 
    }
    .form-control-plaintext {
        display: block;
        width: 100%;
        padding-top: .625rem;
        padding-bottom: .625rem;
        margin-bottom: 0;
        line-height: 1.5;
        background-color: transparent;
        border: solid transparent;
        border-width: 1px 0;
    }
    .form-check {
        position: relative;
        display: block;
        padding-left: 1.25rem;
    }
    #item-mob{
        line-height: normal;
    }
    #enquiryForm{
        overflow: hidden;
    }
</style>

<script type="text/javascript">
    function sendQuestion() {
        try{
        var formData = {};
        formData.sender_email = $('#sender_email').val();
        formData.sender_name = $('#sender_name').val();
        formData.sender_phone = $('#sender_phone').val();
        formData.question = $('#question').val();
        formData.product='{{product.name}}';
        $('#checkbox-err').hide();
        $('#youremail-error').hide();
        $('#name-error').hide();
        $('#question-error').hide();
        if (validate_fields(formData)) {
            $.ajax({
                type: 'POST',
                Accept: 'application/json',
                ContentType: 'application/json;charset=utf-8',
                url: window.location.origin + '/api/method/ecommerce_business_store.ecommerce_business_store.api.insert_questionaproduct',
                data: { 'data': JSON.stringify(formData) },
                dataType: "json",
                async: false,
                headers:{
                    'X-Frappe-CSRF-Token':'{{csrf_token}}'
                },
                success: function(data) {
                    if (data.message) {
                        $('#response').show();
                        $("html, body").animate({ scrollTop: 0 }, "slow");
                        setTimeout(function() {
                            $('#response').hide();
                        }, 3000)
                        $('input[type="text"], textarea').val('');
                        $('input[type="email"], textarea').val('');
                        $('input[type="number"], textarea').val('');
                    }
                }
            })

        }
    }
       catch(e){   
        var err = e.toString();
        frappe.call({
            method:'ecommerce_business_store.ecommerce_business_store.api.error_log',
            args:{
               'err':err,     
               'title':"cmswebsite.cmswebsite.templates.pages.questionaproduct.sendQuestion"          
           },
           callback:function(data){
           }
       })    
    }
    }
    function validate_fields(formData) {
        try{
        let allowsubmit=true;
        if(formData.sender_email==''){
            allowsubmit=false;
            $('#youremail-error').show();
            $("#sender_email").click(function() {
                $("#youremail-error").hide();
            });
        }
        else{
         if(!ValidateEmail(formData.sender_email)){
          allowsubmit=false;
          $('#youremail-error').show();
          $('#sender_email').keydown(function(){
              $('#youremail-error').hide();
          });
      }
  }
  if(formData.sender_name==''){
    allowsubmit=false;
    $('#name-error').show();
    $("#sender_name").click(function() {
        $("#name-error").hide();
    });
}
if(formData.question==''){
    allowsubmit=false;
    $('#question-error').show();
    $("#question").click(function() {
        $("#question-error").hide();
    });
}
if($('input[type=checkbox]:checked').val()==undefined){
    allowsubmit=false;
    $('#checkbox-err').show();
}
return allowsubmit;
}
catch(e){   
        var err = e.toString();
        frappe.call({
            method:'ecommerce_business_store.ecommerce_business_store.api.error_log',
            args:{
               'err':err,     
               'title':"cmswebsite.cmswebsite.templates.pages.questionaproduct.validate_fields"          
           },
           callback:function(data){
           }
       })    
    }
}
</script>
{% endblock %}</pre><pre>Traceback (most recent call last):
  File "/home/tridotsuser/BooksGocommerce/apps/frappe/frappe/utils/jinja.py", line 79, in render_template
    return get_jenv().from_string(template).render(context)
  File "/home/tridotsuser/BooksGocommerce/env/lib/python3.5/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/home/tridotsuser/BooksGocommerce/env/lib/python3.5/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/tridotsuser/BooksGocommerce/env/lib/python3.5/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 1, in top-level template code
  File "/home/tridotsuser/BooksGocommerce/apps/cmswebsite/cmswebsite/./templates/Layout/customweb.html", line 77, in top-level template code
    {% block content %} {% endblock %}{% block page_content %} {% endblock %}
  File "<template>", line 27, in block "content"
  File "/home/tridotsuser/BooksGocommerce/env/lib/python3.5/site-packages/jinja2/sandbox.py", line 407, in getattr
    value = getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'product' is undefined
</pre>