Üyelik için Anında Bilgi Doğrulama

mirac

OpenCart-TR
Katılım
7 Şub 2010
Mesajlar
1,383
Tepkime puanı
0
Puanları
36
Yaş
42
Konum
Beykoz____
Web sitesi
www.notebook-cantasi.com
Müşterilerin üyelik sayfasında üye olurken bilgilerin doğrumu yanlışmı olduğunu anında görmeleri için bir seçenek.. Daha detaylı bilgi için Tıklayınız..

Düzenlenecek dosyalar

-catalog/view/theme/KULLANDIĞINIZ TEMA/template/common/header.tpl
-catalog/view/theme/KULLANDIĞINIZ TEMA/template/account/create.tpl

Ekteki validate klasörünü \catalog\view\javascript klasörünün içine atınız..


catalog/view/theme/KULLANDIĞINIZ TEMA/template/common/header.tpl Aç..

Bul..
Kod:
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.3.2.min.js"></script>

Altına ekle..
Kod:
    <link rel="stylesheet" type="text/css" href="catalog/view/javascript/validate/validation.css" />
    <script type="text/javascript" src="catalog/view/javascript/validate/livevalidation_standalone.js"></script>

catalog/view/theme/KULLANDIĞINIZ TEMA/template/account/create.tpl Aç..

İçeriği değiştir..
Kod:
<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content">
  <div class="top">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center">
      <h1><?php echo $heading_title; ?></h1>
    </div>
  </div>
  <div class="middle">
    <?php if ($error_warning) { ?>
    <div class="warning"><?php echo $error_warning; ?></div>
    <?php } ?>
    <form action="<?php echo str_replace('&', '&', $action); ?>" method="post" enctype="multipart/form-data" id="create">
      <p><?php echo $text_account_already; ?></p>
      <b style="margin-bottom: 2px; display: block;"><?php echo $text_your_details; ?></b>
      <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;">
        <table>
          <tr>
            <td width="150"><span class="required">*</span> <?php echo $entry_firstname; ?></td>
                        
