Jump to content
Sign in to follow this  
robotwerder

снова текст в категории

Recommended Posts

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

Вопрос в том чтобы текст в категории опустить ниже товаров.

 

Ниже привожу код category.tpl , ковырял ковырял , но не осилил. Заранее благодарю за помощь.

<?php echo $header; ?>
<div class="container">
    
  <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-8'; ?>
    <?php } else { ?>
    <?php $class = 'col-sm-8'; ?>
    <?php } ?>
    <div id="content" class="<?php echo $class; ?>"><?php echo $content_top; ?>
    <?php require("catalog/view/theme/sharberi/template/common/breadcrumbs.tpl")?>
    
      <h1><?php echo $heading_title; ?></h1>
	 
      <?php if(!empty($description)):?>
      <div class="row">
        <?php if ($description) { ?>
        <div class="col-sm-12"><?php echo $description; ?></div>
        <?php } ?>
      </div>
      <hr>
      <?php endif; ?>
      <?php if ($categories) { ?>
      <div class="row">
        <div  class="col-lg-12">
            <ul class="list_item">
                <?php foreach ($categories as $category) { ?>
                <li>
                    <div class="img_box">
                        <a href="<?php echo $category['href']; ?>"><img  src="<?php echo $category['thumb']; ?>"></a>
                    </div>
                    <span class="name"><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></span>
                </li>	
                <?php } ?>
            </ul>
        </div>
      </div> 
      <?php } ?> 
      <?php if ($products) { ?>
      <!--
      <p><a href="<?php echo $compare; ?>" id="compare-total"><?php echo $text_compare; ?></a></p>
      -->
      <div class="row">
        <div class="col-md-4">
            <div class="btn-group hidden-xs" style="display: none">
            <button type="button" id="list-view" class="btn btn-default" data-toggle="tooltip" title="<?php echo $button_list; ?>"><i class="fa fa-th-list"></i></button>
            <button type="button" id="grid-view" class="btn btn-default" data-toggle="tooltip" title="<?php echo $button_grid; ?>"><i class="fa fa-th"></i></button>
          </div>
        </div>
        <div class="col-md-2 text-right">
          <label class="control-label" for="input-sort"><?php echo $text_sort; ?></label>
        </div>
        <div class="col-md-3 text-right">
          <select id="input-sort" class="form-control" onchange="location = this.value;">
            <?php foreach ($sorts as $sorts) { ?>
            <?php if ($sorts['value'] == $sort . '-' . $order) { ?>
            <option value="<?php echo $sorts['href']; ?>" selected="selected"><?php echo $sorts['text']; ?></option>
            <?php } else { ?>
            <option value="<?php echo $sorts['href']; ?>"><?php echo $sorts['text']; ?></option>
            <?php } ?>
            <?php } ?>
          </select>
        </div>
        <div class="col-md-1 text-right">
          <label class="control-label" for="input-limit"><?php echo $text_limit; ?></label>
        </div>
        <div class="col-md-2 text-right">
          <select id="input-limit" class="form-control" onchange="location = this.value;">
            <?php foreach ($limits as $limits) { ?>
            <?php if ($limits['value'] == $limit) { ?>
            <option value="<?php echo $limits['href']; ?>" selected="selected"><?php echo $limits['text']; ?></option>
            <?php } else { ?>
            <option value="<?php echo $limits['href']; ?>"><?php echo $limits['text']; ?></option>
            <?php } ?>
            <?php } ?>
          </select>
        </div>
      </div>
      <br />
      <div class="row">
          <div class="col-lg-12">
              <ul class="list_item">
              <?php foreach ($products as $product) : ?>
              <li>
                <div class="img_box"><a href="<?php echo $product['href']; ?>" ><img alt="<?php echo htmlspecialchars($product['name'],ENT_QUOTES); ?>" src="<?php echo $product['thumb']; ?>"></a></div>
		<span class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></span>
		<span class="name">Артикул: <?php echo $product['sku']; ?></span>	                
                   <span class="price">
                    <?php if ($product['price']) { ?>
                    
                    <?php if($product['zakaz'] != 1):?>
                    <?php if (!$product['special']) { ?>
                    <?php echo $product['price']; ?>
                    <?php } else { ?>
                    <?php echo $product['special']; ?>
                    <?php } ?>
                    <?php endif;?>
                    <?php if($product['zakaz'] == 1):?>
                    <a class="buy" href="/order?item=<?php echo $product['sku']; ?> - <?php echo htmlspecialchars($product['name'],ENT_QUOTES); ?>" >заказать</a>
                    <?php else: ?>
                    <a class="buy" href="#buy" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>'); return false">купить</a>
                    <?php endif;?>
                   </span>                
                <?php } ?>
		</li>
              <?php endforeach?>
              </ul>
          </div>
      </div>
      <div class="row">
        <div class="col-sm-6 text-left"><?php echo $pagination; ?></div>
        <div class="col-sm-6 text-right"><?php echo $results; ?></div>
      </div>
      <?php } ?>
      <?php if (!$categories && !$products) { ?>
      <p><?php echo $text_empty; ?></p>
      <div class="buttons">
        <div class="pull-right"><a href="<?php echo $continue; ?>" class="btn btn-primary"><?php echo $button_continue; ?></a></div>
      </div>
      <?php } ?>
	  
	  
	  
      <?php echo $content_bottom; ?></div>
    <?php echo $column_right; ?></div>
</div>
<?php echo $footer; ?>

Share this post


Link to post
Share on other sites

<?php if(!empty($description)):?>

<div class="row">

<?php if ($description) { ?>

<div class="col-sm-12"><?php echo $description; ?></div>

<?php } ?>

Этот код вырежи и поставь перед проверкой на пустоту категорий и товаров

Перед этим:

<?php if (!$categories && !$products) { ?>

<p><?php echo $text_empty; ?></p>

<div class="buttons">

<div class="pull-right"><a href="<?php echo $continue; ?>" class="btn btn-primary"><?php echo $button_continue; ?></a></div>

</div>

<?php } ?>

И будет счастье

Edited by Fedka
  • +1 1

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.