Jump to content
Sign in to follow this  
Serg5

[Решено?..] Как спрятать тег h1?

Recommended Posts

Вечер добрый!

У меня тег h1 дублируется при переходе на следующею страницу.

Я пытался его спрятать вот так:

if ($page == 1) {				
			if ($category_info['image']) {
				$this->data['thumb'] = $this->model_tool_image->resize($category_info['image'], $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'));
			} else {
				$this->data['thumb'] = '';
			}
			} else {
			$this->data['thumb'] = '';
			}						
			if ($page == 1) {
			$this->data['seo_h1'] = html_entity_decode($category_info['seo_h1'], ENT_QUOTES, 'UTF-8');
			} else {
			$this->data['seo_h1'] = "";
			}
			
			//$this->data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8');
						if ($page == 1) {
			$this->data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8');
			} else {
			$this->data['description'] = "";
			}
			

Но не получилась.

У меня тег или на всех страницах или не на одной.

В общем, помогите пожалуйста

 

Share this post


Link to post
Share on other sites

Там есть еще одна обработка, связанная с heading_title, её и регулируйте, так как именно heading_title выводится в шаблон и обертывается тегами h1

Share this post


Link to post
Share on other sites

Там есть еще одна обработка, связанная с heading_title, её и регулируйте, так как именно heading_title выводится в шаблон и обертывается тегами h1

Та, я уже что тока не пробовал. хедингам пробовал не помогло .

Share this post


Link to post
Share on other sites

В ocStore, в контроллере категории есть строки:

 

if ($category_info['seo_h1']) {
$this->data['heading_title'] = $category_info['seo_h1'];
} else {
$this->data['heading_title'] = $category_info['name'];
}
 
попробуйте их заменить на:
 
if ($page == 1) {
   if ($category_info['seo_h1']) {
      $this->data['heading_title'] = $category_info['seo_h1'];
   } else {
      $this->data['heading_title'] = $category_info['name'];
   }

} else {

$this->data['heading_title'] = '';
}
 
а ваши модификации уберите.

Share this post


Link to post
Share on other sites

 

В ocStore, в контроллере категории есть строки:

 

if ($category_info['seo_h1']) {
$this->data['heading_title'] = $category_info['seo_h1'];
} else {
$this->data['heading_title'] = $category_info['name'];
}
 
попробуйте их заменить на:
 
if ($page == 1) {
   if ($category_info['seo_h1']) {
      $this->data['heading_title'] = $category_info['seo_h1'];
   } else {
      $this->data['heading_title'] = $category_info['name'];
   }

} else {

$this->data['heading_title'] = '';
}
 
а ваши модификации уберите.

 

Сделал

if ($page == 1) {
        if ($category_info['seo_h1']) {
             $this->data['heading_title'] = $category_info['seo_h1'];
            } else {
            $this->data['heading_title'] = $category_info['name'];
            }
            } else {
            $this->data['heading_title'] = '';
            }
			
			$this->data['heading_title'] = $category_info['seo_h1'];

Не помогло, все равно дублируется.  :cry:

Может юрл в личку вам скинуть посмотрите?

Share this post


Link to post
Share on other sites

Давайте, и фтп тогда тоже.

Share this post


Link to post
Share on other sites

Давайте, и фтп тогда тоже.

Спасибо,помогло  :eek:  :eek:

Оказывается в низу кода дублировался h1 и наверно по этому он не хотел убираться с других страниц.

 

Еще сразу вопросик задам вы человек знающий.

 

Как передвинуть в коде для робота описание странице выше? У меня само описание стоит в низу, мне надо чтоб оно там и оставалось, но в коде надо чтоб описание было по выше.

Share this post


Link to post
Share on other sites
Тут нужно наоборот плясать. Описание должно быть в коде наверху, а для людей его переносить вниз. Для этого:

 

Создать в желаемом месте еще один блок:


<div class="category-info newmesto"></div>

 

Старому указать класс: category-info oldmesto


 

добавить в конец файла:

<script type="text/javascript"><!--

$(document).ready(function(){

$('.newmesto').append( $('.category-info.oldmesto>p') );

});

//--></script>

Share this post


Link to post
Share on other sites

Это все делать в своей теме, категории.тпл?

Share this post


Link to post
Share on other sites

Да, там.

Share this post


Link to post
Share on other sites

 

Тут нужно наоборот плясать. Описание должно быть в коде наверху, а для людей его переносить вниз. Для этого:
 
Создать в желаемом месте еще один блок:
<div class="category-info newmesto"></div>
 
Старому указать класс: category-info oldmesto
 
добавить в конец файла:
<script type="text/javascript"><!--
$(document).ready(function(){
$('.newmesto').append( $('.category-info.oldmesto>p') );
});
//--></script>

 

Что та не получилось.

 Скидываю вам код (может не то сделал):

<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<section id="content" class="columns"><?php echo $content_top; ?>
  <ul class="breadcrumbs">
  <div class="category-info newmesto"></div>
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
    <?php } ?>
  </ul>
  
