Новости Joomla

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

borodaTT

  • Осваиваюсь на форуме
  • 11
  • 1 / 0
Добрый день.
Столкнулся с проблемой. После того как нажимаю на кнопку  "показать все товары производителя" сначала появляется список всех категорий а за ним уже идут товары, определенного производителя.
Если в админке убрать "показывать дочерние категории"   то категории не выводятся, но и в самом каталоге не выводится категории второго уровня и ниже.
В общем, нужно убрать список категорий из "показать все товары производителя" но при этом категории в самом каталоге должны выводиться

PS. Подобной темы не нашел.
Был похожий вариант с поиском vm, но для конкретной этой задачи, не помогло
*

gangstarcj

  • Захожу иногда
  • 189
  • 8 / 0
*

Rain_67

  • Новичок
  • 6
  • 0 / 0
*

sosed0274

  • Новичок
  • 5
  • 0 / 0
*

TeRReN

  • Захожу иногда
  • 66
  • 0 / 0
  • О! ХвостеГ!
Архи АКТУАЛЬНО!
ППц как актуально! Все перерыл, не могу найти! Если кто знаешь решение отпишитесь плз!
*

TeRReN

  • Захожу иногда
  • 66
  • 0 / 0
  • О! ХвостеГ!
перерыл весь инет, но на этот вопрос никто ни где не знает ответа, неужели специалистов нет?
« Последнее редактирование: 03.04.2013, 23:03:44 от TeRReN »
*

gangstarcj

  • Захожу иногда
  • 189
  • 8 / 0
Вот код моей страницы категорий, в ней что-то правил, чтобы не отображались на странице производители. Только не помню что именно, сравните со своим.
Либо просто поместите этот код в templates/ВАШ_ШАБЛОН/html/com_virtuemart/category/default.php
Код
<?php
/**
 *
 * Show the products in a category
 *
 * @package    VirtueMart
 * @subpackage
 * @author RolandD
 * @author Max Milbers
 * @todo add pagination
 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 * VirtueMart is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * @version $Id: default.php 6556 2012-10-17 18:15:30Z kkmediaproduction $
 */

//vmdebug('$this->category',$this->category);
vmdebug ('$this->category ' . $this->category->category_name);
// Check to ensure this file is included in Joomla!
defined ('_JEXEC') or die('Restricted access');
JHTML::_ ('behavior.modal');
/* javascript for list Slide
  Only here for the order list
  can be changed by the template maker
*/
$js = "
jQuery(document).ready(function () {
jQuery('.orderlistcontainer').hover(
function() { jQuery(this).find('.orderlist').stop().show()},
function() { jQuery(this).find('.orderlist').stop().hide()}
)
});
";

$document = JFactory::getDocument ();
$document->addScriptDeclaration ($js);

/*$edit_link = '';
if(!class_exists('Permissions')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'permissions.php');
if (Permissions::getInstance()->check("admin,storeadmin")) {
$edit_link = '<a href="'.JURI::root().'index.php?option=com_virtuemart&tmpl=component&view=category&task=edit&virtuemart_category_id='.$this->category->virtuemart_category_id.'">
'.JHTML::_('image', 'images/M_images/edit.png', JText::_('COM_VIRTUEMART_PRODUCT_FORM_EDIT_PRODUCT'), array('width' => 16, 'height' => 16, 'border' => 0)).'</a>';
}

echo $edit_link; */


/* Show child categories */

