MagomedAina
-
Публікації
19 -
З нами
-
Відвідування
Тип публікації
Профілі
Форум
Маркетплейс
Статті
FAQ
Наші новини
Магазин
Блоги
module__dplus_manager
Повідомлення, опубліковані користувачем MagomedAina
-
-
Здравствуйте, уважаемы разработчики.
У меня вопрос: никак не могу указать способ доставки.
пишет все время не выбрана способ доставки...
Содержимое скрипта в файле checkout.tpl
<script type="text/javascript"> <?php if (!$logged): ?> $(document).ready(function() { $('#order-root form.orderForm').empty(); $.ajax({ url: 'index.php?route=checkout/guest', dataType: 'html', beforeSend: function() { }, complete: function() {}, success: function(html) { $('#order-root form.orderForm').append(html); $('textarea[name=address_1]').trigger('blur'); }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }); <?php endif; ?> <?php if (!$logged): // если просто гость ?> $(document).delegate('textarea[name=address_1]', 'blur', function() { //console.log('Value: ', $(this).val()); //return false; $.ajax({ url: 'index.php?route=checkout/guest/save', type: 'post', data: { customer_group_id: $('input#guest_group_id').val(), firstname: $('input[name=firstname]').val(), lastname: '', email: $('input[name=email]').val(), telephone: $('input[name=telephone]').val(), fax: '', company: '', address_1: $('textarea[name=address_1]').val(), address_2: '', city: '', postcode: '', country_id: 176, zone_id: 2759, shipping_address: 1 }, dataType: 'json', beforeSend: function() { }, success: function(json) { $('span[id^="error"]').text(''); if (json['redirect']) { location = json['redirect']; } else if (json['error']) { $('#order-form-section-delivery').remove(); $('#order-form-section-shipping').remove(); $('#order-form-section-payment').remove(); $('#order-form-section-confirm').remove(); $('.btn-agree-order').remove(); for (i in json['error']) { $('span#error_'+i).text( json['error'][i] ); } } else { <?php if ($shipping_required): ?> $.ajax({ url: 'index.php?route=checkout/shipping_method', dataType: 'html', complete: function() { }, success: function(html) { if ($('#order-form-section-shipping').length == 0) $('#order-root form.orderForm').append(html); $.ajax({ url: 'index.php?route=checkout/payment_method', dataType: 'html', complete: function() { }, success: function(html) { if ($('#order-form-section-payment').length == 0) $('#order-root form.orderForm').append(html); }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); <?php else: ?> console.log('Not'); <?php endif; ?> } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }); <?php else: //если залогинился ?> $('#order-root form.orderForm').empty(); $.ajax({ url: 'index.php?route=checkout/payment_address', dataType: 'html', success: function(html) { $('#order-root form.orderForm').append(html); $.ajax({ url: 'index.php?route=checkout/shipping_address/save', type: 'post', dataType: 'json', data: { shipping_address: 'existing', address_id : $("#order-form-section-address input[name='adress_id']").val(), }, success: function(json) { if (json['redirect']) { location = json['redirect']; } else if (json['error']) { console.log(json['error']); } else { <?php if ($shipping_required): ?> $.ajax({ url: 'index.php?route=checkout/shipping_method', dataType: 'html', complete: function() { }, success: function(html) { if ($('#order-form-section-shipping').length == 0) $('#order-root form.orderForm').append(html); $.ajax({ url: 'index.php?route=checkout/payment_address/save', type: 'post', data: { payment_address: 'existing', address_id : $("#order-form-section-address input[name='adress_id']").val(), }, dataType: 'json', success: function(json) { if (json['redirect']) { location = json['redirect']; } else if (json['error']) { } else { $.ajax({ url: 'index.php?route=checkout/payment_method', dataType: 'html', complete: function() { }, success: function(html) { if ($('#order-form-section-payment').length == 0) $('#order-root form.orderForm').append(html); }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); <?php else: ?> console.log('Not'); <?php endif; ?> } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); <?php endif; ?> $(document).delegate('.btn-agree-order', 'click', function() { if ($('input[id^="period"]:checked').length > 0) {} else { swal('Вы не Выбрали удобное для Вас время и дату доставки, курьером Вашего заказа.'); return false; } $.ajax({ url: 'index.php?route=checkout/shipping_address/save', type: 'post', data: { address_id : $("#order-form-section-address input[name='adress_id']").val(), firstname: $('input[name=firstname]').val(), address_1: $('textarea[name=address_1]').val(), company: '', address_2: '', country_id: 176, zone_id: 2759 }, dataType: 'json', beforeSend: function() { }, success: function(json) { //**** checkout shipping save $.ajax({ url: 'index.php?route=checkout/shipping_method/save', type: 'post', data: $('input[id^="shipping-option"]:checked, input[id^="period"]:checked'), dataType: 'json', beforeSend: function() { }, success: function(json) { if (json['redirect']) { location = json['redirect']; } else if (json['error']) { if (json['error']['warning']) { $('span#error_payment_id').text(json['error']['warning']); } } else { //---- checkout payment_method save $.ajax({ url: 'index.php?route=checkout/payment_method/save', type: 'post', data: $('input[id^="payment-option"]:checked, input[type=\'checkbox\']:checked, textarea[name="comment"]'), dataType: 'json', beforeSend: function() { }, success: function(json) { if (json['redirect']) { location = json['redirect']; } else if (json['error']) { if (json['error']['warning']) { $('span#error_payment_id').text(json['error']['warning']+' nn '); } } else { $.ajax({ url: 'index.php?route=checkout/confirm', dataType: 'html', complete: function() { }, success: function(html) { //$('#order-form-section-confirm').remove(); $('#order-root form.orderForm').empty(); // if ($('#order-form-section-confirm').length == 0) $('#order-root form.orderForm').append(html); }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); //----/ checkout payment_method save } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); //****/end checkout shipping save } }); }); </script>
-
Здравствуйте.
Ситуация следующая.
Клиент сделал заказ, но допустим он пожепал убрать одну позицию из заказа.
Я захожу в заказы, выбираю его, перехожу на редактирование, затем пытаюсь удалить позицию товара, то есть нажимаю на кнопку удаления, в результате ничего не происходит и не удаляется. Пытался нажать на кнопку удалить , а затем обновить страницу (как некоторые рекомендуют в форумах), то результата нет, так и не удаляется.
Удаляется товар, только тогда, когда я в количестве пропишу ноль, и нажму кнопку обновить...
Как сделать все таки чтоб товар удалялся в админке, при редактировании заказа, при нажатии все таки кнопки ( красной ) удалить?
Спасибо...
-
Код шаблона:
-----
<div id="cart-bottom" style="position: relative;">
<div class="cart-page--main-col ">
<section class="whiteBlock" id="order-form-section-confirm">
<div class="orderProceed"><input type="button" value="отправить" id="button-confirm" data-loading-text="<?php echo $text_loading; ?>" /><br /><br />
<div>
Подтверждая заказ, Вы принимаете условия
<a href="javascript:void(0);" target="_blank">Пользовательского соглашения</a>
и <br /> даете согласие на хранение и обработку персональных данных
</div>
</div>
</section>
</div>
</div><script type="text/javascript"><!--
$('#button-confirm').on('click', function() {
$.ajax({
type: 'get',
url: 'index.php?route=extension/payment/bank_transfer/confirm',
cache: false,
beforeSend: function() {
//$('#button-confirm').button('loading');
},
complete: function() {
//$('#button-confirm').button('reset');
},
error: function(e) {
},
success: function(data) {
location = '<?php echo $continue; ?>';
}
});
});
//--></script>----
-
ЗДравствуйте.
С чем может быть связана следующая ошибка:
jquery.min.js:4 GET http://<site>/index.php?route=extension/payment/cod/confirm&_=1538898294951 500 (Internal Server Error)send @ jquery.min.js:4 ajax @ jquery.min.js:4 (anonymous) @ VM118:3 dispatch @ jquery.min.js:3 r.handle @ jquery.min.js:3 Никак не пойму.
Вот код самого метода confirm :
------
class ControllerExtensionPaymentCod extends Controller {
public function index() {
$data['button_confirm'] = $this->language->get('button_confirm');$data['text_loading'] = $this->language->get('text_loading');
$data['continue'] = $this->url->link('checkout/success');
$this->session->data['text_description_payment']['text_instruction'] = '';
$this->session->data['text_description_payment']['text_description'] = 'Заказ Вам доставит курьер. Оплату Вы производите на месте.';
$this->session->data['text_description_payment']['text_payment'] = '';
return $this->load->view('extension/payment/cod', $data);
}public function confirm() {
if ($this->session->data['payment_method']['code'] == 'cod') {
$this->load->model('checkout/order');
$this->model_checkout_order->addOrderHistory($this->session->data['order_id'], $this->config->get('cod_order_status_id'));
}
}
}------
В чем может быть ошибка
-
Здравствуйте.
У меня вопрос следующий.
в админке вверху, где уведомления появляются, у меня написано что один заказ в процессе, у меня есть только один заказ, и у него статус сделка завершена
В где находится заказ который в процессе, не могу понять...
-
да метод public
-
Здравствуйте, создал свой метод в catalog/model/checkout/order.php
пытаюсь вызвать его в controller/extension/payment/cod.php
в методе confirm
и выходит ошибка Undefined property: Proxy::method_name
Модуль подключен $this->load->model('checkout/order');
В чем может быть проблема?
-
Это все понятно.
Как мне решить эту проблему?
-
Здорова товарищи разработчики.
У меня следующая проблема.
Формирую корзину, появляется товара все нормально, но вот когда делаю "ОФОРМИТЬ ЗАКАЗ", у меня все время возвращается в корзину, не понял почему.
Т..е не происходит переход по ссылке /checkout все время переход на /cart
Все это я делаю на локальном хосте (wampserver), а когда залил на реальный хост там работает.
Но мне нужно чтоб работало и на локальном, чтоб мог тестировать.
Скажите как решить данную проблему?
Спасибо
-
Ну допустим я добавляю какой нибудь блок в модуле html содержимое, захожу заполняю необходимые поля, сохраняю.
Когда затем добавляю на сайт, то у меня подтягивается шаблон с папки view/theme/default/template/extension/module/html.tpl.
И все остальные блоки если буду добавлять, то они все будут брать шаблон для отображения по тому же пути.
То есть у всех получается одинаковый шаблон.
А можно сделать так чтобы у каждого блока добавляемого был свой шаблон для отображения?
-
Здравствуйте.
У вопрос по модулю html содержимое.
Как сделать так чтобы я мог вставлять данный модуль, и чтобы у каждого блока был свой шаблон, а то он один для всего.
-
Спасибо , за подсказку
-
Здравствуйте, хотел создать отдельную страницу на подобие как контакты.
Одним словом создал в файл контроллер в папке Information->cat.php , затем создал вид в папке information шаблона cat.tpl
Назвал имя класса контроллера ControllerInformationCat
Хочу сделать ссылку в шапке header, зашел в файл контроллера header, создал переменную $data['cat'] = $this->url->link('information/cat', '', true);
Схему создал...
Обновляю страницу, навожу на ссылку
А ссылку у меня такая: index.php?route=information/cat.
SEO включено...
Почему у меня выходит именно такой адрес ссылки а не по правилам SEO?
P.S: Когда набираю <Мой сайт>/contact-us/, то нормально открывается...
-
Движок переустановлен
-
Движок установлен на openserver. Там ничего больше не установлено
-
Здравствуйте, скачал ocStore установил, перешел в раздел Баннеров, хотел редактировать, вместо этого выходит чисто белый экран...
С чем это связано и как это исправить?
В чем может быть ошибка
в Opencart 2.x: Загальні питання
Опубліковано:
Вот все почти файлы (шаблоны, контроллеры и модель)
checkout.php
confirm.php
guest.php
guest_shipping.php
payment_address.php
payment_method.php
shipping_address.php
shipping_method.php
success.php
checkout.tpl
guest.tpl
guest_shipping.tpl
payment_address.tpl
payment_method.tpl
shipping_address.tpl
shipping_method.tpl
order.php