<?php if($this->config->get('oxy_category_subcategories_status')== 1) { ?>  
<?php if($this->config->get('oxy_category_subcategories_style')== 0) { ?>
  <?php if ($categories) { ?>
  <h4><?php echo $text_refine; ?></h4>
  <div class="category-list">
  <?php foreach ($categories as $category) { ?>
			<div class="two mobile-two columns">
				<?php if ($category['thumb']) { ?>
				<div class="image"><a href="<?php echo $category['href']; ?>"><img src="<?php echo $category['thumb']; ?>" alt="<?php echo $category['name']; ?>" /></a></div>
                <?php } else { ?>
                <div class="image"><a href="<?php echo $category['href']; ?>"><img src="catalog/view/theme/oxy/image/no_image-100x100.png" alt="<?php echo $category['name']; ?>" /></a></div>
				<?php } ?>
				<div class="name subcatname"><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></div>
			</div>
  <?php } ?>          
  </div>
  <?php } ?>
<?php } ?>  
<?php if($this->config->get('oxy_category_subcategories_style')== 1) { ?>  
  <?php if ($categories) { ?>
  <h4><?php echo $text_refine; ?></h4>
  <div class="category-list">
    <?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 = 0; $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 } ?>
<?php } ?>  
    
  <?php if ($products) { ?>
  <div class="product-filter">
    <div class="display"><span><?php echo $text_display; ?></span> <img src="catalog/view/theme/oxy/image/icon_list.png" alt="<?php echo $text_list; ?>" title="<?php echo $text_list; ?>" /> <a onclick="display('grid');"><img src="catalog/view/theme/oxy/image/icon_grid.png" alt="<?php echo $text_grid; ?>" title="<?php echo $text_grid; ?>" /></a></div>
    <div class="product-compare"><a href="<?php echo $compare; ?>" id="compare-total"><?php echo $text_compare; ?></a></div>    
    <div class="limit"><?php echo $text_limit; ?>
      <select 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 class="sort"><?php echo $text_sort; ?>
      <select 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>

  <div class="product-list">
    <?php foreach ($products as $product) { ?>
    <div class="<?php echo $this->config->get('oxy_layout_pb_noc'); ?> mobile-two columns">
     
      <?php if ($product['thumb_swap']) { ?>
      <div class="image">
      <?php if (($product['special'])&&($this->config->get('oxy_category_sale_badge_status') == 1)) { ?><span class="sale-icon"><?php echo $text_sale; ?></span><?php } ?> 
      <div class="flybar">     
      <a onclick="addToWishList('<?php echo $product['product_id']; ?>');" class="wishlist"><div><?php echo $button_wishlist; ?></div></a>
      <a onclick="addToWishList('<?php echo $product['product_id']; ?>');" class="wishlist-tip" title="<?php echo $button_wishlist; ?>"><div><?php echo $button_wishlist; ?></div></a>
      <a onclick="addToCompare('<?php echo $product['product_id']; ?>');" class="compare"><div><?php echo $button_compare; ?></div></a>
      <a onclick="addToCompare('<?php echo $product['product_id']; ?>');" class="compare-tip" title="<?php echo $button_compare; ?>"><div><?php echo $button_compare; ?></div></a>
      </div>
      <a href="<?php echo $product['href']; ?>"><img oversrc="<?php echo $product['thumb_swap']; ?>" src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a>
      </div>
      <?php } else {?>
      <div class="image">
      <?php if (($product['special'])&&($this->config->get('oxy_category_sale_badge_status') == 1)) { ?><span class="sale-icon"><?php echo $text_sale; ?></span><?php } ?> 
      <div class="flybar">     
      <a onclick="addToWishList('<?php echo $product['product_id']; ?>');" class="wishlist"><div><?php echo $button_wishlist; ?></div></a>
      <a onclick="addToWishList('<?php echo $product['product_id']; ?>');" class="wishlist-tip" title="<?php echo $button_wishlist; ?>"><div><?php echo $button_wishlist; ?></div></a>
      <a onclick="addToCompare('<?php echo $product['product_id']; ?>');" class="compare"><div><?php echo $button_compare; ?></div></a>
      <a onclick="addToCompare('<?php echo $product['product_id']; ?>');" class="compare-tip" title="<?php echo $button_compare; ?>"><div><?php echo $button_compare; ?></div></a>  
      </div>
      <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a>
      </div>
      <?php } ?> 
      <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
      <div class="product_box_brand"><?php if ($product['brand']) { ?><span><?php echo $text_manufacturer; ?></span> <a href="<?php echo $product['brand_url']; ?>"><?php echo $product['brand']; ?></a><?php } ?></div>
      <?php if ($product['rating']) { ?>
      <div class="rating"><img src="catalog/view/theme/oxy/image/stars/stars<?php echo $this->config->get('oxy_mid_prod_stars_color'); ?>-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
      <?php } ?>
      <div class="description"><?php echo $product['description']; ?></div>
      <?php if ($product['price']) { ?>
      <div class="price">
        <?php if (!$product['special']) { ?>
        <?php echo $product['price']; ?>
        <?php } else { ?>
        <span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span> 
        <?php } ?>
      </div>
      <?php } ?>
      <div class="cart">
        <input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" />
      </div>
      <div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><?php echo $button_wishlist; ?></a></div>
      <div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');"><?php echo $button_compare; ?></a></div>
    </div>
    <?php } ?>
  </div>
  <div class="pagination"><?php echo $pagination; ?></div>
  <?php } ?>
  
     <h1><?php echo $heading_title; if (isset($_GET['page'])) { echo ", ". ((int) $_GET['page'])." page";} ?></h1>
	
  <?php if ($thumb || $description) { ?>
  <div class="category-info">
    <?php if ($thumb) { ?>
    <div class="image"><img src="<?php echo $thumb; ?>" alt="<?php echo $heading_title; ?>" /></div>
    <?php } ?>
    <?php if ($description) { ?>
    <?php echo $description; ?>
    <?php } ?>
  </div>
  <?php } ?>
   
    <?php if (!$categories && !$products) { ?>
  <div class="category-info oldmesto"><?php echo $text_empty; ?></div>
  <div class="buttons">
    <div class="right"><a href="<?php echo $continue; ?>" class="button"><?php echo $button_continue; ?></a></div>
  </div>
  <?php } ?>
  <?php echo $content_bottom; ?></section>
    
<script type="text/javascript"><!--
function display(view) {
	if (view == 'list') {
		$('.product-grid').attr('class', 'product-list');
		
		$('.product-list > div').each(function(index, element) {

			html = '<div class="row">';
			
			var image = $(element).find('.image').html();
			
			if (image != null) { 
				html += '<div class="image">' + image + '</div>';
			}
			
			html += '<div class="six columns">';
			html += '  <div class="name">' + $(element).find('.name').html() + '</div>';
			html += '<div class="product_box_brand">' + $(element).find('.product_box_brand').html() + '</div>';
			
			var rating = $(element).find('.rating').html();
			
			if (rating != null) {
				html += '<div class="rating">' + rating + '</div>';
			}	
			
			html += '  <div class="description">' + $(element).find('.description').html() + '</div>';	
			
			html += '</div>';	
			
			html += '<div class="three columns">';
				
			var price = $(element).find('.price').html();
			
			if (price != null) {
				html += '<div class="price">' + price  + '</div>';
				html += '  <div class="cart">' + $(element).find('.cart').html() + '</div>';
			}				
			
			html += '</div>';			

			html += '</div>';
						
			$(element).html(html);
		});		
		
		$('.display').html('<span><?php echo $text_display; ?></span> <img src="catalog/view/theme/oxy/image/icon_list.png" alt="<?php echo $text_list; ?>" title="<?php echo $text_list; ?>" /><a onclick="display(\'grid\');"> <img src="catalog/view/theme/oxy/image/icon_grid.png" alt="<?php echo $text_grid; ?>" title="<?php echo $text_grid; ?>" /></a>');
		
		$.totalStorage('display', 'list'); 
	} else {
		$('.product-list').attr('class', 'product-grid');
		
		$('.product-grid > div').each(function(index, element) {
			html = '';
			
			var image = $(element).find('.image').html();
			
			if (image != null) {
				html += '<div class="image">' + image + '</div>';
			}
			
			html += '<div class="name">' + $(element).find('.name').html() + '</div>';
			html += '<div class="product_box_brand">' + $(element).find('.product_box_brand').html() + '</div>';
			
			var rating = $(element).find('.rating').html();
			
			if (rating != null) {
				html += '<div class="rating">' + rating + '</div>';
			}	
			
			html += '<div class="description">' + $(element).find('.description').html() + '</div>';
			
			var price = $(element).find('.price').html();
			
			if (price != null) {
				html += '<div class="price">' + price  + '</div>';
			}
						
			html += '<div class="cart">' + $(element).find('.cart').html() + '</div>';
			
			$(element).html(html);
		});	
					
			$('.display').html('<span><?php echo $text_display; ?></span> <img src="catalog/view/theme/oxy/image/icon_list.png" alt="<?php echo $text_list; ?>" title="<?php echo $text_list; ?>" onclick="display(\'list\');"/> <img src="catalog/view/theme/oxy/image/icon_grid.png" alt="<?php echo $text_grid; ?>" title="<?php echo $text_grid; ?>"/><a onclick="display(\'list\');">');	
		
		$.totalStorage('display', 'grid');
	}
}

view = $.totalStorage('display');

if (view) {
	display(view);
} else {
	display('<?php echo $this->config->get('oxy_category_prod_display'); ?>');
}
//--></script> 
<?php echo $footer; ?>
<script type="text/javascript"><!--
$(document).ready(function(){
$('.newmesto').append( $('.category-info.oldmesto>p') );
});
//--></script>

Share this post


Link to post
Share on other sites

Чуть-чуть не так, вот готовый файл, еще внес правку для надежности скрипта.

<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<section id="content" class="columns"><?php echo $content_top; ?>
  <ul class="breadcrumbs">
  <div class="category-info oldmesto">
  <div class="catdescript">
  <?php if ($description) { ?>
    <?php echo $description; ?>
  <?php } ?>
  </div>
  </div>
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
    <?php } ?>
  </ul>
  