if ( VmConfig::get('showCategory',1) && empty($this->keyword) && empty($this->products))  {
if ($this->category->haschildren) {

// Category and Columns Counter
$iCol = 1;
$iCategory = 1;

// Calculating Categories Per Row
$categories_per_row = VmConfig::get ('categories_per_row', 3);
$category_cellwidth = ' width' . floor (100 / $categories_per_row);

// Separator
$verticalseparator = " vertical-separator";
?>

<div class="category-view">

<?php // Start the Output
if (!empty($this->category->children)) {
foreach ($this->category->children as $category) {

// Show the horizontal seperator
if ($iCol == 1 && $iCategory > $categories_per_row) {
?>
<div class="horizontal-separator"></div>
<?php
}

// this is an indicator wether a row needs to be opened or not
if ($iCol == 1) {
?>
<div class="row">
<?php
}

// Show the vertical seperator
if ($iCategory == $categories_per_row or $iCategory % $categories_per_row == 0) {
$show_vertical_separator = ' ';
} else {
$show_vertical_separator = $verticalseparator;
}

// Category Link
$caturl = JRoute::_ ('index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id);

// Show Category
?>
<div class="category floatleft<?php echo $category_cellwidth . $show_vertical_separator ?>">
<div class="spacer">
<h2>
<a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
<?php echo $category->category_name ?>
<br/>
<?php // if ($category->ids) {
echo $category->images[0]->displayMediaThumb ("", FALSE);
//} ?>
</a>
</h2>
</div>
</div>
<?php
$iCategory++;

// Do we need to close the current row now?
if ($iCol == $categories_per_row) {
?>
<div class="clear"></div>
</div>
<?php
$iCol = 1;
} else {
$iCol++;
}
}
}
// Do we need a final closing row tag?
if ($iCol != 1) {
?>
<div class="clear"></div>
</div>
<?php } ?>
</div>

<?php
}
}
?>
<div class="browse-view">
<?php
if (!empty($this->keyword)) {
?>
<h3><?php echo $this->keyword; ?></h3>
<?php
} ?>
<?php if ($this->search !== NULL) { ?>
<form action="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=category&search=true&limitstart=0&virtuemart_category_id=' . $this->category->virtuemart_category_id); ?>" method="get">

<!--BEGIN Search Box -->
<div class="virtuemart_search">
<div style="display:none;"> <?php echo $this->searchcustom ?> </div>
<br/>
<?php echo $this->searchcustomvalues ?>
<input name="keyword" class="inputbox" type="text" size="20" value="<?php echo $this->keyword ?>"/>
<input type="submit" value="<?php echo JText::_ ('COM_VIRTUEMART_SEARCH')?>" class="button" onclick="this.form.keyword.focus();"/>
</div>
<input type="hidden" name="search" value="true"/>
<input type="hidden" name="view" value="category"/>

</form>
<br><br>
<!-- End Search Box -->
<?php } ?>

<?php // Show child categories
if (!empty($this->products)) {
?>
<div class="category_description">
<h1><?php echo $this->category->category_name; ?></h1>
<?php if (empty($this->keyword)) { echo $this->category->category_description; }?>
</div>
<div class="orderby-displaynumber">
<div class="width70 floatleft">
<?php echo $this->orderByList['orderby']; ?>
<?php echo $this->orderByList['manufacturer']; ?>
</div>

<div class="width30 floatright display-number"><?php echo $this->vmPagination->getResultsCounter ();?><br>
Выводить по: <?php echo $this->vmPagination->getLimitBox (); ?></div>
<div class="clear"></div>
<div class="vm-pagination">
<?php echo $this->vmPagination->getPagesLinks (); ?>
</div>
<div class="clear"></div>
</div> <!-- end of orderby-displaynumber -->



<?php
// Category and Columns Counter
$iBrowseCol = 1;
$iBrowseProduct = 1;

// Calculating Products Per Row
$BrowseProducts_per_row = $this->perRow;
$Browsecellwidth = ' width' . floor (100 / $BrowseProducts_per_row);

// Separator
$verticalseparator = " vertical-separator";

// Count products ?? why not just count ($this->products)  ?? note by Max Milbers
$BrowseTotalProducts = 0;
foreach ($this->products as $product) {
$BrowseTotalProducts++;
}

// Start the Output
foreach ($this->products as $product) {



// this is an indicator wether a row needs to be opened or not
if ($iBrowseCol == 1) {
?>
<div class="row">
<?php
}

// Show the vertical seperator
if ($iBrowseProduct == $BrowseProducts_per_row or $iBrowseProduct % $BrowseProducts_per_row == 0) {
$show_vertical_separator = ' ';
} else {
$show_vertical_separator = $verticalseparator;
}

// Show Products
?>
<div class="product floatleft<?php echo $Browsecellwidth . $show_vertical_separator ?>">
<div class="spacer cat_tovar">
<div class="center">
<div class="tovar_img">
<?php /** @todo make image popup */
echo $product->images[0]->displayMediaThumb ('class="browseProductImage" border="0" title="' . $product->product_name . '" ', TRUE, 'class="modal"');
?>
</div>
<hr>
<!-- The "Average Customer Rating" Part -->
<?php if ($this->showRating) { ?>
<span class="contentpagetitle"><?php echo JText::_ ('COM_VIRTUEMART_CUSTOMER_RATING')?>:</span>
<br/>
<?php
// $img_url = JURI::root().VmConfig::get('assets_general_path').'/reviews/'.$product->votes->rating.'.gif';
// echo JHTML::image($img_url, $product->votes->rating.' '.JText::_('COM_VIRTUEMART_REVIEW_STARS'));
// echo JText::_('COM_VIRTUEMART_TOTAL_VOTES').": ". $product->votes->allvotes;
?>
<?php } ?>
  <?php
if ( VmConfig::get ('display_stock', 1)) { ?>
<!-- if (!VmConfig::get('use_as_catalog') and !(VmConfig::get('stockhandle','none')=='none')){?> -->
<div class="paddingtop8">
<span class="vmicon vm2-<?php echo $product->stock->stock_level ?>" title="<?php echo $product->stock->stock_tip ?>"></span>
<span class="stock-level"><?php echo JText::_ ('COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_TITLE_TIP')?></span>
</div>
<?php } ?>
</div>

<div>

<div class="tovar_name"><h2><?php echo JHTML::link ($product->link, $product->product_name); ?></h2></div>


<div class="product_sku">Артикул: <?php echo $product->product_sku ?></div>
<div class="product_sku">Осталось: <?php  if ($product->product_in_stock > 8) {echo "Достаточно";} else {echo $product->product_in_stock." шт.";}; ?> </div>
<div class="product-price marginbottom12" id="productPrice<?php echo $product->virtuemart_product_id ?>">
<?php
if ($this->show_prices == '1') {
if (empty($product->prices['salesPrice']) and VmConfig::get ('askprice', 1) and  !$product->images[0]->file_is_downloadable) {
echo JText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE');
}
//todo add config settings
if ($this->showBasePrice) {
echo $this->currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $product->prices);

}
echo $this->currency->createPriceDiv ('variantModification', 'COM_VIRTUEMART_PRODUCT_VARIANT_MOD', $product->prices);
if (round($product->prices['basePriceWithTax'],$this->currency->_priceConfig['salesPrice'][1])!= $product->prices['salesPrice']) {
echo '<span class="price-crossed" >' . $this->currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $product->prices). "</span>";
}
if (round($product->prices['salesPriceWithDiscount'],$this->currency->_priceConfig['salesPrice'][1])!= $product->prices['salesPrice']) {
echo $this->currency->createPriceDiv ('salesPriceWithDiscount', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITH_DISCOUNT', $product->prices);
}
echo $this->currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $product->prices);
echo $this->currency->createPriceDiv ('priceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $product->prices);
echo $this->currency->createPriceDiv ('discountAmount', 'COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT', $product->prices);
echo $this->currency->createPriceDiv ('taxAmount', 'COM_VIRTUEMART_PRODUCT_TAX_AMOUNT', $product->prices);
$unitPriceDescription = JText::sprintf ('COM_VIRTUEMART_PRODUCT_UNITPRICE', $product->product_unit);
echo $this->currency->createPriceDiv ('unitPrice', $unitPriceDescription, $product->prices);
} ?>

</div>
<!-- Добавление в корзину-->
<form method="post" class="product" action="index.php" id="addtocartproduct<?php echo $product->virtuemart_product_id ?>">
<div class="addtocart-bar2">

<?php // Display the quantity box ?>
<!-- <label for="quantity<?php echo $product->virtuemart_product_id;?>" class="quantity_box"><?php echo JText::_('COM_VIRTUEMART_CART_QUANTITY'); ?>: </label> -->
<span class="quantity-box">
<input  type="text" class="quantity-input" name="quantity[]" value="1" />
</span>
<span class="quantity-controls">
<input type="button" class="quantity-controls quantity-plus" />
<input type="button" class="quantity-controls quantity-minus" />
</span>
<?php // Display the quantity box END ?>

<?php // Add the button
$button_lbl = JText::_('COM_VIRTUEMART_CART_ADD_TO');
$button_cls = ''; //$button_cls = 'addtocart_button';
if (VmConfig::get('check_stock') == '1' && !$product->product_in_stock) {
$button_lbl = JText::_('COM_VIRTUEMART_CART_NOTIFY');
$button_cls = 'notify-button';
} ?>

<?php // Display the add to cart button ?>
<span class="addtocart-button2">
<input type="submit" name="addtocart"  class="addtocart-button" value="<?php echo $button_lbl ?>" title="<?php echo $button_lbl ?>" />
</span>

<div class="clear"></div>
</div>

<?php // Display the add to cart button END ?>
<input type="hidden" class="pname" value="<?php echo $product->product_name ?>">
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="view" value="cart" />
<noscript><input type="hidden" name="task" value="add" /></noscript>
<input type="hidden" name="virtuemart_product_id[]" value="<?php echo $product->virtuemart_product_id ?>" />
<?php /** @todo Handle the manufacturer view */ ?>
<input type="hidden" name="virtuemart_manufacturer_id" value="<?php echo $product->virtuemart_manufacturer_id ?>" />
<input type="hidden" name="virtuemart_category_id[]" value="<?php echo $product->virtuemart_category_id ?>" />
</form>
<!-- Конец Добавление в корзину-->
<div class="tovar_more">
<?php // Product Details Button
echo JHTML::link ($product->link, JText::_ ('COM_VIRTUEMART_PRODUCT_DETAILS'), array('title' => $product->product_name, 'class' => 'product-details'));
?>
</div>

</div>
<div class="tlistitem_shadow"></div>
<div class="clear"></div>
</div>
<!-- end of spacer -->
</div> <!-- end of product -->
<?php

// Do we need to close the current row now?
if ($iBrowseCol == $BrowseProducts_per_row || $iBrowseProduct == $BrowseTotalProducts) {
?>
<div class="clear"></div>
   </div> <!-- end of row -->
<?php
$iBrowseCol = 1;
} else {
$iBrowseCol++;
}

$iBrowseProduct++;
} // end of foreach ( $this->products as $product )
// Do we need a final closing row tag?
if ($iBrowseCol != 1) {
?>
<div class="clear"></div>

<?php
}
?>

<div class="vm-pagination"><?php echo $this->vmPagination->getPagesLinks (); ?><span style="float:right"><?php echo $this->vmPagination->getPagesCounter (); ?></span></div>

<?php
} elseif ($this->search !== NULL) {
echo JText::_ ('COM_VIRTUEMART_NO_RESULT'). ($this->keyword ? ' : (' . $this->keyword . ')' : '');
}
?>
</div><!-- end browse-view -->
*

TeRReN

  • Захожу иногда
  • 66
  • 0 / 0
  • О! ХвостеГ!
Категории ушли! Единственный косяк с шаблоном страницы, названия товаров пишутся символами, по ходу какие то косяки с кодировкой
« Последнее редактирование: 04.04.2013, 10:37:05 от TeRReN »
*

gangstarcj

  • Захожу иногда
  • 189
  • 8 / 0
Описание наверно это
Код
<div class="category_description">

А кодировка, сохраните файл в нужной вам (наверное UTF-8 без BOM)
*

TeRReN

  • Захожу иногда
  • 66
  • 0 / 0
  • О! ХвостеГ!
в общем я удалил следующий код у себя из файла templates/ВАШ_ШАБЛОН/html/com_virtuemart/category/default.php
и все заработало как надо
Код

<div class="category floatleft<?php echo $category_cellwidth . $show_vertical_separator ?>">
<div class="spacer">
<h2>
<a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
<?php echo $category->category_name ?>

<?php // if ($category->ids) {
echo $category->images[0]->displayMediaThumb("",false);
//} ?>
</a>
</h2>
</div>
Спасибо angstarcj  за наводку!
*

gangstarcj

  • Захожу иногда
  • 189
  • 8 / 0
Проверь, в самих категориях товаров лишнего не удалилось случаем?
*

TeRReN

  • Захожу иногда
  • 66
  • 0 / 0
  • О! ХвостеГ!
*

sosed0274

  • Новичок
  • 5
  • 0 / 0
gangstarcj, TeRReN, спасибки, ребята. Помогло. Правда, не знаю, как магазин будет дальше дышать, но будем надеяться)))
*

