Jump to content
Sign in to follow this  
drtimur

Ошибка в админке

Recommended Posts

Всем доброго времени суток.

opencart 1.5.2 

1. В админке, в журнале ошибок последнее время выходит:

 

PHP Notice:  Undefined variable: seo_h1 in /home/users1/n/nikitichmax/domains/tarzanki.ru/catalog/view/theme/default/template/information/information.tpl on line 8

 

Не могу решить проблему. 

 

Сам файл:

 

<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
 <?php if ($seo_h1) { ?>
   <h1><?php echo $seo_h1; ?></h1>  
   <?php } else { ?>
   <h1><?php echo $heading_title; ?></h1>
   <?php }  ?>
  <div class="box-container">
    <?php echo $description; ?>
    <div class="buttons">
      <div class="right"><a href="<?php echo $continue; ?>" class="button-inf-left"><span><?php echo $button_continue; ?></span></a></div>
    </div>
  </div>
  <?php echo $content_bottom; ?></div>
<?php echo $footer; ?>

 

 2. Как исправить в корзине кнопки применить и удалить, после добавления товара, при просмотре корзины? Сайт tarzanki.ru

Share this post


Link to post
Share on other sites

1) 

<?php if ($seo_h1) { ?>

Замените на

<?php if (isset($seo_h1)) { ?>

Это если нужно просто устранить ошибку

 

2) Смотрите файл catalog/view/theme/название_шаблона/template/checkout/cart.tpl и ищите вот такой код

<td class="quantity"><input type="text" name="quantity[<?php echo $product['key']; ?>]" value="<?php echo $product['quantity']; ?>" size="1" />
               
              <input type="image" src="catalog/view/theme/default/image/update.png" alt="<?php echo $button_update; ?>" title="<?php echo $button_update; ?>" />
               <a href="<?php echo $product['remove']; ?>"><img src="catalog/view/theme/default/image/remove.png" alt="<?php echo $button_remove; ?>" title="<?php echo $button_remove; ?>" /></a></td>

Share this post


Link to post
Share on other sites

Спасибо за помощь, 1 пункт в information.tpl заменил как вы сказали, по 2 пункту в cart.tpl у меня 2 раза пишется <td class= итак далее. Ниже весь мой cart.tpl, скажите пожалуйста, что нужно сделать?

<?php echo $header; ?>
 
<?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <h1><?php echo $heading_title; ?>
    <?php if ($weight) { ?>
     (<?php echo $weight; ?>)
    <?php } ?>
  </h1>
  <?php if ($attention) { ?>
  <div class="attention"><?php echo $attention; ?><img src="catalog/view/theme/theme026/image/remove-small.png" alt="" class="close" /></div>
  <?php } ?>
  <?php if ($success) { ?>
  <div class="success"><?php echo $success; ?><img src="catalog/view/theme/theme026/image/remove-small.png" alt="" class="close" /></div>
  <?php } ?>
  <?php if ($error_warning) { ?>
  <div class="warning"><?php echo $error_warning; ?><img src="catalog/view/theme/theme026/image/remove-small.png" alt="" class="close" /></div>
  <?php } ?>
  <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
    <div class="cart-info">
      <div class="shop-cart">
      <table>
        <thead>
          <tr>
            <td class="image"><?php echo $column_image; ?></td>
            <td class="name"><?php echo $column_name; ?></td>
            <td class="model"><?php echo $column_model; ?></td>
            <td class="quantity"><?php echo $column_quantity; ?></td>
            <td class="price"><?php echo $column_price; ?></td>
            <td class="total" style="border-right:none;"><?php echo $column_total; ?></td>
          </tr>
        </thead>
        <tbody>
          <?php foreach ($products as $product) { ?>
          <tr>
            <td class="image"><?php if ($product['thumb']) { ?>
              <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" /></a>
              <?php } ?></td>
            <td class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a>
              <?php if (!$product['stock']) { ?>
              <span class="stock">***</span>
              <?php } ?>
              <div>
                <?php foreach ($product['option'] as $option) { ?>
                - <small><?php echo $option['name']; ?>: <?php echo $option['value']; ?></small><br />
                <?php } ?>
              </div>
              <?php if ($product['reward']) { ?>
              <small><?php echo $product['reward']; ?></small>
              <?php } ?></td>
            <td class="model"><?php echo $product['model']; ?></td>
            <td class="quantity"><input type="text" name="quantity[<?php echo $product['key']; ?>]" value="<?php echo $product['quantity']; ?>" size="1" />
              
              <div class="wrapper mt5">
              <input type="image" src="catalog/view/theme/theme026/image/update.png" alt="<?php echo $button_update; ?>" title="<?php echo $button_update; ?>" />
               <a href="<?php echo $product['remove']; ?>"><img src="catalog/view/theme/theme026/image/remove.png" alt="<?php echo $button_remove; ?>" title="<?php echo $button_remove; ?>" /></a>
              </div>
              </td>
            <td class="price"><?php echo $product['price']; ?></td>
            <td class="total" style="border-right:0;"><?php echo $product['total']; ?></td>
          </tr>
          <?php } ?>
          <?php foreach ($vouchers as $vouchers) { ?>
          <tr>
            <td class="image"></td>
            <td class="name"><?php echo $vouchers['description']; ?></td>
            <td class="model"></td>
            <td class="quantity"><input type="text" name="" value="1" size="1" disabled="disabled" />
               <a href="<?php echo $vouchers['remove']; ?>"><img src="catalog/view/theme/theme026/image/remove.png" alt="<?php echo $text_remove; ?>" title="<?php echo $button_remove; ?>" /></a></td>
            <td class="price"><?php echo $vouchers['amount']; ?></td>
            <td class="total"><?php echo $vouchers['amount']; ?></td>
          </tr>
          <?php } ?>
        </tbody>
      </table>
          </div>
    </div>
  </form>
  <?php if ($coupon_status || $voucher_status || $reward_status || $shipping_status) { ?>
   <h2><?php echo $text_next; ?></h2>
  <div class="content shop-cart-content">
   
    <p><?php echo $text_next_choice; ?></p>
    <table class="radio">
      <?php if ($coupon_status) { ?>
      <tr class="highlight">
        <td><input type="radio" name="next" value="coupon" id="use_coupon" /></td>
        <td><label for="use_coupon"><?php echo $text_use_coupon; ?></label></td>
      </tr>
      <?php } ?>
      <?php if ($voucher_status) { ?>
      <tr class="highlight">
        <td><input type="radio" name="next" value="voucher" id="use_voucher" /></td>
        <td><label for="use_voucher"><?php echo $text_use_voucher; ?></label></td>
      </tr>
      <?php } ?>
      <?php if ($reward_status) { ?>
      <tr class="highlight">
        <td><input type="radio" name="next" value="reward" id="use_reward" /></td>
        <td><label for="use_reward"><?php echo $text_use_reward; ?></label></td>
      </tr>
      <?php } ?>
      <?php if ($shipping_status) { ?>
      <tr class="highlight">
        <td><input type="radio" name="next" value="shipping" id="shipping_estimate" /></td>
        <td><label for="shipping_estimate"><?php echo $text_shipping_estimate; ?></label></td>
      </tr>
      <?php } ?>
    </table>
  </div>
  <div class="cart-module">
    <div id="coupon" class="content">
      <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="coup">
        <?php echo $entry_coupon; ?> 
        <input type="text" name="coupon" value="<?php echo $coupon; ?>" />
        <input type="hidden" name="next" value="coupon" />
         
        <a onclick="$('#coup').submit();" class="button"><span><?php echo $button_coupon; ?></span></a>
      </form>
    </div>
    <div id="voucher" class="content">
      <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="gift">
        <?php echo $entry_voucher; ?> 
        <input type="text" name="voucher" value="<?php echo $voucher; ?>" />
        <input type="hidden" name="next" value="voucher" />
         
        <a onclick="$('#gift').submit();" class="button"><span><?php echo $button_voucher; ?></span></a>
      </form>
    </div>
    <div id="reward" class="content">
      <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="rew">
        <?php echo $entry_reward; ?> 
        <input type="text" name="reward" value="<?php echo $reward; ?>" />
        <input type="hidden" name="next" value="reward" />
         
        <a onclick="$('#rew').submit();" class="button"><span><?php echo $button_reward; ?></span></a>
      </form>
    </div>
    <div id="shipping" class="content">
      <p><?php echo $text_shipping_detail; ?></p>
      <table>
        <tr>
          <td><span class="required">*</span> <?php echo $entry_country; ?></td>
          <td><select name="country_id" onchange="$('select[name=\'zone_id\']').load('index.php?route=checkout/cart/zone&country_id=' + this.value + '&zone_id=<?php echo $zone_id; ?>');">
              <option value=""><?php echo $text_select; ?></option>
              <?php foreach ($countries as $country) { ?>
              <?php if ($country['country_id'] == $country_id) { ?>
              <option value="<?php echo $country['country_id']; ?>" selected="selected"><?php echo $country['name']; ?></option>
              <?php } else { ?>
              <option value="<?php echo $country['country_id']; ?>"><?php echo $country['name']; ?></option>
              <?php } ?>
              <?php } ?>
            </select></td>
        </tr>
        <tr>
          <td><span class="required">*</span> <?php echo $entry_zone; ?></td>
          <td><select name="zone_id">
            </select></td>
        </tr>
        <tr>
          <td><span class="required">*</span> <?php echo $entry_postcode; ?></td>
          <td><input type="text" name="postcode" value="<?php echo $postcode; ?>" /></td>
        </tr>
      </table>
      <a id="button-quote" class="button"><span><?php echo $button_quote; ?></span></a>
    </div>
    <?php } ?>
  </div>
  <div class="cart-bottom">
    <div class="cart-total">
    <table id="total">
      <?php $count =0; foreach ($totals as $total) { $count +=1; if ($total == end($totals)) {$a='last';} else {$a='';} ?>
      <tr class="row-table-<?php echo $count; ?>">
        <td class="right cart-total-name <?php echo $a;?>" ><b><?php echo $total['title']; ?>:</b></td>
        <td class="right cart-total1 <?php echo $a;?>"><?php echo $total['text']; ?></td>
      </tr>
      <?php } ?>
    </table>
  </div>
    <div class="buttons">
    <div class="right"><a href="<?php echo $checkout; ?>" class="button"><span><?php echo $button_checkout; ?></span></a></div>
    <div class="center"><a href="<?php echo $continue; ?>" class="button"><span><?php echo $button_shopping; ?></span></a></div>
  </div>
  </div>
  <?php echo $content_bottom; ?></div>
<script type="text/javascript"><!--
$('input[name=\'next\']').bind('change', function() {
$('.cart-module > div').hide();
 
$('#' + this.value).show();
});
 
<?php if ($next == 'coupon') { ?>
$('#use_coupon').trigger('click');
<?php } ?>
<?php if ($next == 'voucher') { ?>
$('#use_voucher').trigger('click');
<?php } ?>
<?php if ($next == 'reward') { ?>
$('#use_reward').trigger('click');
<?php } ?>
<?php if ($next == 'shipping') { ?>
$('#shipping_estimate').trigger('click');
<?php } ?>
//--></script>
<?php if ($shipping_status) { ?>
<script type="text/javascript"><!--
$('#button-quote').live('click', function() {
$.ajax({
url: 'index.php?route=checkout/cart/quote',
type: 'post',
data: 'country_id=' + $('select[name=\'country_id\']').val() + '&zone_id=' + $('select[name=\'zone_id\']').val() + '&postcode=' + encodeURIComponent($('input[name=\'postcode\']').val()),
dataType: 'json',
beforeSend: function() {
$('#button-quote').attr('disabled', true);
$('#button-quote').after('<span class="wait"> <img src="catalog/view/theme/theme026/image/loading.gif" alt="" /></span>');
},
complete: function() {
$('#button-quote').attr('disabled', false);
$('.wait').remove();
},
success: function(json) {
$('.success, .warning, .attention, .error').remove();
 
if (json['error']) {
if (json['error']['warning']) {
$('#notification').html('<div class="warning" style="display: none;">' + json['error']['warning'] + '<img src="catalog/view/theme/theme026/image/close.png" alt="" class="close" /></div>');
 
$('.warning').fadeIn('slow');
 
$('html, body').animate({ scrollTop: 0 }, 'slow'); 
}
 
if (json['error']['country']) {
$('select[name=\'country_id\']').after('<span class="error">' + json['error']['country'] + '</span>');
}
 
if (json['error']['zone']) {
$('select[name=\'zone_id\']').after('<span class="error">' + json['error']['zone'] + '</span>');
}
 
if (json['error']['postcode']) {
$('input[name=\'postcode\']').after('<span class="error">' + json['error']['postcode'] + '</span>');
}
}
 
if (json['shipping_method']) {
html  = '<h2><?php echo $text_shipping_method; ?></h2>';
html += '<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">';
html += '  <table class="radio">';
 
for (i in json['shipping_method']) {
html += '<tr>';
html += '  <td colspan="3"><b>' + json['shipping_method'][i]['title'] + '</b></td>';
html += '</tr>';
 
if (!json['shipping_method'][i]['error']) {
for (j in json['shipping_method'][i]['quote']) {
html += '<tr class="highlight">';
 
if (json['shipping_method'][i]['quote'][j]['code'] == '<?php echo $shipping_method; ?>') {
html += '<td><input type="radio" name="shipping_method" value="' + json['shipping_method'][i]['quote'][j]['code'] + '" id="' + json['shipping_method'][i]['quote'][j]['code'] + '" checked="checked" /></td>';
} else {
html += '<td><input type="radio" name="shipping_method" value="' + json['shipping_method'][i]['quote'][j]['code'] + '" id="' + json['shipping_method'][i]['quote'][j]['code'] + '" /></td>';
}
 
html += '  <td><label for="' + json['shipping_method'][i]['quote'][j]['code'] + '">' + json['shipping_method'][i]['quote'][j]['title'] + '</label></td>';
html += '  <td style="text-align: right;"><label for="' + json['shipping_method'][i]['quote'][j]['code'] + '">' + json['shipping_method'][i]['quote'][j]['text'] + '</label></td>';
html += '</tr>';
}
} else {
html += '<tr>';
html += '  <td colspan="3"><div class="error">' + json['shipping_method'][i]['error'] + '</div></td>';
html += '</tr>';
}
}
 
html += '  </table>';
html += '  <br />';
html += '  <input type="hidden" name="next" value="shipping" />';
html += '  <input type="submit" value="<?php echo $button_shipping; ?>" class="button" />';
html += '</form>';
 
$.colorbox({
overlayClose: true,
opacity: 0.5,
width: '600px',
height: '400px',
href: false,
html: html
});
}
}
});
});
//--></script> 
<script type="text/javascript"><!--
$('select[name=\'zone_id\']').load('index.php?route=checkout/cart/zone&country_id=<?php echo $country_id; ?>&zone_id=<?php echo $zone_id; ?>');
//--></script>
<?php } ?>
<?php echo $footer; ?>

Edited by drtimur

Share this post


Link to post
Share on other sites

Ищите

<td class="quantity"><input type="text" name="quantity[<?php echo $product['key']; ?>]" value="<?php echo $product['quantity']; ?>" size="1" />
              
              <div class="wrapper mt5">
              <input type="image" src="catalog/view/theme/theme026/image/update.png" alt="<?php echo $button_update; ?>" title="<?php echo $button_update; ?>" />
               <a href="<?php echo $product['remove']; ?>"><img src="catalog/view/theme/theme026/image/remove.png" alt="<?php echo $button_remove; ?>" title="<?php echo $button_remove; ?>" /></a>
              </div>
              </td>

Это приблизительно с 57 строки

 

P.S. когда публикуете исходник пользуйтесь тегом "код"!

Share this post


Link to post
Share on other sites

Я очень извиняюсь, я не спец, сайт мне сделали, а дорабатываю я сам, как могу. Мне с с 57 строки тоже отрывок поменять, на который вы выше пишите? 57 и 63 строка начинаются одинаково, по моему 63 больше похожа на вашу?

<td class="quantity"><input type="text" name="" value="1" size="1" disabled="disabled" />
               <a href="<?php echo $vouchers['remove']; ?>"><img src="catalog/view/theme/theme026/image/remove.png" alt="<?php echo $text_remove; ?>" title="<?php echo $button_remove; ?>" /></a></td>

Share this post


Link to post
Share on other sites

Поясните подробнее 2-й пункт, что нужно сделать с кнопками? Поправить изображения?

Share this post


Link to post
Share on other sites

Поясните подробнее 2-й пункт, что нужно сделать с кнопками? Поправить изображения?

Да у меня они не высвечиваются нормально, только наводишь когда на них,появляются надписи.

Спасибо огромное за 1 пункт!!! Проверял админку, журнал ошибок, ошибок нет!

Share this post


Link to post
Share on other sites

Да у меня они не высвечиваются нормально, только наводишь когда на них,появляются надписи.

 

Извините, но это пусть уже исправляюте те, кто вам делал сайт. Это их недочет.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.