<?php if($this->config->get('oxy_category_subcategories_status')== 1) { ?>  
<?php if($this->config->get('oxy_category_subcategories_style')== 0) { ?>
  <?php if ($categories) { ?>
  <h4><?php echo $text_refine; ?></h4>
  <div class="category-list">
  <?php foreach ($categories as $category) { ?>
			<div class="two mobile-two columns">
				<?php if ($category['thumb']) { ?>
				<div class="image"><a href="<?php echo $category['href']; ?>"><img src="<?php echo $category['thumb']; ?>" alt="<?php echo $category['name']; ?>" /></a></div>
                <?php } else { ?>
                <div class="image"><a href="<?php echo $category['href']; ?>"><img src="catalog/view/theme/oxy/image/no_image-100x100.png" alt="<?php echo $category['name']; ?>" /></a></div>
				<?php } ?>
				<div class="name subcatname"><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></div>
			</div>
  <?php } ?>          
  </div>
  <?php } ?>
<?php } ?>  
<?php if($this->config->get('oxy_category_subcategories_style')== 1) { ?>  
  <?php if ($categories) { ?>
  <h4><?php echo $text_refine; ?></h4>
  <div class="category-list">
    <?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 = 0; $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 } ?>
<?php } ?>
  <?php if ($products) { ?>
  <div class="product-filter">
    <div class="display"><span><?php echo $text_display; ?></span> <img src="catalog/view/theme/oxy/image/icon_list.png" alt="<?php echo $text_list; ?>" title="<?php echo $text_list; ?>" /> <a onclick="display('grid');"><img src="catalog/view/theme/oxy/image/icon_grid.png" alt="<?php echo $text_grid; ?>" title="<?php echo $text_grid; ?>" /></a></div>
    <div class="product-compare"><a href="<?php echo $compare; ?>" id="compare-total"><?php echo $text_compare; ?></a></div>    
    <div class="limit"><?php echo $text_limit; ?>
      <select 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 class="sort"><?php echo $text_sort; ?>
      <select 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>
  <div class="product-list">
    <?php foreach ($products as $product) { ?>
    <div class="<?php echo $this->config->get('oxy_layout_pb_noc'); ?> mobile-two columns">
     
      <?php if ($product['thumb_swap']) { ?>
      <div class="image">
      <?php if (($product['special'])&&($this->config->get('oxy_category_sale_badge_status') == 1)) { ?><span class="sale-icon"><?php echo $text_sale; ?></span><?php } ?> 
      <div class="flybar">     
      <a onclick="addToWishList('<?php echo $product['product_id']; ?>');" class="wishlist"><div><?php echo $button_wishlist; ?></div></a>
      <a onclick="addToWishList('<?php echo $product['product_id']; ?>');" class="wishlist-tip" title="<?php echo $button_wishlist; ?>"><div><?php echo $button_wishlist; ?></div></a>
      <a onclick="addToCompare('<?php echo $product['product_id']; ?>');" class="compare"><div><?php echo $button_compare; ?></div></a>
      <a onclick="addToCompare('<?php echo $product['product_id']; ?>');" class="compare-tip" title="<?php echo $button_compare; ?>"><div><?php echo $button_compare; ?></div></a>
      </div>
      <a href="<?php echo $product['href']; ?>"><img oversrc="<?php echo $product['thumb_swap']; ?>" src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a>
      </div>
      <?php } else {?>
      <div class="image">
      <?php if (($product['special'])&&($this->config->get('oxy_category_sale_badge_status') == 1)) { ?><span class="sale-icon"><?php echo $text_sale; ?></span><?php } ?> 
      <div class="flybar">     
      <a onclick="addToWishList('<?php echo $product['product_id']; ?>');" class="wishlist"><div><?php echo $button_wishlist; ?></div></a>
      <a onclick="addToWishList('<?php echo $product['product_id']; ?>');" class="wishlist-tip" title="<?php echo $button_wishlist; ?>"><div><?php echo $button_wishlist; ?></div></a>
      <a onclick="addToCompare('<?php echo $product['product_id']; ?>');" class="compare"><div><?php echo $button_compare; ?></div></a>
      <a onclick="addToCompare('<?php echo $product['product_id']; ?>');" class="compare-tip" title="<?php echo $button_compare; ?>"><div><?php echo $button_compare; ?></div></a>  
      </div>
      <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a>
      </div>
      <?php } ?> 
      <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
      <div class="product_box_brand"><?php if ($product['brand']) { ?><span><?php echo $text_manufacturer; ?></span> <a href="<?php echo $product['brand_url']; ?>"><?php echo $product['brand']; ?></a><?php } ?></div>
      <?php if ($product['rating']) { ?>
      <div class="rating"><img src="catalog/view/theme/oxy/image/stars/stars<?php echo $this->config->get('oxy_mid_prod_stars_color'); ?>-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
      <?php } ?>
      <div class="description"><?php echo $product['description']; ?></div>
      <?php if ($product['price']) { ?>
      <div class="price">
        <?php if (!$product['special']) { ?>
        <?php echo $product['price']; ?>
        <?php } else { ?>
        <span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span> 
        <?php } ?>
      </div>
      <?php } ?>
      <div class="cart">
        <input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" />
      </div>
      <div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><?php echo $button_wishlist; ?></a></div>
      <div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');"><?php echo $button_compare; ?></a></div>
    </div>
    <?php } ?>
  </div>
  <div class="pagination"><?php echo $pagination; ?></div>
  <?php } ?>
  
     <h1><?php echo $heading_title; if (isset($_GET['page'])) { echo ", ". ((int) $_GET['page'])." page";} ?></h1>
	
  <?php if ($thumb || $description) { ?>
  <div class="category-info newmesto">
    <?php if ($thumb) { ?>
    <div class="image"><img src="<?php echo $thumb; ?>" alt="<?php echo $heading_title; ?>" /></div>
    <?php } ?>
  </div>
  <?php } ?>
   
  <?php if (!$categories && !$products) { ?>
  <div class="category-info"><?php echo $text_empty; ?></div>
  <div class="buttons">
    <div class="right"><a href="<?php echo $continue; ?>" class="button"><?php echo $button_continue; ?></a></div>
  </div>
  <?php } ?>
  <?php echo $content_bottom; ?></section>
    
<script type="text/javascript"><!--
function display(view) {
	if (view == 'list') {
		$('.product-grid').attr('class', 'product-list');
		
		$('.product-list > div').each(function(index, element) {

			html = '<div class="row">';
			
			var image = $(element).find('.image').html();
			
			if (image != null) { 
				html += '<div class="image">' + image + '</div>';
			}
			
			html += '<div class="six columns">';
			html += '  <div class="name">' + $(element).find('.name').html() + '</div>';
			html += '<div class="product_box_brand">' + $(element).find('.product_box_brand').html() + '</div>';
			
			var rating = $(element).find('.rating').html();
			
			if (rating != null) {
				html += '<div class="rating">' + rating + '</div>';
			}	
			
			html += '  <div class="description">' + $(element).find('.description').html() + '</div>';	
			
			html += '</div>';	
			
			html += '<div class="three columns">';
				
			var price = $(element).find('.price').html();
			
			if (price != null) {
				html += '<div class="price">' + price  + '</div>';
				html += '  <div class="cart">' + $(element).find('.cart').html() + '</div>';
			}				
			
			html += '</div>';			

			html += '</div>';
						
			$(element).html(html);
		});		
		
		$('.display').html('<span><?php echo $text_display; ?></span> <img src="catalog/view/theme/oxy/image/icon_list.png" alt="<?php echo $text_list; ?>" title="<?php echo $text_list; ?>" /><a onclick="display(\'grid\');"> <img src="catalog/view/theme/oxy/image/icon_grid.png" alt="<?php echo $text_grid; ?>" title="<?php echo $text_grid; ?>" /></a>');
		
		$.totalStorage('display', 'list'); 
	} else {
		$('.product-list').attr('class', 'product-grid');
		
		$('.product-grid > div').each(function(index, element) {
			html = '';
			
			var image = $(element).find('.image').html();
			
			if (image != null) {
				html += '<div class="image">' + image + '</div>';
			}
			
			html += '<div class="name">' + $(element).find('.name').html() + '</div>';
			html += '<div class="product_box_brand">' + $(element).find('.product_box_brand').html() + '</div>';
			
			var rating = $(element).find('.rating').html();
			
			if (rating != null) {
				html += '<div class="rating">' + rating + '</div>';
			}	
			
			html += '<div class="description">' + $(element).find('.description').html() + '</div>';
			
			var price = $(element).find('.price').html();
			
			if (price != null) {
				html += '<div class="price">' + price  + '</div>';
			}
						
			html += '<div class="cart">' + $(element).find('.cart').html() + '</div>';
			
			$(element).html(html);
		});	
					
			$('.display').html('<span><?php echo $text_display; ?></span> <img src="catalog/view/theme/oxy/image/icon_list.png" alt="<?php echo $text_list; ?>" title="<?php echo $text_list; ?>" onclick="display(\'list\');"/> <img src="catalog/view/theme/oxy/image/icon_grid.png" alt="<?php echo $text_grid; ?>" title="<?php echo $text_grid; ?>"/><a onclick="display(\'list\');">');	
		
		$.totalStorage('display', 'grid');
	}
}

view = $.totalStorage('display');

if (view) {
	display(view);
} else {
	display('<?php echo $this->config->get('oxy_category_prod_display'); ?>');
}
//--></script> 
<?php echo $footer; ?>
<script type="text/javascript"><!--
$(document).ready(function(){
$('.newmesto').append( $('.category-info.oldmesto>.catdescript') );
});
//--></script>

Share this post


Link to post
Share on other sites

Спасибо, текст поднялся но блин он на 2900 строчке в коде, а это не есть гуд, есть возможность поднять его по выше еще ?может в хедер втулить как то?

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.