TeRReN

  • Захожу иногда
  • 66
  • 0 / 0
  • О! ХвостеГ!
gangstarcj, TeRReN, спасибки, ребята. Помогло. Правда, не знаю, как магазин будет дальше дышать, но будем надеяться)))
у меня все ок работает)
*

tigra-uki

  • Давно я тут
  • 560
  • 11 / 0
  • Joom'лiстка
а вот в  2.0.22a  удаление этих строк приводило к ошибке, к сожалению...
Заработало, когда удалила только вот это:

Спойлер
[свернуть]
« Последнее редактирование: 19.09.2013, 22:56:53 от tigra-uki »
Слишком сконцентрированное внимание необходимо разбавлять действием.
*

Upps_J

  • Осваиваюсь на форуме
  • 11
  • 0 / 0
Только вы снесли подкатегории из всего магазина. )) Как сделать что бы подкатегории оставались на месте на всех страницах, а только при нажатии на Показать товары производителя, эти же подкатегории убирались  выводились только и именно товары производителя?
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Переменные VirtueMart или где макет страницы "Спасибо за заказ!"?

Автор indigo

Ответов: 21
Просмотров: 13999
Последний ответ 06.01.2021, 20:21:03
от Akeksandr
Вывод категорий в результате поиска

Автор vladimirwk

Ответов: 3
Просмотров: 1331
Последний ответ 19.12.2020, 18:34:06
от gartes
Сопутствующие товары

Автор Wargoth

Ответов: 2
Просмотров: 1358
Последний ответ 25.08.2020, 14:49:06
от Wargoth
Как удалить дочерние товары в карточке товара VM 2?

Автор zeus07

Ответов: 0
Просмотров: 830
Последний ответ 12.05.2020, 14:51:39
от zeus07
Custom Filters pro - не показывает дочерние товары при выборе фильтра

Автор djed9

Ответов: 0
Просмотров: 666
Последний ответ 01.04.2020, 11:41:43
от djed9