 <div class="offcanvas-overlay"></div>

    <div class="page-title-section section" data-bg-image="assets/images/bg/page-title-1.webp">
        <div class="container">
            <div class="row">
                <div class="col">

                    <div class="page-title">
                        <h1 class="title">Seller Registration</h1>
                        <ul class="breadcrumb">
                            <li class="breadcrumb-item"><a href="<?php echo base_url(); ?>">Home</a></li>
                            <li class="breadcrumb-item active">Seller Registration</li>
                        </ul>
                    </div>

                </div>
            </div>
        </div>
    </div>


    <div class="section section-padding">
        <div class="container">
            <div class="row">
                <div class="col-lg-5 col-12">
                    <div class="slImgD">
                        <img src="https://gaineronline.com/assets/images/register-now.jpg" class="img-fluid">
                    </div>
                </div>
                <div class="col-lg-7 col-12">
                    <div class="contact-form">
                        <p>Start your business with Gainer customers in India</p>
                         <div class="alert alert-success SuccMsg" style="display: none;">
                            <strong>Successfully Registered!</strong>
                          </div>
                          <div class="alert alert-danger WorningMsg" style="display: none;">
                            <strong>This Email ID Already Exists!</strong>
                          </div>
                        <form action="#" id="seller_register_form" method="post">
                            <div class="row learts-mb-n30">
                                <div class="col-md-12 col-12 learts-mb-30">
                                    <input type="text" placeholder="Saller Name *" name="s_name" required>
                                </div>
                                <div class="col-md-6 col-12 learts-mb-30">
                                    <input type="text" placeholder="Mobile No. *" name="s_mobile" required>
                                </div>
                                <div class="col-md-6 col-12 learts-mb-30">
                                    <input type="email"  placeholder="Email ID *" name="s_email" required>
                                </div>
                                <div class="form-group">



                                 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">



                                    <label>Country</label>



                                    <select required name="county" id="county" class="form-control">



                                       <option selected disabled value="">Select one</option>



                                       <?php 
                                       foreach ($countries as $key => $country_data) {
                                            ?>



                                       <option value="<?php echo $country_data['id']; ?>"  ><?php echo $country_data['country_name']; ?></option>



                                       <?php } ?>



                                    </select><br>



                                 </div>



                              </div>

                              <div class="state">
                                
                              </div>

                              <div class="city"></div>

                                <!-- <div class="col-md-6 col-12 learts-mb-30">
                                    <select name="county" required>
                                        <option value="">-Select Country-</option>
                                        <option>India</option>
                                        <option>Australia</option>
                                    </select>
                                </div>
                                <div class="col-md-6 col-12 learts-mb-30">
                                    <select name="state" required>
                                        <option value="">-Select State-</option>
                                        <option>West Bengal</option>
                                        <option>Maharastra</option>
                                    </select>
                                </div>
                                <div class="col-md-6 col-12 learts-mb-30">
                                    <select name="city" required>
                                        <option value="">-Select City-</option>
                                        <option>Kolkata</option>
                                        <option>Mumbai</option>
                                    </select>
                                </div> -->
                                <div class="col-md-12 col-12 learts-mb-30">
                                    <input type="text" placeholder="Pincode" name="pin" required>
                                </div>
                                <div class="col-md-12 col-12 learts-mb-30">
                                    <input type="text" placeholder="Your Address" name="address" required>
                                </div>
                                <div class="col-md-12 col-12 learts-mb-30">
                                    <input type="password" placeholder="Password" name="password" required>
                                </div>
                                <div class="col-12 learts-mb-30"><button class="btn btn-dark btn-outline-hover-dark" type="submit">Register Now</button></div>
                            </div>
                        </form>
                        <p class="form-messege"></p>
                    </div>
                </div>



                <!-- <div class="col-md-6 col-12 align-self-center learts-mt-50">
                    <div class="about-us3">
                        <h2 class="title">The happiness of <br> crafting artworks</h2>
                        <div class="desc">
                            <p>It’s all about the joy when finally you have done something beautiful on your own and observe it with quite a great deal of proud &amp; successful feeling.</p>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 col-12 align-self-center learts-mt-50">
                    <div class="about-us3">
                        <h2 class="title">The happiness of <br> crafting artworks</h2>
                        <div class="desc">
                            <p>It’s all about the joy when finally you have done something beautiful on your own and observe it with quite a great deal of proud &amp; successful feeling.</p>
                        </div>
                    </div>
                </div> -->


            </div>

        </div>
    </div>
     <!-- ////////////////////////////////////////////// Register ///////////////////////////// -->
<script>
jQuery.validator.setDefaults({
success: "valid"
});
$( "#seller_register_form" ).validate({
rules: {
r_email: {
     required: true,
     email: true
   },
r_password : {
        minlength : 5
    },
    confirm_password : {
        minlength : 5,
        equalTo : "#r_password"
    }
}
});
</script>

<script type="text/javascript">
    $(document).ready(function(e){
    $("#seller_register_form").on('submit', function(e){
        e.preventDefault();
        var formStatus = $('#seller_register_form').validate().form();
        if(true == formStatus){
        $.ajax({
            type: 'POST',
            url: '<?php echo base_url(); ?>seller/register_save/',
            data: new FormData(this),
            contentType: false,
            cache: false,
            processData:false,
            beforeSend: function(){
                $('.register_button').attr("disabled","disabled");
                $('#seller_register_form').css("opacity",".5");
            },
            success: function(msg){
               if(msg=='success'){
                $(".SuccMsg").show();
               $('.SuccMsg').delay(2000).hide(200);
               $('#loginID').empty().load(window.location.href + ' #loginID');
               $('#seller_register_form').css("opacity","");
               $(".register_button").removeAttr("disabled");
               setInterval(function(){ 
                location.reload();
                }, 2000);
               }
               else{
                $(".WorningMsg").show();
               $('.WorningMsg').delay(5000).hide(500);
               $('#seller_register_form').css("opacity","");
               $(".register_button").removeAttr("disabled");
               }
            }
        });
    }
    });
});
</script>

<script>

$( "#county" ).change(function() {

var county=$( "#county" ).val();

$.ajax({

          type: "POST",

          url: '<?php echo base_url(); ?>seller/get_state',

          data: {county : county }, 

          success: function(html) {

            $('.state').html(html);

            }

          });

});



function city_data()

{

   

    var state=$( "#state" ).val();

    

$.ajax({

          type: "POST",

          url: '<?php echo base_url(); ?>seller/get_city',

          data: {state : state }, 

          success: function(html) {

            $('.city').html(html);

            }

          });



}



      </script>      