uawdijnntqw1x1x1
IP : 13.58.62.77
Hostname : ns1.eurodns.top
Kernel : Linux ns1.eurodns.top 4.18.0-553.5.1.lve.1.el7h.x86_64 #1 SMP Fri Jun 14 14:24:52 UTC 2024 x86_64
Disable Function : mail,sendmail,exec,passthru,shell_exec,system,popen,curl_multi_exec,parse_ini_file,show_source,eval,open_base,symlink
OS : Linux
PATH:
/
home
/
sudancam
/
.trash
/
install.1
/
..
/
fonts
/
..
/
catalog.1
/
view
/
template
/
checkout
/
shipping_address.twig
/
/
<fieldset> <legend>{{ heading_title }}</legend> <div id="shipping-addresses" style="display: {% if addresses %}block{% else %}none{% endif %};"> <div class="form-check"> <input type="radio" name="shipping_existing" value="1" id="input-shipping-existing" class="form-check-input"{% if addresses %} checked{% endif %}/> <label for="input-shipping-existing" class="form-check-label">{{ text_address_existing }}</label> </div> <div class="form-check"> <input type="radio" name="shipping_existing" value="0" id="input-shipping-new" class="form-check-input"{% if not addresses %} checked{% endif %}/> <label for="input-shipping-new" class="form-check-label">{{ text_address_new }}</label> </div> </div> <div id="shipping-existing" style="display: {% if addresses %}block{% else %}none{% endif %};"> <select name="address_id" id="input-shipping-address" class="form-select"> <option>{{ text_select }}</option> {% for address in addresses %} <option value="{{ address.address_id }}"{% if address.address_id == address_id %} selected{% endif %}>{{ address.firstname }} {{ address.lastname }}, {{ address.address_1 }}, {{ address.city }}, {{ address.zone }}, {{ address.country }}</option> {% endfor %} </select> </div> <br/> <div id="shipping-new" style="display: {% if not addresses %}block{% else %}none{% endif %};"> <form id="form-shipping-address"> <div class="row row-cols-1 row-cols-md-2"> <div class="col mb-3 required"> <label for="input-shipping-firstname" class="form-label">{{ entry_firstname }}</label> <input type="text" name="firstname" value="{{ firstname }}" placeholder="{{ entry_firstname }}" id="input-shipping-firstname" class="form-control"/> <div id="error-shipping-firstname" class="invalid-feedback"></div> </div> <div class="col mb-3 required"> <label for="input-shipping-lastname" class="form-label">{{ entry_lastname }}</label> <input type="text" name="lastname" value="{{ lastname }}" placeholder="{{ entry_lastname }}" id="input-shipping-lastname" class="form-control"/> <div id="error-shipping-lastname" class="invalid-feedback"></div> </div> <div class="col mb-3"> <label for="input-shipping-company" class="form-label">{{ entry_company }}</label> <input type="text" name="company" value="{{ company }}" placeholder="{{ entry_company }}" id="input-shipping-company" class="form-control"/> </div> <div class="col mb-3 required"> <label for="input-shipping-address-1" class="form-label">{{ entry_address_1 }}</label> <input type="text" name="address_1" value="{{ address_1 }}" placeholder="{{ entry_address_1 }}" id="input-shipping-address-1" class="form-control"/> <div id="error-shipping-address-1" class="invalid-feedback"></div> </div> <div class="col mb-3"> <label for="input-shipping-address-2" class="form-label">{{ entry_address_2 }}</label> <input type="text" name="address_2" value="{{ address_2 }}" placeholder="{{ entry_address_2 }}" id="input-shipping-address-2" class="form-control"/> </div> <div class="col mb-3 required"> <label for="input-shipping-city" class="form-label">{{ entry_city }}</label> <input type="text" name="city" value="{{ city }}" placeholder="{{ entry_city }}" id="input-shipping-city" class="form-control"/> <div id="error-shipping-city" class="invalid-feedback"></div> </div> <div class="col mb-3 required"> <label for="input-shipping-postcode" class="form-label">{{ entry_postcode }}</label> <input type="text" name="postcode" value="{{ postcode }}" placeholder="{{ entry_postcode }}" id="input-shipping-postcode" class="form-control"/> <div id="error-shipping-postcode" class="invalid-feedback"></div> </div> <div class="col mb-3 required"> <label for="input-shipping-country" class="form-label">{{ entry_country }}</label> <select name="country_id" id="input-shipping-country" class="form-select"> <option value="">{{ text_select }}</option> {% for country in countries %} <option value="{{ country.country_id }}"{% if country.country_id == country_id %} selected{% endif %}>{{ country.name }}</option> {% endfor %} </select> <div id="error-shipping-country" class="invalid-feedback"></div> </div> <div class="col mb-3 required"> <label for="input-shipping-zone" class="form-label">{{ entry_zone }}</label> <select name="zone_id" id="input-shipping-zone" class="form-select"></select> <div id="error-shipping-zone" class="invalid-feedback"></div> </div> {% for custom_field in custom_fields %} {% if custom_field.type == 'select' %} <div class="col mb-3{% if custom_field.required %} required{% endif %} custom-field custom-field-{{ custom_field.custom_field_id }}"> <label for="input-shipping-custom-field-{{ custom_field.custom_field_id }}" class="form-label">{{ custom_field.name }}</label> <select name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" id="input-shipping-custom-field-{{ custom_field.custom_field_id }}" class="form-select"> <option value="">{{ text_select }}</option> {% for custom_field_value in custom_field.custom_field_value %} <option value="{{ custom_field_value.custom_field_value_id }}"{% if shipping_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == shipping_custom_field[custom_field.custom_field_id] %} selected{% endif %}>{{ custom_field_value.name }}</option> {% endfor %} </select> <div id="error-shipping-custom-field-{{ custom_field.custom_field_id }}" class="invalid-feedback"></div> </div> {% endif %} {% if custom_field.type == 'radio' %} <div class="col mb-3{% if custom_field.required %} required{% endif %} custom-field custom-field-{{ custom_field.custom_field_id }}"> <label class="form-label">{{ custom_field.name }}</label> <div id="input-shipping-custom-field-{{ custom_field.custom_field_id }}"> {% for custom_field_value in custom_field.custom_field_value %} <div class="form-check"> <input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" id="input-shipping-custom-value-{{ custom_field_value.custom_field_value_id }}" class="form-check-input"{% if shipping_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id in shipping_custom_field[custom_field.custom_field_id] %} checked{% endif %}/> <label for="input-shipping-custom-value-{{ custom_field_value.custom_field_value_id }}" class="form-check-label">{{ custom_field_value.name }}</label> </div> {% endfor %} </div> <div id="error-shipping-custom-field-{{ custom_field.custom_field_id }}" class="invalid-feedback"></div> </div> {% endif %} {% if custom_field.type == 'checkbox' %} <div class="col mb-3{% if custom_field.required %} required{% endif %} custom-field custom-field-{{ custom_field.custom_field_id }}"> <label class="form-label">{{ custom_field.name }}</label> <div id="input-shipping-custom-field-{{ custom_field.custom_field_id }}"> {% for custom_field_value in custom_field.custom_field_value %} <div class="form-check"> <input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" id="input-shipping-custom-value-{{ custom_field_value.custom_field_value_id }}" class="form-check-input"{% if shipping_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id in shipping_custom_field[custom_field.custom_field_id] %} checked{% endif %}/> <label for="input-shipping-custom-value-{{ custom_field_value.custom_field_value_id }}" class="form-check-label">{{ custom_field_value.name }}</label> </div> {% endfor %} </div> <div id="error-shipping-custom-field-{{ custom_field.custom_field_id }}" class="invalid-feedback"></div> </div> {% endif %} {% if custom_field.type == 'text' %} <div class="col mb-3{% if custom_field.required %} required{% endif %} custom-field custom-field-{{ custom_field.custom_field_id }}"> <label for="input-shipping-custom-field-{{ custom_field.custom_field_id }}" class="form-label">{{ custom_field.name }}</label> <input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if shipping_custom_field[custom_field.custom_field_id] %}{{ shipping_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" id="input-shipping-custom-field-{{ custom_field.custom_field_id }}" class="form-control"/> <div id="error-shipping-custom-field-{{ custom_field.custom_field_id }}" class="invalid-feedback"></div> </div> {% endif %} {% if custom_field.type == 'textarea' %} <div class="col mb-3{% if custom_field.required %} required{% endif %} custom-field custom-field-{{ custom_field.custom_field_id }}"> <label for="input-shipping-custom-field-{{ custom_field.custom_field_id }}" class="form-label">{{ custom_field.name }}</label> <textarea name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" rows="5" placeholder="{% if shipping_custom_field[custom_field.custom_field_id] %}{{ shipping_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" id="input-shipping-custom-field-{{ custom_field.custom_field_id }}" class="form-control">{{ custom_field.value }}</textarea> <div id="error-shipping-custom-field-{{ custom_field.custom_field_id }}" class="invalid-feedback"></div> </div> {% endif %} {% if custom_field.type == 'file' %} <div class="col mb-3{% if custom_field.required %} required{% endif %} custom-field custom-field-{{ custom_field.custom_field_id }}"> <label class="form-label">{{ custom_field.name }}</label> <div> <button type="button" data-oc-toggle="upload" data-oc-url="{{ upload }}" data-oc-size-max="{{ config_file_max_size }}" data-oc-size-error="{{ error_upload_size }}" data-oc-target="#input-shipping-custom-field-{{ custom_field.custom_field_id }}" class="btn btn-light"><i class="fas fa-upload"></i> {{ button_upload }}</button> <input type="hidden" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if shipping_custom_field[custom_field.custom_field_id] %}{{ shipping_custom_field[custom_field.custom_field_id] }}{% endif %}" id="input-shipping-custom-field-{{ custom_field.custom_field_id }}"/> <div id="error-shipping-custom-field-{{ custom_field.custom_field_id }}" class="invalid-feedback"></div> </div> </div> {% endif %} {% if custom_field.type == 'date' %} <div class="col mb-3{% if custom_field.required %} required{% endif %} custom-field custom-field-{{ custom_field.custom_field_id }}"> <label for="input-shipping-custom-field-{{ custom_field.custom_field_id }}" class="form-label">{{ custom_field.name }}</label> <div class="input-group"> <input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if shipping_custom_field[custom_field.custom_field_id] %}{{ shipping_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" id="input-shipping-custom-field-{{ custom_field.custom_field_id }}" class="form-control date"/> <div class="input-group-text"><i class="fas fa-calendar"></i></div> </div> <div id="error-shipping-custom-field-{{ custom_field.custom_field_id }}" class="invalid-feedback"></div> </div> {% endif %} {% if custom_field.type == 'time' %} <div class="col mb-3{% if custom_field.required %} required{% endif %} custom-field custom-field-{{ custom_field.custom_field_id }}"> <label for="input-shipping-custom-field-{{ custom_field.custom_field_id }}" class="form-label">{{ custom_field.name }}</label> <div class="input-group"> <input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if shipping_custom_field[custom_field.custom_field_id] %}{{ shipping_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" id="input-shipping-custom-field-{{ custom_field.custom_field_id }}" class="form-control time"/> <div class="input-group-text"><i class="fas fa-calendar"></i></div> </div> <div id="error-shipping-custom-field-{{ custom_field.custom_field_id }}" class="invalid-feedback"></div> </div> {% endif %} {% if custom_field.type == 'datetime' %} <div class="col mb-3{% if custom_field.required %} required{% endif %} custom-field custom-field-{{ custom_field.custom_field_id }}"> <label for="input-shipping-custom-field-{{ custom_field.custom_field_id }}" class="form-label">{{ custom_field.name }}</label> <div class="input-group"> <input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if shipping_custom_field[custom_field.custom_field_id] %}{{ shipping_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" id="input-shipping-custom-field-{{ custom_field.custom_field_id }}" class="form-control datetime"/> <div class="input-group-text"><i class="fas fa-calendar"></i></div> </div> <div id="error-shipping-custom-field-{{ custom_field.custom_field_id }}" class="invalid-feedback"></div> </div> {% endif %} {% endfor %} </div> <div class="text-end mb-3"> <button type="submit" id="button-shipping-address" class="btn btn-primary">{{ button_continue }}</button> </div> </form> </div> </fieldset> <script type="text/javascript"><!-- $('input[name=\'shipping_existing\']').on('change', function() { if ($(this).val() == 1) { $('#shipping-existing').show(); $('#shipping-new').hide(); } else { $('#shipping-existing').hide(); $('#shipping-new').show(); } }); // Existing Shipping Address $('#input-shipping-address').on('change', function() { var element = this; chain.attach(function() { return $.ajax({ url: 'index.php?route=checkout/shipping_address|address&language={{ language }}&address_id=' + $(element).val(), dataType: 'json', beforeSend: function() { $(element).prop('disabled', true); }, complete: function() { $(element).prop('disabled', false); }, success: function(json) { if (json['redirect']) { location = json['redirect']; } if (json['error']) { $('#alert').prepend('<div class="alert alert-danger alert-dismissible"><i class="fas fa-exclamation-circle"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>'); } if (json['success']) { $('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fas fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>'); $('#button-shipping-method').trigger('click'); } }, error: function(xhr, ajaxOptions, thrownError) { console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }); }); // New Shipping Address $('#form-shipping-address').on('submit', function(e) { e.preventDefault(); chain.attach(function() { return $.ajax({ url: 'index.php?route=checkout/shipping_address|save&language={{ language }}', type: 'post', data: $('#form-shipping-address').serialize(), dataType: 'json', contentType: 'application/x-www-form-urlencoded', beforeSend: function() { $('#button-shipping-address').prop('disabled', true).addClass('loading'); }, complete: function() { $('#button-shipping-address').prop('disabled', false).removeClass('loading'); }, success: function(json) { $('#form-shipping-address').find('.is-invalid').removeClass('is-invalid'); $('#form-shipping-address').find('.invalid-feedback').removeClass('d-block'); if (json['redirect']) { location = json['redirect']; } if (json['error']) { if (json['error']['warning']) { $('#alert').prepend('<div class="alert alert-danger alert-dismissible"><i class="fas fa-exclamation-circle"></i> ' + json['error']['warning'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>'); } for (i in json['error']) { for (key in json['error']) { $('#input-' + key.replaceAll('_', '-')).addClass('is-invalid').find('.form-control, .form-select, .form-check-input, .form-check-label').addClass('is-invalid'); $('#error-' + key.replaceAll('_', '-')).html(json['error'][key]).addClass('d-block'); } } } if (json['success']) { $('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fas fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>'); var addresses = []; // Shipping addresses if (json['addresses']) { for (i in json['addresses']) { addresses[i] = { text: json['addresses'][i]['firstname'] + ' ' + json['addresses'][i]['lastname'] + ', ' + json['addresses'][i]['address_1'] + ', ' + json['addresses'][i]['city'] + ', ' + json['addresses'][i]['zone'] + ', ' + json['addresses'][i]['country'], value: json['addresses'][i]['address_id'] }; } } {% if config_checkout_address %} html = ''; for (i in addresses) { if (addresses[i]['value'] == $('#input-payment-address').val()) { html += '<option value="' + addresses[i]['value'] + '" selected>' + addresses[i]['text'] + '</option>'; } else { html += '<option value="' + addresses[i]['value'] + '">' + addresses[i]['text'] + '</option>'; } } $('#input-payment-address').html(html); $('#payment-addresses').css({display: 'block'}); $('#input-payment-existing').trigger('click'); {% endif %} // Shipping method html = ''; for (i in addresses) { if (addresses[i]['value'] == json['address_id']) { html += '<option value="' + addresses[i]['value'] + '" selected>' + addresses[i]['text'] + '</option>'; } else { html += '<option value="' + addresses[i]['value'] + '">' + addresses[i]['text'] + '</option>'; } } $('#input-shipping-address').html(html); $('#shipping-addresses').css({display: 'block'}); $('#input-shipping-existing').trigger('click'); $('#form-shipping-address')[0].reset(); $('#button-shipping-method').trigger('click'); } }, error: function(xhr, ajaxOptions, thrownError) { console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }); }); $('#input-shipping-country').on('change', function() { var element = this; chain.attach(function() { return $.ajax({ url: 'index.php?route=localisation/country&language={{ language }}&country_id=' + $('#input-shipping-country').val(), dataType: 'json', beforeSend: function() { $(element).prop('disabled', true); }, complete: function() { $(element).prop('disabled', false); }, success: function(json) { if (json['postcode_required'] == '1') { $('#input-shipping-postcode').parent().addClass('required'); } else { $('#input-shipping-postcode').parent().removeClass('required'); } html = '<option value="">{{ text_select }}</option>'; if (json['zone'] && json['zone'] != '') { for (i = 0; i < json['zone'].length; i++) { html += '<option value="' + json['zone'][i]['zone_id'] + '"'; if (json['zone'][i]['zone_id'] == '{{ zone_id }}') { html += ' selected'; } html += '>' + json['zone'][i]['name'] + '</option>'; } } else { html += '<option value="0" selected>{{ text_none }}</option>'; } $('#input-shipping-zone').html(html); }, error: function(xhr, ajaxOptions, thrownError) { console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }); }); $('#input-shipping-country').trigger('change'); $(document).ready(function () { $('.date').daterangepicker({ singleDatePicker: true, autoApply: true, locale: { format: 'YYYY-MM-DD' } }); $('.time').daterangepicker({ singleDatePicker: true, datePicker: false, autoApply: true, timePicker: true, timePicker24Hour: true, locale: { format: 'HH:mm' } }).on('show.daterangepicker', function (ev, picker) { picker.container.find('.calendar-table').hide(); }); $('.datetime').daterangepicker({ singleDatePicker: true, autoApply: true, timePicker: true, timePicker24Hour: true, locale: { format: 'YYYY-MM-DD HH:mm' } }); }); //--></script>
/home/sudancam/.trash/install.1/../fonts/../catalog.1/view/template/checkout/shipping_address.twig