0 Пользователей и 1 Гость просматривают эту тему.
  • 4 Ответов
  • 858 Просмотров
*

a68

  • Осваиваюсь на форуме
  • 18
  • 0 / 0
описание категории
« : 14.04.2016, 07:16:47 »
при добавлении описания категории оно не выводится на странице
думаю что все дело в шаблон\html\com_jshopping\categorycategory_default.php
разобрать мешают пробелы образования)))
помогите пожалуйста.
Код
[code]<?php 
/**
* @version      4.3.1 13.08.2013
* @author       MAXXmarketing GmbH
* @package      Jshopping
* @copyright    Copyright (C) 2010 webdesigner-profi.de. All rights reserved.
* @license      GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
?>
<div class="jshop">
<div class="entry-header"><h1 class="vina_title text_color"><?php print $this->category->name?></h1></div>
<a href = "<?php print $this->category->category_link;?>"><img class="category_img" src="<?php print $this->image_category_path;?>/<?php if ($this->category->category_image) print $this->category->category_image; else print $this->noimage;?>" alt="<?php print htmlspecialchars($this->category->name)?>" title="<?php print htmlspecialchars($this->category->name)?>" /></a>
<!--
<?php if($this->category->description){?>
<div class="category_description"><?php print $this->category->description?></div>
<?php } ?>

<div class="jshop_list_category">
<?php if (count($this->categories)){ ?>
<div class = "jshop list_category">
    <?php foreach($this->categories as $k=>$category){?>
        <?php if ($k%$this->count_category_to_row==0) print "<div class='row-fluid'>"; ?>
        <div class = "jshop_categ span<?php print (12/$this->count_category_to_row)?> bg_<?php echo $k%(2*$this->count_category_to_row -1); ?>">
          <div class = "category">                     
            <div class="image">
                <a href = "<?php print $category->category_link;?>"><img class="jshop_img" src="<?php print $this->image_category_path;?>/<?php if ($category->category_image) print $category->category_image; else print $this->noimage;?>" alt="<?php print htmlspecialchars($category->name)?>" title="<?php print htmlspecialchars($category->name)?>" /></a>
            </div>           
            <div class="short_des">
               <a class = "product_link vina_title text_color" href = "<?php print $category->category_link?>"><?php print $category->name?></a>
               <p class = "category_short_description">
               <?php
echo JHTML::_('string.truncate', ($category->short_description), 80);                    
               ?>
               </p>
            </div>         
          </div>
        </div>   
        <?php if ($k%$this->count_category_to_row==$this->count_category_to_row-1) print '</div>'; ?>
    <?php } ?>
        <?php if ($k%$this->count_category_to_row!=$this->count_category_to_row-1) print '</div>'; ?>
</div>
<?php }?>
</div>

-->

<?php include(dirname(__FILE__)."/products.php");?>
</div>
[/code]
*

dmitry_stas

  • Легенда
  • 13151
  • 1234 / 8
Re: описание категории
« Ответ #1 : 14.04.2016, 08:44:57 »
прочитайте, как выглядят html-комментарии, и удалите их из кода. или сравните с шаблоном по умолчанию, и посмотрите в чем разница.

и в принципе это шаблон уже очень старый, базовый шаблон уже давно адаптивный, на порядок лучше.
Тут дарят бакс просто за регистрацию! Успей получить!
Все советы на форуме раздаю бесплатно, то есть даром. Индивидуально бесплатно консультирую только по вопросам стоимости индивидуальных консультаций
*

a68

  • Осваиваюсь на форуме
  • 18
  • 0 / 0
Re: описание категории
« Ответ #2 : 15.04.2016, 19:40:30 »
прочитайте, как выглядят html-комментарии, и удалите их из кода. или сравните с шаблоном по умолчанию, и посмотрите в чем разница.

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

error648398

  • Захожу иногда
  • 168
  • 21 / 0
Re: описание категории
« Ответ #3 : 15.04.2016, 19:44:57 »
если можно подскажите пожалуйста готовое решение по  этому шаблону

Код
<?php 
/**
* @version      4.3.1 13.08.2013
* @author       MAXXmarketing GmbH
* @package      Jshopping
* @copyright    Copyright (C) 2010 webdesigner-profi.de. All rights reserved.
* @license      GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
?>
<div class="jshop">
<div class="entry-header"><h1 class="vina_title text_color"><?php print $this->category->name?></h1></div>
<a href = "<?php print $this->category->category_link;?>"><img class="category_img" src="<?php print $this->image_category_path;?>/<?php if ($this->category->category_image) print $this->category->category_image; else print $this->noimage;?>" alt="<?php print htmlspecialchars($this->category->name)?>" title="<?php print htmlspecialchars($this->category->name)?>" /></a>

<?php if($this->category->description){?>
<div class="category_description"><?php print $this->category->description?></div>
<?php } ?>

<div class="jshop_list_category">
<?php if (count($this->categories)){ ?>
<div class = "jshop list_category">
    <?php foreach($this->categories as $k=>$category){?>
        <?php if ($k%$this->count_category_to_row==0) print "<div class='row-fluid'>"; ?>
        <div class = "jshop_categ span<?php print (12/$this->count_category_to_row)?> bg_<?php echo $k%(2*$this->count_category_to_row -1); ?>">
          <div class = "category">                    
            <div class="image">
                <a href = "<?php print $category->category_link;?>"><img class="jshop_img" src="<?php print $this->image_category_path;?>/<?php if ($category->category_image) print $category->category_image; else print $this->noimage;?>" alt="<?php print htmlspecialchars($category->name)?>" title="<?php print htmlspecialchars($category->name)?>" /></a>
            </div>          
            <div class="short_des">
               <a class = "product_link vina_title text_color" href = "<?php print $category->category_link?>"><?php print $category->name?></a>
               <p class = "category_short_description">
               <?php
echo JHTML::_('string.truncate', ($category->short_description), 80);                  
               ?>
               </p>
            </div>          
          </div>
        </div>    
        <?php if ($k%$this->count_category_to_row==$this->count_category_to_row-1) print '</div>'; ?>
    <?php } ?>
        <?php if ($k%$this->count_category_to_row!=$this->count_category_to_row-1) print '</div>'; ?>
</div>
<?php }?>
</div>


<?php include(dirname(__FILE__)."/products.php");?>
</div>
*

a68

  • Осваиваюсь на форуме
  • 18
  • 0 / 0
Re: описание категории
« Ответ #4 : 15.04.2016, 21:09:41 »
error648398 - большое спасибо.... только при этом начало выводить в категории название, картинку и описание подкатегорий
Правильно ли будет если я сокращу код до следующего состояния
Код
<?php 
/**
* @version      4.3.1 13.08.2013
* @author       MAXXmarketing GmbH
* @package      Jshopping
* @copyright    Copyright (C) 2010 webdesigner-profi.de. All rights reserved.
* @license      GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
?>
<div class="jshop">
<div class="entry-header"><h1 class="vina_title text_color"><?php print $this->category->name?></h1></div>
<a href = "<?php print $this->category->category_link;?>"><img class="category_img" src="<?php print $this->image_category_path;?>/<?php if ($this->category->category_image) print $this->category->category_image; else print $this->noimage;?>" alt="<?php print htmlspecialchars($this->category->name)?>" title="<?php print htmlspecialchars($this->category->name)?>" /></a>

<?php if($this->category->description){?>
<div class="category_description"><?php print $this->category->description?></div>
<?php } ?>

<div class="jshop_list_category">
<?php if (count($this->categories)){ ?>
<div class = "jshop list_category">
    <?php foreach($this->categories as $k=>$category){?>
        <?php if ($k%$this->count_category_to_row==$this->count_category_to_row-1) print '</div>'; ?>
    <?php } ?>
        <?php if ($k%$this->count_category_to_row!=$this->count_category_to_row-1) print '</div>'; ?>
</div>
<?php }?>
</div>


<?php include(dirname(__FILE__)."/products.php");?>
</div>
в принцепе итог вроде устраивает, описание категории есть, при этом отсутствует описаная выше проблема
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Вывести название категории в списке товаров

Автор ataman

Ответов: 9
Просмотров: 3443
Последний ответ 15.09.2023, 20:31:11
от Alex_gs
WT JoomShopping Favorite - кнопки избранного в категории товаров и карточке тов

Автор sergeytolkachyov

Ответов: 11
Просмотров: 1933
Последний ответ 17.06.2023, 10:33:33
от sergeytolkachyov
Отображения описании категории только на первой странице

Автор graf

Ответов: 5
Просмотров: 1174
Последний ответ 04.05.2023, 18:52:08
от kit2m2
JoomShopping - категории и товары

Автор Adm1nspb

Ответов: 48
Просмотров: 13173
Последний ответ 24.03.2023, 12:12:32
от kibervolk
Товары с меткой шли первыми в списке товаров категории

Автор rudoy24

Ответов: 20
Просмотров: 2518
Последний ответ 20.03.2023, 14:44:22
от goga_pgasovav