<td><input type="text" name="firstname" id=firstname value="<?php echo $firstname; ?>" />
<script type="text/javascript">
                  var firstname = new LiveValidation('firstname', { validMessage: "Ok!" });
                  firstname.add(Validate.Presence, { failureMessage: "Lütfen doldurunuz..!" });
                  firstname.add(Validate.Format, { failureMessage: 'Only alphanumeric characters!', pattern: new RegExp(/^\w+$/) });
                  firstname.add(Validate.Length, { minimum: 3, tooShortMessage: "En az 3 Karakter giriniz.." } );
                  firstname.add(Validate.Length, { maximum: 32, tooLongMessage: "En fazla 32 Karakter girebilirsiniz..!" } );
                  </script>
              <?php if ($error_firstname) { ?>
              <span class="error"><?php echo $error_firstname; ?></span>
              <?php } ?></td>
          </tr>
          <tr>
            <td><span class="required">*</span> <?php echo $entry_lastname; ?></td>
                        <td><input type="text" name="lastname" id=lastname value="<?php echo $lastname; ?>" />
              <script type="text/javascript">
                  var lastname = new LiveValidation('lastname', { validMessage: "Ok!" });
                  lastname.add(Validate.Presence, { failureMessage: "Lütfen doldurunuz..!" });
                  lastname.add(Validate.Format, { failureMessage: 'Only alphanumeric characters!', pattern: new RegExp(/^\w+$/) });
                  lastname.add(Validate.Length, { minimum: 3, tooShortMessage: "En az 3 Karakter giriniz.." } );
                  lastname.add(Validate.Length, { maximum: 32, tooLongMessage: "En fazla 32 Karakter girebilirsiniz..!" } );
                  </script>
              <?php if ($error_lastname) { ?>
              <span class="error"><?php echo $error_lastname; ?></span>
              <?php } ?></td>
          </tr>
          <tr>
            <td><span class="required">*</span> <?php echo $entry_email; ?></td>
                        <td><input type="text" name="email" id=email value="<?php echo $email; ?>" />
              <script type="text/javascript">
                  var email = new LiveValidation('email', { validMessage: "Ok!" });
                 email.add(Validate.Presence, { failureMessage: "Lütfen doldurunuz..!" });
                  email.add(Validate.Email, { failureMessage: "Geçersiz E-posta adresi!" } );</script>
              <?php if ($error_email) { ?>
              <span class="error"><?php echo $error_email; ?></span>
              <?php } ?></td>
          </tr>
          <tr>
            <td><span class="required">*</span> <?php echo $entry_telephone; ?></td>
                        <td><input type="text" name="telephone" id=telephone value="<?php echo $telephone; ?>" />
              <script type="text/javascript">
                     var telephone = new LiveValidation('telephone', { validMessage: "Ok!" });
                     telephone.add(Validate.Presence, { failureMessage: "Lütfen doldurunuz.." });
                     telephone.add(Validate.Numericality, { notANumberMessage: "Sadece rakam giriniz.." });
                     telephone.add(Validate.Length, { minimum: 3, tooShortMessage: "En az 3 Karakter giriniz.." } );
                    telephone.add(Validate.Length, { maximum: 20, tooLongMessage: "En Fazla 20 Karakter girebilirsiniz..!" } );
                     </script>
              <?php if ($error_telephone) { ?>
              <span class="error"><?php echo $error_telephone; ?></span>
              <?php } ?></td>
          </tr>
          <tr>
            <td><?php echo $entry_fax; ?></td>
                        <td><input type="text" name="fax" id=fax value="<?php echo $fax; ?>" />
            <script type="text/javascript">
                  var fax = new LiveValidation('fax', { validMessage: "OK!" });
            fax.add(Validate.Numericality, { notANumberMessage: "Sadece rakam giriniz.." });
            </script></td>
          </tr>
        </table>
      </div>
      <b style="margin-bottom: 2px; display: block;"><?php echo $text_your_address; ?></b>
      <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;">
        <table>
          <tr>
            <td width="150"><?php echo $entry_company; ?></td>
                        <td><input type="text" name="company" id=company value="<?php echo $company; ?>" />
            <script type="text/javascript">
                  var company = new LiveValidation('company', { validMessage: "Ok!" });
                  </script></td>
          </tr>
          <tr>
            <td><span class="required">*</span> <?php echo $entry_address_1; ?></td>
                        <td><input type="text" name="address_1" id=address_1 value="<?php echo $address_1; ?>" />
              <script type="text/javascript">
                     var address_1 = new LiveValidation('address_1', { validMessage: "OK!" });
                     address_1.add(Validate.Presence, { failureMessage: "Lütfen doldurunuz.." });
              address_1.add(Validate.Length, { minimum: 1, tooShortMessage: "En az 1 Karakter giriniz.." } );
                    address_1.add(Validate.Length, { maximum: 128, tooLongMessage: "En fazla 128 Karakter girebilirsiniz..!" } );
              </script>
              <?php if ($error_address_1) { ?>
              <span class="error"><?php echo $error_address_1; ?></span>
              <?php } ?></td>
          </tr>
          <tr>
            <td><?php echo $entry_address_2; ?></td>
                        <td><input type="text" name="address_2" id=address_2 value="<?php echo $address_2; ?>" />
              <script type="text/javascript">
                     var address_2 = new LiveValidation('address_2', { validMessage: "OK!" });
            </script></td>
          </tr>
          <tr>
            <td><span class="required">*</span> <?php echo $entry_city; ?></td>
                        <td><input type="text" name="city" id=city value="<?php echo $city; ?>" />
              <script type="text/javascript">
                     var city = new LiveValidation('city', { validMessage: "OK!" });
                     city.add(Validate.Presence, { failureMessage: "Lütfen doldurunuz..!" });
                     city.add(Validate.Length, { minimum: 3, tooShortMessage: "En az 3 Karakter giriniz.." } );
                    city.add(Validate.Length, { maximum: 128, tooLongMessage: "En fazla 128 Karakter girebilirsiniz..!" } );
                     </script>
              <?php if ($error_city) { ?>
              <span class="error"><?php echo $error_city; ?></span>
              <?php } ?></td>
          </tr>
          <tr>
            <td><?php echo $entry_postcode; ?></td>
                        <td><input type="text" name="postcode" id=postcode value="<?php echo $postcode; ?>" />
              <script type="text/javascript">
                     var postcode = new LiveValidation('postcode', { validMessage: "OK!" });
                     postcode.add(Validate.Presence, { failureMessage: "Lütfen doldurunuz..!" });
                     postcode.add(Validate.Length, { minimum: 3, tooShortMessage: "En az 3 Karakter giriniz.." } );
                    postcode.add(Validate.Length, { maximum: 12, tooLongMessage: "En fazla 12 Karakter girebilirsiniz..!" } );
                     </script></td>
          </tr>
          <tr>
            <td><span class="required">*</span> <?php echo $entry_country; ?></td>
            <td><select name="country_id" id="country_id" onchange="$('select[name=\'zone_id\']').load('index.php?route=account/create/zone&country_id=' + this.value + '&zone_id=<?php echo $zone_id; ?>');">
                <option value="FALSE"><?php echo $text_select; ?></option>
                <?php foreach ($countries as $country) { ?>
                <?php if ($country['country_id'] == $country_id) { ?>
                <option value="<?php echo $country['country_id']; ?>" selected="selected"><?php echo $country['name']; ?></option>
                <?php } else { ?>
                <option value="<?php echo $country['country_id']; ?>"><?php echo $country['name']; ?></option>
                <?php } ?>
                <?php } ?>
              </select>
              <?php if ($error_country) { ?>
              <span class="error"><?php echo $error_country; ?></span>
              <?php } ?></td>
          </tr>
          <tr>
            <td><span class="required">*</span> <?php echo $entry_zone; ?></td>
            <td><select name="zone_id">
              </select>
              <?php if ($error_zone) { ?>
              <span class="error"><?php echo $error_zone; ?></span>
              <?php } ?></td>
          </tr>
        </table>
      </div>
      <b style="margin-bottom: 2px; display: block;"><?php echo $text_your_password; ?></b>
      <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;">
        <table>
          <tr>
            <td width="150"><span class="required">*</span> <?php echo $entry_password; ?></td>
                        <td><input type="password" name="password" id=password value="<?php echo $password; ?>" />
              <script type="text/javascript">
              var password = new LiveValidation('password', { validMessage: "OK!" });
              password.add(Validate.Presence, { failureMessage: "Lütfen doldurunuz.." });
                     password.add(Validate.Length, { minimum: 3, tooShortMessage: "En az 3 Karakter giriniz.." } );
                    password.add(Validate.Length, { maximum: 20, tooLongMessage: "En fazla 20 Karakter girebilirsiniz..!" } );
                     </script>
              <?php if ($error_password) { ?>
              <span class="error"><?php echo $error_password; ?></span>
              <?php } ?></td>
          </tr>
          <tr>
            <td><span class="required">*</span> <?php echo $entry_confirm; ?></td>
                        <td><input type="password" name="confirm" id=confirm value="<?php echo $confirm; ?>" />
              <script type="text/javascript">
                     var confirm = new LiveValidation('confirm', { validMessage: "OK!" });
                     confirm.add(Validate.Presence, { failureMessage: "Lütfen doldurunuz..!" });
                     confirm.add(Validate.Confirmation, { match: 'password', failureMessage: "Parolalar aynı değil..!" } );
                     </script>
              <?php if ($error_confirm) { ?>
              <span class="error"><?php echo $error_confirm; ?></span>
              <?php } ?></td>
          </tr>
        </table>
      </div>
      <b style="margin-bottom: 2px; display: block;"><?php echo $text_newsletter; ?></b>
      <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;">
        <table>
          <tr>
            <td width="150"><?php echo $entry_newsletter; ?></td>
            <td><?php if ($newsletter == 1) { ?>
              <input type="radio" name="newsletter" value="1" checked="checked" />
              <?php echo $text_yes; ?>
              <input type="radio" name="newsletter" value="0" />
              <?php echo $text_no; ?>
              <?php } else { ?>
              <input type="radio" name="newsletter" value="1" />
              <?php echo $text_yes; ?>
              <input type="radio" name="newsletter" value="0" checked="checked" />
              <?php echo $text_no; ?>
              <?php } ?></td>
          </tr>
        </table>
      </div>
      <?php if ($text_agree) { ?>
      <div class="buttons">
        <table>
          <tr>
            <td align="right" style="padding-right: 5px;"><?php echo $text_agree; ?></td>
            <td width="5" style="padding-right: 10px;"><?php if ($agree) { ?>
              <input type="checkbox" name="agree" value="1" checked="checked" />
              <?php } else { ?>
              <input type="checkbox" name="agree" value="1" />
              <?php } ?></td>
            <td align="right" width="5"><a onclick="$('#create').submit();" class="button"><span><?php echo $button_continue; ?></span></a></td>
          </tr>
        </table>
      </div>
      <?php } else { ?>
      <div class="buttons">
        <table>
          <tr>
            <td align="right"><a onclick="$('#create').submit();" class="button"><span><?php echo $button_continue; ?></span></a></td>
          </tr>
        </table>
      </div>
      <?php } ?>
    </form>
  </div>
  <div class="bottom">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center"></div>
  </div>
</div>
  <script type="text/javascript"><!--
$('select[name=\'zone_id\']').load('index.php?route=account/create/zone&country_id=<?php echo $country_id; ?>&zone_id=<?php echo $zone_id; ?>');
//--></script>
<?php echo $footer; ?>

1.4.4 ve 1.4.7 de Test edilmiştir..
 

Ekli dosyalar

  • validate.zip
    8.6 KB · Görüntüleme: 18
Üst