Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

drmodjo

Новачок
  
  • Публікації

    42
  • З нами

  • Відвідування

Повідомлення, опубліковані користувачем drmodjo

  1. Доброго всем времени суток. Появилась нужда убрать Шаг 2 - Платежная информация при заказе товара для незарегистрированных и зарегистрированных пользователей. Облазил весь инет и не нашел рабочего способа. Помогите пожалуйста реализовать данный замысел. Всем отозвавшимся заранее спасибо. Opencart 2.3.0.2, стандартный шаблон.

  2. Помогите допилить затею.
    В /catalog/controller/product/category.php
    Родной код такой:
    'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get($this->config->get('config_theme') . '_product_description_length')) . '..',
    Если его заменить на:
    'description' => $result['meta_description'],
    Или на
    'description' => utf8_substr(strip_tags(html_entity_decode($result['meta_description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get($this->config->get('config_theme') . '_product_description_length')) . '..',
    То при превышении количества символов в мета описании не срабатывает перенос на новую строку и у товара появляется лифт.
    Как исправить?

  3. 27.02.2023 в 23:31, aridius сказал:

    catalog/controller/product/category.php

     

    'description' => utf8_substr(trim(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8'))), 0, $this->config->get('theme_' . $this->config->get('config_theme') . '_product_description_length')) . '..',

    на

    'description' => utf8_substr(trim(strip_tags(html_entity_decode($result['meta_description'], ENT_QUOTES, 'UTF-8'))), 0, $this->config->get('theme_' . $this->config->get('config_theme') . '_product_description_length')) . '..',

     

    Большое спасибо вам. А как можно контролировать количество символов и перенос строки в meta_description?

  4. Всем доброго времени суток. Помогите реализовать такую штуку... Надо, чтобы в категориях краткое описание товара подгружалось из Мета-тег Description товара. Opencart 2.3.0.2, шаблон стандартный. Где и что подправить? Спасибо заранее.

  5. К примеру в адресной графе ввести: Улица такая-то "строение 6" и сохранить. Открываем снова адресную графу а там только Улица такая-то. Все что в кавычках не отображается.

  6. Всем доброго времени суток. Имеется Opencart 2.3.0.2 со стандартным шаблоном. Проблема в том, что введенный пользователем текст заключенный в кавычках "" в регистрационных графах не отображается в админ панели регистрационных данных пользователя. Но если пользователь сделает заказ, то в адресе он отображается. Помогите исправить пожалуйста.

  7. 11.05.2022 в 19:04, Frolly сказал:

    Это норма что гугл берёт кусок текста и вставляет его в дескрипшион, кто-то видет это, кто-то видит дискрипшин, кому-то показывает вообще тайтлы карточек товара (в дескрипшионе) это означает что у вас релевантный текст и это хорошо.

    А как сделать как у конкурентов? 

  8. Всем доброго времени суток.  В поисковике Google в 90% случаях (По крайней мере в моей ситуации) выводит описание страницы взятое из общего описания, где у меня таблица с разным текстом. Смотрится это довольно хаотично. А у конкурента выдает в поиске определенный текст, который не отображается на странице зато выводится в поисковике.
    Помогите пожалуйста реализовать подобное. (Opencart 2.3.0.2, шаблон стандартный)

  9. 06.05.2022 в 08:48, buslikdrev сказал:

    Заменить

      Скрыть содержимое

                    <?php if ($shipping_required) { ?>
                    $.ajax({
                        url: 'index.php?route=checkout/shipping_address',
                        dataType: 'html',
                        success: function(html) {
                            $('#collapse-shipping-address .panel-body').html(html);

                            $('#collapse-shipping-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_shipping_address; ?> <i class="fa fa-caret-down"></i></a>');

                            $('a[href=\'#collapse-shipping-address\']').trigger('click');

                            $('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_shipping_method; ?>');
                            $('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_payment_method; ?>');
                            $('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_confirm; ?>');
                        },
                        error: function(xhr, ajaxOptions, thrownError) {
                            alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
                        }
                    });
                    <?php } else { ?>

    на

      Скрыть содержимое
                    $.ajax({
                        url: 'index.php?route=checkout/shipping_method',
                        dataType: 'html',
                        complete: function() {
                            $('#button-shipping-address').button('reset');
                        },
                        success: function(html) {
                            $('#collapse-shipping-method .panel-body').html(html);
    
    						$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_shipping_method; ?> <i class="fa fa-caret-down"></i></a>');
    
    						$('a[href=\'#collapse-shipping-method\']').trigger('click');
    
    						$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_payment_method; ?>');
    						$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_confirm; ?>');
    
                            $.ajax({
                                url: 'index.php?route=checkout/shipping_address',
                                dataType: 'html',
                                success: function(html) {
                                    $('#collapse-shipping-address .panel-body').html(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);
                        }
                    });

     

     

    Заменил. При переходе на эту страницу  страница пустая. Просто белая страница без каких либо ошибок. :-(

  10. 05.05.2022 в 23:26, buslikdrev сказал:

    Код покажите.

    <?php echo $header; ?>
    <div class="container">
      <ul class="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
        <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
        <?php } ?>
      </ul>
      <?php if ($error_warning) { ?>
      <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> <?php echo $error_warning; ?>
        <button type="button" class="close" data-dismiss="alert">&times;</button>
      </div>
      <?php } ?>
      <div class="row"><?php echo $column_left; ?>
        <?php if ($column_left && $column_right) { ?>
        <?php $class = 'col-sm-6'; ?>
        <?php } elseif ($column_left || $column_right) { ?>
        <?php $class = 'col-sm-9'; ?>
        <?php } else { ?>
        <?php $class = 'col-sm-12'; ?>
        <?php } ?>
        <div id="content" class="<?php echo $class; ?>"><?php echo $content_top; ?>
          <h1><?php echo $heading_title; ?></h1>
          <div class="panel-group" id="accordion">
            <div class="panel panel-default">
              <div class="panel-heading">
                <h4 class="panel-title"><?php echo $text_checkout_option; ?></h4>
              </div>
              <div class="panel-collapse collapse" id="collapse-checkout-option">
                <div class="panel-body"></div>
              </div>
            </div>
            <?php if (!$logged && $account != 'guest') { ?>
            <div class="panel panel-default">
              <div class="panel-heading">
                <h4 class="panel-title"><?php echo $text_checkout_account; ?></h4>
              </div>
              <div class="panel-collapse collapse" id="collapse-payment-address">
                <div class="panel-body"></div>
              </div>
            </div>
            <?php } else { ?>
            <div class="panel panel-default">
              <div class="panel-heading">
                <h4 class="panel-title"><?php echo $text_checkout_payment_address; ?></h4>
              </div>
              <div class="panel-collapse collapse" id="collapse-payment-address">
                <div class="panel-body"></div>
              </div>
            </div>
            <?php } ?>
            <?php if ($shipping_required) { ?>
            <div class="panel panel-default" style="display:none;">
              <div class="panel-heading">
                <h4 class="panel-title"><?php echo $text_checkout_shipping_address; ?></h4>
              </div>
              <div class="panel-collapse collapse" id="collapse-shipping-address">
                <div class="panel-body"></div>
              </div>
            </div>
            <div class="panel panel-default">
              <div class="panel-heading">
                <h4 class="panel-title"><?php echo $text_checkout_shipping_method; ?></h4>
              </div>
              <div class="panel-collapse collapse" id="collapse-shipping-method">
                <div class="panel-body"></div>
              </div>
            </div>
            <?php } ?>
            <div class="panel panel-default">
              <div class="panel-heading">
                <h4 class="panel-title"><?php echo $text_checkout_payment_method; ?></h4>
              </div>
              <div class="panel-collapse collapse" id="collapse-payment-method">
                <div class="panel-body"></div>
              </div>
            </div>
            <div class="panel panel-default">
              <div class="panel-heading">
                <h4 class="panel-title"><?php echo $text_checkout_confirm; ?></h4>
              </div>
              <div class="panel-collapse collapse" id="collapse-checkout-confirm">
                <div class="panel-body"></div>
              </div>
            </div>
          </div>
          <?php echo $content_bottom; ?></div>
        <?php echo $column_right; ?></div>
    </div>
    <script type="text/javascript"><!--
    $(document).on('change', 'input[name=\'account\']', function() {
    	if ($('#collapse-payment-address').parent().find('.panel-heading .panel-title > *').is('a')) {
    		if (this.value == 'register') {
    			$('#collapse-payment-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_account; ?> <i class="fa fa-caret-down"></i></a>');
    		} else {
    			$('#collapse-payment-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_payment_address; ?> <i class="fa fa-caret-down"></i></a>');
    		}
    	} else {
    		if (this.value == 'register') {
    			$('#collapse-payment-address').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_account; ?>');
    		} else {
    			$('#collapse-payment-address').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_payment_address; ?>');
    		}
    	}
    });
    
    <?php if (!$logged) { ?>
    $(document).ready(function() {
        $.ajax({
            url: 'index.php?route=checkout/login',
            dataType: 'html',
            success: function(html) {
               $('#collapse-checkout-option .panel-body').html(html);
    
    			$('#collapse-checkout-option').parent().find('.panel-heading .panel-title').html('<a href="#collapse-checkout-option" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_option; ?> <i class="fa fa-caret-down"></i></a>');
    
    			$('a[href=\'#collapse-checkout-option\']').trigger('click');
            },
            error: function(xhr, ajaxOptions, thrownError) {
                alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
            }
        });
    });
    <?php } else { ?>
    $(document).ready(function() {
        $.ajax({
            url: 'index.php?route=checkout/payment_address',
            dataType: 'html',
            success: function(html) {
                $('#collapse-payment-address .panel-body').html(html);
    
    			$('#collapse-payment-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_payment_address; ?> <i class="fa fa-caret-down"></i></a>');
    
    			$('a[href=\'#collapse-payment-address\']').trigger('click');
            },
            error: function(xhr, ajaxOptions, thrownError) {
                alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
            }
        });
    });
    <?php } ?>
    
    // Checkout
    $(document).delegate('#button-account', 'click', function() {
        $.ajax({
            url: 'index.php?route=checkout/' + $('input[name=\'account\']:checked').val(),
            dataType: 'html',
            beforeSend: function() {
            	$('#button-account').button('loading');
    		},
            complete: function() {
    			$('#button-account').button('reset');
            },
            success: function(html) {
                $('.alert, .text-danger').remove();
    
                $('#collapse-payment-address .panel-body').html(html);
    
    			if ($('input[name=\'account\']:checked').val() == 'register') {
    				$('#collapse-payment-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_account; ?> <i class="fa fa-caret-down"></i></a>');
    			} else {
    				$('#collapse-payment-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_payment_address; ?> <i class="fa fa-caret-down"></i></a>');
    			}
    
    			$('a[href=\'#collapse-payment-address\']').trigger('click');
            },
            error: function(xhr, ajaxOptions, thrownError) {
                alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
            }
        });
    });
    
    // Login
    $(document).delegate('#button-login', 'click', function() {
        $.ajax({
            url: 'index.php?route=checkout/login/save',
            type: 'post',
            data: $('#collapse-checkout-option :input'),
            dataType: 'json',
            beforeSend: function() {
            	$('#button-login').button('loading');
    		},
            complete: function() {
                $('#button-login').button('reset');
            },
            success: function(json) {
                $('.alert, .text-danger').remove();
                $('.form-group').removeClass('has-error');
    
                if (json['redirect']) {
                    location = json['redirect'];
                } else if (json['error']) {
                    $('#collapse-checkout-option .panel-body').prepend('<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> ' + json['error']['warning'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
    
    				// Highlight any found errors
    				$('input[name=\'email\']').parent().addClass('has-error');
    				$('input[name=\'password\']').parent().addClass('has-error');
    		   }
            },
            error: function(xhr, ajaxOptions, thrownError) {
                alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
            }
        });
    });
    
    // Register
    $(document).delegate('#button-register', 'click', function() {
        $.ajax({
            url: 'index.php?route=checkout/register/save',
            type: 'post',
            data: $('#collapse-payment-address input[type=\'text\'], #collapse-payment-address input[type=\'date\'], #collapse-payment-address input[type=\'datetime-local\'], #collapse-payment-address input[type=\'time\'], #collapse-payment-address input[type=\'password\'], #collapse-payment-address input[type=\'hidden\'], #collapse-payment-address input[type=\'checkbox\']:checked, #collapse-payment-address input[type=\'radio\']:checked, #collapse-payment-address textarea, #collapse-payment-address select'),
            dataType: 'json',
            beforeSend: function() {
    			$('#button-register').button('loading');
    		},
            success: function(json) {
                $('.alert, .text-danger').remove();
                $('.form-group').removeClass('has-error');
    
                if (json['redirect']) {
                    location = json['redirect'];
                } else if (json['error']) {
                    $('#button-register').button('reset');
    
                    if (json['error']['warning']) {
                        $('#collapse-payment-address .panel-body').prepend('<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> ' + json['error']['warning'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
                    }
    
    				for (i in json['error']) {
    					var element = $('#input-payment-' + i.replace('_', '-'));
    
    					if ($(element).parent().hasClass('input-group')) {
    						$(element).parent().after('<div class="text-danger">' + json['error'][i] + '</div>');
    					} else {
    						$(element).after('<div class="text-danger">' + json['error'][i] + '</div>');
    					}
    				}
    
    				// Highlight any found errors
    				$('.text-danger').parent().addClass('has-error');
                } else {
                    <?php if ($shipping_required) { ?>
                    var shipping_address = $('#payment-address input[name=\'shipping_address\']:checked').prop('value');
    
                    if (shipping_address) {
                        $.ajax({
                            url: 'index.php?route=checkout/shipping_method',
                            dataType: 'html',
                            success: function(html) {
    							// Add the shipping address
                                $.ajax({
                                    url: 'index.php?route=checkout/shipping_address',
                                    dataType: 'html',
                                    success: function(html) {
                                        $('#collapse-shipping-address .panel-body').html(html);
    
    									$('#collapse-shipping-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_shipping_address; ?> <i class="fa fa-caret-down"></i></a>');
                                    },
                                    error: function(xhr, ajaxOptions, thrownError) {
                                        alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
                                    }
                                });
    
    							$('#collapse-shipping-method .panel-body').html(html);
    
    							$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_shipping_method; ?> <i class="fa fa-caret-down"></i></a>');
    
       							$('a[href=\'#collapse-shipping-method\']').trigger('click');
    
    							$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_shipping_method; ?>');
    							$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_payment_method; ?>');
    							$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_confirm; ?>');
                            },
                            error: function(xhr, ajaxOptions, thrownError) {
                                alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
                            }
                        });
                    } else {
                        $.ajax({
                            url: 'index.php?route=checkout/shipping_address',
                            dataType: 'html',
                            success: function(html) {
                                $('#collapse-shipping-address .panel-body').html(html);
    
    							$('#collapse-shipping-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_shipping_address; ?> <i class="fa fa-caret-down"></i></a>');
    
    							$('a[href=\'#collapse-shipping-address\']').trigger('click');
    
    							$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_shipping_method; ?>');
    							$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_payment_method; ?>');
    							$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_confirm; ?>');
                            },
                            error: function(xhr, ajaxOptions, thrownError) {
                                alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
                            }
                        });
                    }
                    <?php } else { ?>
                    $.ajax({
                        url: 'index.php?route=checkout/payment_method',
                        dataType: 'html',
                        success: function(html) {
                            $('#collapse-payment-method .panel-body').html(html);
    
    						$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_payment_method; ?> <i class="fa fa-caret-down"></i></a>');
    
    						$('a[href=\'#collapse-payment-method\']').trigger('click');
    
    						$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_confirm; ?>');
                        },
                        error: function(xhr, ajaxOptions, thrownError) {
                            alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
                        }
                    });
                    <?php } ?>
    
                    $.ajax({
                        url: 'index.php?route=checkout/payment_address',
                        dataType: 'html',
                        complete: function() {
                            $('#button-register').button('reset');
                        },
                        success: function(html) {
                            $('#collapse-payment-address .panel-body').html(html);
    
    						$('#collapse-payment-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_payment_address; ?> <i class="fa fa-caret-down"></i></a>');
                        },
                        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);
            }
        });
    });
    
    // Payment Address
    $(document).delegate('#button-payment-address', 'click', function() {
        $.ajax({
            url: 'index.php?route=checkout/payment_address/save',
            type: 'post',
            data: $('#collapse-payment-address input[type=\'text\'], #collapse-payment-address input[type=\'date\'], #collapse-payment-address input[type=\'datetime-local\'], #collapse-payment-address input[type=\'time\'], #collapse-payment-address input[type=\'password\'], #collapse-payment-address input[type=\'checkbox\']:checked, #collapse-payment-address input[type=\'radio\']:checked, #collapse-payment-address input[type=\'hidden\'], #collapse-payment-address textarea, #collapse-payment-address select'),
            dataType: 'json',
            beforeSend: function() {
            	$('#button-payment-address').button('loading');
    		},
            complete: function() {
    			$('#button-payment-address').button('reset');
            },
            success: function(json) {
                $('.alert, .text-danger').remove();
    
                if (json['redirect']) {
                    location = json['redirect'];
                } else if (json['error']) {
                    if (json['error']['warning']) {
                        $('#collapse-payment-address .panel-body').prepend('<div class="alert alert-warning">' + json['error']['warning'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
                    }
    
    				for (i in json['error']) {
    					var element = $('#input-payment-' + i.replace('_', '-'));
    
    					if ($(element).parent().hasClass('input-group')) {
    						$(element).parent().after('<div class="text-danger">' + json['error'][i] + '</div>');
    					} else {
    						$(element).after('<div class="text-danger">' + json['error'][i] + '</div>');
    					}
    				}
    
    				// Highlight any found errors
    				$('.text-danger').parent().parent().addClass('has-error');
                } else {
                    <?php if ($shipping_required) { ?>
                    $.ajax({
                        url: 'index.php?route=checkout/shipping_address',
                        dataType: 'html',
                        success: function(html) {
                            $('#collapse-shipping-address .panel-body').html(html);
    
    						$('#collapse-shipping-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_shipping_address; ?> <i class="fa fa-caret-down"></i></a>');
    
    						$('a[href=\'#collapse-shipping-address\']').trigger('click');
    
    						$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_shipping_method; ?>');
    						$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_payment_method; ?>');
    						$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_confirm; ?>');
                        },
                        error: function(xhr, ajaxOptions, thrownError) {
                            alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
                        }
                    });
                    <?php } else { ?>
                    $.ajax({
                        url: 'index.php?route=checkout/payment_method',
                        dataType: 'html',
                        success: function(html) {
                            $('#collapse-payment-method .panel-body').html(html);
    
    						$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_payment_method; ?> <i class="fa fa-caret-down"></i></a>');
    
    						$('a[href=\'#collapse-payment-method\']').trigger('click');
    
    						$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_confirm; ?>');
                        },
                        error: function(xhr, ajaxOptions, thrownError) {
                            alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
                        }
                    });
                    <?php } ?>
    
                    $.ajax({
                        url: 'index.php?route=checkout/payment_address',
                        dataType: 'html',
                        success: function(html) {
                            $('#collapse-payment-address .panel-body').html(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);
            }
        });
    });
    
    // Shipping Address
    $(document).delegate('#button-shipping-address', 'click', function() {
        $.ajax({
            url: 'index.php?route=checkout/shipping_address/save',
            type: 'post',
            data: $('#collapse-shipping-address input[type=\'text\'], #collapse-shipping-address input[type=\'date\'], #collapse-shipping-address input[type=\'datetime-local\'], #collapse-shipping-address input[type=\'time\'], #collapse-shipping-address input[type=\'password\'], #collapse-shipping-address input[type=\'checkbox\']:checked, #collapse-shipping-address input[type=\'radio\']:checked, #collapse-shipping-address textarea, #collapse-shipping-address select'),
            dataType: 'json',
            beforeSend: function() {
    			$('#button-shipping-address').button('loading');
    	    },
            success: function(json) {
                $('.alert, .text-danger').remove();
    
                if (json['redirect']) {
                    location = json['redirect'];
                } else if (json['error']) {
                    $('#button-shipping-address').button('reset');
    
                    if (json['error']['warning']) {
                        $('#collapse-shipping-address .panel-body').prepend('<div class="alert alert-warning">' + json['error']['warning'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
                    }
    
    				for (i in json['error']) {
    					var element = $('#input-shipping-' + i.replace('_', '-'));
    
    					if ($(element).parent().hasClass('input-group')) {
    						$(element).parent().after('<div class="text-danger">' + json['error'][i] + '</div>');
    					} else {
    						$(element).after('<div class="text-danger">' + json['error'][i] + '</div>');
    					}
    				}
    
    				// Highlight any found errors
    				$('.text-danger').parent().parent().addClass('has-error');
                } else {
                    $.ajax({
                        url: 'index.php?route=checkout/shipping_method',
                        dataType: 'html',
                        complete: function() {
                            $('#button-shipping-address').button('reset');
                        },
                        success: function(html) {
                            $('#collapse-shipping-method .panel-body').html(html);
    
    						$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_shipping_method; ?> <i class="fa fa-caret-down"></i></a>');
    
    						$('a[href=\'#collapse-shipping-method\']').trigger('click');
    
    						$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_payment_method; ?>');
    						$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_confirm; ?>');
    
                            $.ajax({
                                url: 'index.php?route=checkout/shipping_address',
                                dataType: 'html',
                                success: function(html) {
                                    $('#collapse-shipping-address .panel-body').html(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);
                        }
                    });
    
                    $.ajax({
                        url: 'index.php?route=checkout/payment_address',
                        dataType: 'html',
                        success: function(html) {
                            $('#collapse-payment-address .panel-body').html(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);
            }
        });
    });
    
    // Guest
    $(document).delegate('#button-guest', 'click', function() {
        $.ajax({
            url: 'index.php?route=checkout/guest/save',
            type: 'post',
            data: $('#collapse-payment-address input[type=\'text\'], #collapse-payment-address input[type=\'date\'], #collapse-payment-address input[type=\'datetime-local\'], #collapse-payment-address input[type=\'time\'], #collapse-payment-address input[type=\'checkbox\']:checked, #collapse-payment-address input[type=\'radio\']:checked, #collapse-payment-address input[type=\'hidden\'], #collapse-payment-address textarea, #collapse-payment-address select'),
            dataType: 'json',
            beforeSend: function() {
           		$('#button-guest').button('loading');
    	    },
            success: function(json) {
                $('.alert, .text-danger').remove();
    
                if (json['redirect']) {
                    location = json['redirect'];
                } else if (json['error']) {
                    $('#button-guest').button('reset');
    
                    if (json['error']['warning']) {
                        $('#collapse-payment-address .panel-body').prepend('<div class="alert alert-warning">' + json['error']['warning'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
                    }
    
    				for (i in json['error']) {
    					var element = $('#input-payment-' + i.replace('_', '-'));
    
    					if ($(element).parent().hasClass('input-group')) {
    						$(element).parent().after('<div class="text-danger">' + json['error'][i] + '</div>');
    					} else {
    						$(element).after('<div class="text-danger">' + json['error'][i] + '</div>');
    					}
    				}
    
    				// Highlight any found errors
    				$('.text-danger').parent().addClass('has-error');
                } else {
                    <?php if ($shipping_required) { ?>
                    var shipping_address = $('#collapse-payment-address input[name=\'shipping_address\']:checked').prop('value');
    
                    if (shipping_address) {
                        $.ajax({
                            url: 'index.php?route=checkout/shipping_method',
                            dataType: 'html',
                            complete: function() {
                                $('#button-guest').button('reset');
                            },
                            success: function(html) {
    							// Add the shipping address
                                $.ajax({
                                    url: 'index.php?route=checkout/guest_shipping',
                                    dataType: 'html',
                                    success: function(html) {
                                        $('#collapse-shipping-address .panel-body').html(html);
    
    									$('#collapse-shipping-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_shipping_address; ?> <i class="fa fa-caret-down"></i></a>');
                                    },
                                    error: function(xhr, ajaxOptions, thrownError) {
                                        alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
                                    }
                                });
    
    						    $('#collapse-shipping-method .panel-body').html(html);
    
    							$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_shipping_method; ?> <i class="fa fa-caret-down"></i></a>');
    
    							$('a[href=\'#collapse-shipping-method\']').trigger('click');
    
    							$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_payment_method; ?>');
    							$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_confirm; ?>');
                            },
                            error: function(xhr, ajaxOptions, thrownError) {
                                alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
                            }
                        });
                    } else {
                        $.ajax({
                            url: 'index.php?route=checkout/guest_shipping',
                            dataType: 'html',
                            complete: function() {
                                $('#button-guest').button('reset');
                            },
                            success: function(html) {
                                $('#collapse-shipping-address .panel-body').html(html);
    
    							$('#collapse-shipping-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_shipping_address; ?> <i class="fa fa-caret-down"></i></a>');
    
    							$('a[href=\'#collapse-shipping-address\']').trigger('click');
    
    							$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_shipping_method; ?>');
    							$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_payment_method; ?>');
    							$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_confirm; ?>');
                            },
                            error: function(xhr, ajaxOptions, thrownError) {
                                alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
                            }
                        });
                    }
                    <?php } else { ?>
                    $.ajax({
                        url: 'index.php?route=checkout/payment_method',
                        dataType: 'html',
                        complete: function() {
                            $('#button-guest').button('reset');
                        },
                        success: function(html) {
                            $('#collapse-payment-method .panel-body').html(html);
    
    						$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_payment_method; ?> <i class="fa fa-caret-down"></i></a>');
    
    						$('a[href=\'#collapse-payment-method\']').trigger('click');
    
    						$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_confirm; ?>');
                        },
                        error: function(xhr, ajaxOptions, thrownError) {
                            alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
                        }
                    });
                    <?php } ?>
                }
            },
            error: function(xhr, ajaxOptions, thrownError) {
                alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
            }
        });
    });
    
    // Guest Shipping
    $(document).delegate('#button-guest-shipping', 'click', function() {
        $.ajax({
            url: 'index.php?route=checkout/guest_shipping/save',
            type: 'post',
            data: $('#collapse-shipping-address input[type=\'text\'], #collapse-shipping-address input[type=\'date\'], #collapse-shipping-address input[type=\'datetime-local\'], #collapse-shipping-address input[type=\'time\'], #collapse-shipping-address input[type=\'password\'], #collapse-shipping-address input[type=\'checkbox\']:checked, #collapse-shipping-address input[type=\'radio\']:checked, #collapse-shipping-address textarea, #collapse-shipping-address select'),
            dataType: 'json',
            beforeSend: function() {
            	$('#button-guest-shipping').button('loading');
    		},
            success: function(json) {
                $('.alert, .text-danger').remove();
    
                if (json['redirect']) {
                    location = json['redirect'];
                } else if (json['error']) {
                    $('#button-guest-shipping').button('reset');
    
                    if (json['error']['warning']) {
                        $('#collapse-shipping-address .panel-body').prepend('<div class="alert alert-danger">' + json['error']['warning'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
                    }
    
    				for (i in json['error']) {
    					var element = $('#input-shipping-' + i.replace('_', '-'));
    
    					if ($(element).parent().hasClass('input-group')) {
    						$(element).parent().after('<div class="text-danger">' + json['error'][i] + '</div>');
    					} else {
    						$(element).after('<div class="text-danger">' + json['error'][i] + '</div>');
    					}
    				}
    
    				// Highlight any found errors
    				$('.text-danger').parent().addClass('has-error');
                } else {
                    $.ajax({
                        url: 'index.php?route=checkout/shipping_method',
                        dataType: 'html',
                        complete: function() {
                            $('#button-guest-shipping').button('reset');
                        },
                        success: function(html) {
                            $('#collapse-shipping-method .panel-body').html(html);
    
    						$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_shipping_method; ?> <i class="fa fa-caret-down"></i>');
    
    						$('a[href=\'#collapse-shipping-method\']').trigger('click');
    
    						$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_payment_method; ?>');
    						$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_confirm; ?>');
                        },
                        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);
            }
        });
    });
    
    $(document).delegate('#button-shipping-method', 'click', function() {
        $.ajax({
            url: 'index.php?route=checkout/shipping_method/save',
            type: 'post',
            data: $('#collapse-shipping-method input[type=\'radio\']:checked, #collapse-shipping-method textarea'),
            dataType: 'json',
            beforeSend: function() {
            	$('#button-shipping-method').button('loading');
    		},
            success: function(json) {
                $('.alert, .text-danger').remove();
    
                if (json['redirect']) {
                    location = json['redirect'];
                } else if (json['error']) {
                    $('#button-shipping-method').button('reset');
    
                    if (json['error']['warning']) {
                        $('#collapse-shipping-method .panel-body').prepend('<div class="alert alert-danger">' + json['error']['warning'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
                    }
                } else {
                    $.ajax({
                        url: 'index.php?route=checkout/payment_method',
                        dataType: 'html',
                        complete: function() {
                            $('#button-shipping-method').button('reset');
                        },
                        success: function(html) {
                            $('#collapse-payment-method .panel-body').html(html);
    
    						$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_payment_method; ?> <i class="fa fa-caret-down"></i></a>');
    
    						$('a[href=\'#collapse-payment-method\']').trigger('click');
    
    						$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_confirm; ?>');
                        },
                        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);
            }
        });
    });
    
    $(document).delegate('#button-payment-method', 'click', function() {
        $.ajax({
            url: 'index.php?route=checkout/payment_method/save',
            type: 'post',
            data: $('#collapse-payment-method input[type=\'radio\']:checked, #collapse-payment-method input[type=\'checkbox\']:checked, #collapse-payment-method textarea'),
            dataType: 'json',
            beforeSend: function() {
             	$('#button-payment-method').button('loading');
    		},
            success: function(json) {
                $('.alert, .text-danger').remove();
    
                if (json['redirect']) {
                    location = json['redirect'];
                } else if (json['error']) {
                    $('#button-payment-method').button('reset');
                    
                    if (json['error']['warning']) {
                        $('#collapse-payment-method .panel-body').prepend('<div class="alert alert-danger">' + json['error']['warning'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
                    }
                } else {
                    $.ajax({
                        url: 'index.php?route=checkout/confirm',
                        dataType: 'html',
                        complete: function() {
                            $('#button-payment-method').button('reset');
                        },
                        success: function(html) {
                            $('#collapse-checkout-confirm .panel-body').html(html);
    
    						$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('<a href="#collapse-checkout-confirm" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_confirm; ?> <i class="fa fa-caret-down"></i></a>');
    
    						$('a[href=\'#collapse-checkout-confirm\']').trigger('click');
    					},
                        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);
            }
        });
    });
    //--></script>
    <?php echo $footer; ?>

     

  11. Всем доброго времени суток. Подскажите пожалуйста где и что подправить, чтобы в языковых файлах (catalog\language\ru-ru\mail) можно было использовать HTML код. Заранее благодарю всех кто поможет. :-) (Opencart 2.3.0.2, шаблон стандартный)

  12. 27.04.2022 в 13:45, buslikdrev сказал:

     

    Устанавливайте нулёвый опенкарт и сравнивайте таблицу и файлы моделей с оригиналом по заказам, где order_id.

    Так же зайдите на страницу событий и посмотрите там дубли. Если есть, то удалите повторы (помню модуль СДЕК любит повторы событий делать).

     

  13. 26.04.2022 в 23:14, buslikdrev сказал:

    Не то скинул - я скинул решение по подсчёту общей цены в админке. Вы скажите в какой момент стали дублироваться заказы? В этом может быть виноват какой-нибудь модуль быстрого оформления или задублировано событие или кэш модуль.

    Ещё может в базе данных кто-то с ключами гулялся.

    В какой момент не могу сказать. Занимался правкой, настройкой. Возможно где-то нечаянно накосячил. Базу данных на прямую не трогал. И прибавление 1 заказ = 106 продажам. Где копать? Что делать?

  14. 26.04.2022 в 12:46, niger сказал:

     

    Посмотрите как это делается - и попробуйте сделать наоборот. 

    Пробовал. Но так как не устанавливал модули для накрутки и вообще не трогал этот файл, то не помогло

×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.