Блок *доставка* перемещается вверх opencart
При обновлении страницы, блок *доставка* перемещается вверх.
Физически код стоит под блоком *имя, тел, email*, но какая-то функция поднимает его.
<div id="payment_address" class="qc-step" data-col="<?php echo $col; ?>" data-row="<?php echo $row; ?>"></div>
<script type="text/html" id="payment_address_template">
<div class="<%= parseInt(model.config.display) ? '' : 'hidden' %>">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<span class="icon">
<i class="<%= model.config.icon %>"></i>
</span>
<span class="text"><%= model.config.title %></span>
</h4>
</div>
<div class="panel-body">
<% if(model.config.description){ %><p class="description"><%= model.config.description %></p><% } %>
<% if(model.account == 'logged'){ %>
<% if(_.size(model.addresses) > 0){ %>
<p><?php echo $text_address_existing; ?></p>
<% if(config.design.address_style == 'list') { %>
<div class="list-group">
<% _.each (model.addresses, function(address) { %>
<div class="list-group-item <%= address.address_id == model.payment_address.address_id ? 'active' : '' %>">
<label for="payment_address_exists_<%= address.address_id %>">
<input type="radio" name="payment_address[address_id]" class="payment-address" value="<%= address.address_id %>" id="payment_address_exists_<%= address.address_id %>" <%= address.address_id == model.payment_address.address_id ? 'checked="checked"' : '' %> data-refresh="2" autocomplete='off' />
<div class="address-item" ><%= sformat(address.address_format, address) %> </div>
</label>
</div>
<% }) %>
</div>
<% }else{ %>
<% _.each (model.addresses, function(address) { %>
<div class="radio-input">
<label for="payment_address_exists_<%= address.address_id %>">
<input type="radio" name="payment_address[address_id]" class="payment-address" value="<%= address.address_id %>" id="payment_address_exists_<%= address.address_id %>" <%= address.address_id == model.payment_address.address_id ? 'checked="checked"' : '' %> data-refresh="2" autocomplete='off' />
<strong> <%= address.firstname %>
<%= address.lastname %></strong>
<%= address.address_1 %>
<%= address.address_2 %>
<%= address.city %>
<%= address.zone %>
<%= address.country %>,
<%= address.postcode %>
</label>
</div>
<% }) %>
<% } %>
<% } %>
<div class="radio-input">
<input type="radio" name="payment_address[address_id]" class="payment-address" value="new" id="payment_address_exists_new" <%= model.payment_address.address_id == 'new' ? 'checked="checked"' : '' %> data-refresh="2" autocomplete='off' />
<label for="payment_address_exists_new">
<?php echo $text_address_new; ?>
</label>
</div>
<form id="payment_address_form" class="form-horizontal <%= model.payment_address.address_id == 'new' ? '' : 'hidden' %>">
</form>
<% }else{ %>
<form id="payment_address_form" class="form-horizontal">
</form>
<% } %>
</div>
</div>
</div>
</script>
<script>
$(function() {
qc.paymentAddress = $.extend(true, {}, new qc.PaymentAddress(<?php echo $json; ?>));
qc.paymentAddressView = $.extend(true, {}, new qc.PaymentAddressView({
el:$("#payment_address"),
model: qc.paymentAddress,
template: _.template($("#payment_address_template").html())
}));
qc.paymentAddressView.setZone(qc.paymentAddress.get('payment_address.country_id'));
});
</script>
<script type="text/html" id="novaposhta_template">
<div>
<hr style="margin-bottom: 10px; margin-top: 10px;">
<span class="panel-title1">
<span class="icon">
<i class="fa fa-truck"></i>
</span>
<span class="text">Доставка</span>
<hr style="margin-bottom: 10px; margin-top: 10px;">
</div>
<div>
<input class="hide" id="hd-1" type="checkbox">
<label for="hd-1">Доставка на відділення</label>
<div>
<!-- выпадающий список новой почты -->
<div class="text-input form-group sort-item">
<input type="hidden" name="delivery_method[shipping_cost]" value="<?php echo $shipping_cost; ?>">
<input type="hidden" name="delivery_method[min_cost_for_free]" value="<?php echo $free_total_coast; ?>">
<div class="col-xs-5">
<label class="control-label" for="delivery_method[state]">
<span class="text" title=""><?php echo $text_district; ?></span>
</label>
</div>
<div class="col-xs-7">
<select class="form-control" name="payment_address.address_1">
<option value="-1"><?php echo $text_select_district; ?></option>
<?php foreach($countries as $country) : ?>
<option data-id="<?php echo $country['code']; ?>" value="<?php echo $country['name']; ?>"><?php echo $country['name']; ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="text-input form-group sort-item">
<div class="col-xs-5">
<label class="control-label" for="payment_address.address_1">
<span class="text" title=""><?php echo $text_city; ?></span>
</label>
</div>
<div class="col-xs-7">
<select class="form-control" name="payment_address.city" disabled="disabled">
<option value="-1">---</option>
</select>
</div>
</div>
<div class="text-input form-group sort-item">
<div class="col-xs-5">
<label class="control-label" for="payment_address.address_2">
<span class="text" title=""><?php echo $text_office; ?></span>
</label>
</div>
<div class="col-xs-7">
<select class="form-control" name="payment_address.address_2" disabled="disabled">
<option value="-1">---</option>
</select>
</div>
</div>
<!-- выпадающий список новой почты -->
</div>
<br/>
<input class="hide" id="hd-2" type="checkbox">
<label for="hd-2">Доставка до дверей - 100 грн</label>
<div>
<div class="text-input form-group sort-item">
<div class="col-xs-5">
<label class="control-label" for="shipping_address_exists shipping_address.address_1">
<span class="text" title=""><?php echo $text_shipping_address_1; ?></span>
</label>
</div>
<div class="col-xs-7">
<input type="text" name="shipping_address.address_1" id="shipping_address_address_1" class="form-control">
<label for="shipping_address_address_id_address.address_1">
</select>
</div>
</div>
</div>
</div>
</script>
<script type="text/javascript">
$(function(){
$("body").on('change', "select[name='payment_address.address_1']",function(){
var shipping_method = 'novaposhta';
$.post('index.php?route=shipping/'+shipping_method+'/state', { country_id : $(this).find(':selected').data("id") }, function(response){
$('select[name=\'payment_address.city\']').html(response).removeAttr('disabled');
});
});
$("body").on('change', "select[name='payment_address.city']",function(){
var shipping_method = 'novaposhta';
$.post('index.php?route=shipping/' + shipping_method + '/city', { zone_id: $(this).find(':selected').data("id")}, function (response) {
$('select[name=\'payment_address.address_2\']').html(response).removeAttr('disabled');
});
});
$("body").on('change', "select[name='delivery_method[type_delivery]']",function(){
if($(this).val() == 'address') {
$("select[name='payment_address.address_2']").data('disabled', 'disabled').parents('table').hide();
$("input[name='delivery_method[address]']").removeAttr('disabled').val('').parents('table').show();
} else {
var shipping_method = 'novaposhta';
var zone_id = $("select[name='payment_address.city']").find(':selected').data("id");
if(zone_id != -1) {
$.post('index.php?route=shipping/' + shipping_method + '/city', {'zone_id': zone_id}, function (response) {
$("select[name='payment_address.address_2']").html(response).removeAttr('disabled').parents('table').show();
$("input[name='delivery_method[address]']").data('disabled', 'disabled').parents('table').hide();
});
} else {
$("select[name='payment_address.address_2']").parents('table').show();
$("input[name='delivery_method[address]']").data('disabled', 'disabled').parents('table').hide();
}
}
});
$(window).load(function() {
$('#payment_address_form').append($('#novaposhta_template').html());
});
});
</script>
-
304 1 0 Добрый день.
Можете кинуть ссылку на сайт, так проще будет посмотреть в чем проблема?
опыт разработки сайтов на Opencart более 4-х лет.
-
101 7 0 сделаю, поправлю, расскажу в чем была причина
сделаю, поправлю, расскажу в чем была причина
-
3043 805 0 Могу разобраться
-
Здравствуйте. Можно ссылку на сайт?
-
Current freelance projects in the category PHP
Module for OpenCart: mass creation of products from folders with imagesDevelopment of a mass product creation module for OpenCart (ocStore 3.x) A backend module for OpenCart / ocStore 3.x needs to be developed that automatically creates products from a pre-prepared folder structure with images.Main functionality: mass creation of products from… Content Management Systems, PHP ∙ 19 hours 28 minutes back ∙ 33 proposals |
Developer for CMS website project on Drupal 7 + PHP/MySQL.We are looking for a developer to assist with the setup of a CMS site on Drupal 7 + PHP/MySQL. Task:1. Create product cards for the entire range of products (currently, not all products on the site have product cards with descriptions and characteristics).2. Add correct… Content Management Systems, PHP ∙ 2 days 23 hours back ∙ 39 proposals |
Looking for a Bitrix24 specialist / CRM integrator to set up automation.Our company works with CRM Bitrix24. We need a specialist who can set up automatic addition of phone numbers to leads/orders in two formats. Automation must be correctly configured for two countries: the Republic of Moldova and Romania. Task: When creating a lead or order in… PHP, Web Programming ∙ 3 days 22 hours back ∙ 24 proposals |
Website optimizationOptimization of the website jdgreta.co.uk on Shopify. SEO audit attached to the project. Main tasks - - Fix all meta data - Complete the technical specifications for the programmer (since this project combines tasks for both the programmer and SEO, if you are not a company -… HTML & CSS, PHP ∙ 4 days 18 hours back ∙ 33 proposals |
Horoshop SpecialistNeed a specialist who can correctly set up the product Feed. Problem: Currently, over 13,000 products are being uploaded with the same type value (e.g., "everything for manicure and pedicure"). Because of this, it is impossible to segment products in Google Ads and set different… PHP, Website Maintenance ∙ 5 days 20 hours back ∙ 21 proposals |
