Jump to content
Sign in to follow this  
kolomenec

[FAQ you, или к автору] Меняем вывод товара по умолчани (сетка вместо списка )

Recommended Posts

Всем привет)

Встретился с такой проблемой (

Когда открываешь сайт - далее группа товара- и там список товара вместо сетки(

Искал решение в интернете есть много инфы на тему как это сделать но везде одно и тоже!!!

вот путь файла catalog/view/theme/имя темы/template/product/category.tpl

 

( у меня купленная тема )

 

Если кому не трудно подскажите что именн надо поменять!

 

 

<?php echo $header; ?>
<div id="content">
  <ul class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
        <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
    <?php } ?>
  </ul>
  <div class="clear"></div>
 
<?php echo $column_left; ?>
<?php echo $column_right; ?>

<div class="catContainer">
  <?php echo $content_top; ?>
 
  <?php if ($thumb || $description) { ?>
  <div class="category-info">
    <?php if ($thumb) { //Category Image ?>
        <div class="image"><img src="<?php echo $thumb; ?>" alt="<?php echo $heading_title; ?>" /></div>
    <?php } ?>
    <h1><?php echo $heading_title; //Category Title ?></h1>
    <?php if ($description) { ?>
        <div class="cat-desc">
            <?php echo $description; //Category Description ?>
        </div>
    <?php } ?>
    <div class="clear"></div>
  </div>
  <?php }else{ ?>
      <div class="category-info"><h1><?php echo $heading_title; //Category Title ?></h1> </div>
  <?php } ?>
  <?php if ($categories) { ?>
 
  <div class="category-list">
  <h2><?php echo $text_refine; ?></h2>
    <?php if (count($categories) <= 5) { ?>
    <ul>
      <?php foreach ($categories as $category) { ?>
      <li><span></span><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
      <?php } ?>
    </ul>
    <?php } else { ?>
    <?php for ($i = 1; $i < count($categories);) { ?>
    <ul>
      <?php $j = $i + ceil(count($categories) / 4); ?>
      <?php for (; $i < $j; $i++) { ?>
      <?php if (isset($categories[$i])) { ?>
      <li><span></span><a href="<?php echo $categories[$i]['href']; ?>"><?php echo $categories[$i]['name']; ?></a></li>
      <?php } ?>
      <?php } ?>
    </ul>
    <?php } ?>
    <?php } ?>
  </div>
  <?php } ?>
  <?php if ($products) { ?>
     <div class="product-filter" id="filter">
    <div class="display">
        <strong><?php echo $text_display; ?></strong>
        <ul>
            <li class="list"><a href="javascript:void(0);" title="<?php echo $text_list; ?>"><?php echo $text_list; ?></a></li>
            <li class="grid"><a class="active" href="javascript:void(0);" title="<?php echo $text_grid; ?>"><?php echo $text_grid; ?></a></li>
        </ul>
    </div>
    <div class="limit">
    <strong><?php echo $text_limit; ?></strong>
      <select onchange="location = this.value;">
        <?php foreach ($limits as $limits) { ?>
        <?php if ($limits['value'] == $limit) { ?>
        <option value="<?php echo $limits['href']; ?>#filter" selected="selected"><?php echo $limits['text']; ?></option>
        <?php } else { ?>
        <option value="<?php echo $limits['href']; ?>#filter"><?php echo $limits['text']; ?></option>
        <?php } ?>
        <?php } ?>
      </select>
    </div>
    <div class="sort">
    <strong><?php echo $text_sort; ?></strong>
      <select onchange="location = this.value;">
        <?php foreach ($sorts as $sorts) { ?>
        <?php if ($sorts['value'] == $sort . '-' . $order) { ?>
        <option value="<?php echo $sorts['href']; ?>#filter" selected="selected"><?php echo $sorts['text']; ?></option>
        <?php } else { ?>
        <option value="<?php echo $sorts['href']; ?>#filter"><?php echo $sorts['text']; ?></option>
        <?php } ?>
        <?php } ?>
      </select>
    </div>
     <div class="product-compare">
         <a href="<?php echo $compare; ?>" id="compare_total"><?php echo $text_compare; ?></a>
     </div>
    <div class="clear"></div>
</div>
 
  <div id="cat-products" class="prod-grid">
  <ul>
    <?php $i=0; $pCount = count($products); foreach ($products as $product) : $i++; ?>
    <li>
      <?php if ($product['thumb']): //Get product thumnails ?>
            <div class="image">
                <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a>
                <?php $styles =  $this->config->get('herboptions');//Herbal Module Options  ?>
                    <?php if(!$styles || $styles['promo'] == 'Show') : ?>
                    <?php if($product['special']){ echo "<span class='promo'>" . $this->language->get('text_promo') . "</span>"; }?>
                <?php endif; ?>
            </div>
      <?php endif; ?>
       <div class="prodInfo">
             <div class="prodCatDesc">
                  <div class="name">
                         <h2>
                    <a href="<?php echo $product['href']; ?>">
                        <?php
                            if(strlen($product['name']) > 60){
                                echo mb_substr(strip_tags(html_entity_decode($product['name'], ENT_QUOTES, 'UTF-8')),0,23, 'UTF-8').'...';
                            }else{
                                echo $product['name'];    
                            }
                        ?>
                    </a>
                </h2>
                  </div>
                  
                      <?php if ($product['rating']) { ?>
                         <div class="rating"><img src="catalog/view/theme/herbal/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
                      <?php } ?>
                      
                      <div class="description">
                            <?php echo $product['description']; //Get Product Description ?>
                      </div>
                      
              </div>
              <div class="list-right">
                  <?php if ($product['price']) : //Get product price ?>
                      <div class="price">
                        <?php if (!$product['special']): ?>
                           <p><?php echo $product['price']; ?></p>
                        <?php else: ?>
                            <p><span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span></p>
                        <?php endif; ?>
                      </div>
                  <?php endif; ?>
                  <div class="addTo">
                         <div class="cart"><input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" /></div>
                  </div>
                      <div class="clear"></div>
                  <div class="addCom">
                     <div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><span></span><?php echo $button_wishlist; ?></a></div>
                     <div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');" data-reveal-id="notification"><span></span><?php echo $button_compare; ?></a></div>
                     <div class="clear"></div>
                 </div>
             </div>
      </div>
      <div class="clear"></div>
    </li>
        <?php
                if($i%3==0 && $pCount>3 && $pCount>$i){
                    echo '</ul><ul>';
                }
        ?>
 
    <?php endforeach; ?>
    </ul>
    <div class="clear"></div>
  </div>
  <div class="pagination"><?php echo $pagination; ?></div>
  <?php } ?>
  <?php if (!$categories && !$products) { ?>
  <div class="content no-cat-prod">
       <?php echo $text_empty; ?>
       <div class="buttons">
        <div class="right"><a href="<?php echo $continue; ?>" class="button"><span><?php echo $button_continue; ?></span></a></div>
      </div>
  </div>
 
  <?php } ?>
  </div><?php //End catContainer ?>
  <div class="clear"></div>
</div>
<?php echo $footer; ?>

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
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.