Новости Joomla

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

sanek2281

  • Захожу иногда
  • 85
  • 7 / 0
Всем привет!

Стоит Joomla 3.9.5 , VirtueMart 3.4.2 , SJ Filter for VirtueMart 2.4.2

Модуль выводится на странице категории товаров ( в файле /templates/xxxxx/html/com_virtuemart/category/default.php ) следующим кодом:
Спойлер
[свернуть]

при выборе любой опции для фильтрации идет долгая загрузка, но товары не фильтруются, а в панели разработчика вылазит, следующая ошибка http://prntscr.com/neqp26

если модуль вывожу в шаблоне сайта ( <jdoc:include type="modules"  name="filtr2" style="xhtml"/> обычным способом), а не в шаблонах VirtueMart, то, все нормально работает.

прошу помощи, за ранее спасибо
*

draff

  • Гуру
  • 5803
  • 434 / 7
  • ищу работу
Re: SJ Filter for VirtueMart не фильтрует товары
« Ответ #1 : 21.04.2019, 07:56:21 »
500 ошибка- проверьте синтаксис PHP в файле /default.php
И раздел форума для Вирт 1
*

sanek2281

  • Захожу иногда
  • 85
  • 7 / 0
Re: SJ Filter for VirtueMart не фильтрует товары
« Ответ #2 : 21.04.2019, 14:26:34 »
500 ошибка- проверьте синтаксис PHP в файле /default.php
И раздел форума для Вирт 1
Уважаемый draff, мог ли бы подсказать что не так в файле default.php?
Код файла default.php
Код
<?php
/**
 *
 * Show the products in a category
 *
 * @package    VirtueMart
 * @subpackage
 * @author RolandD
 * @author Max Milbers
 * @todo add pagination
 * @link https://virtuemart.net
 * [member=126442]copyright[/member] 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 9942 2018-09-27 11:54:06Z junstoppable $
 */

defined ('_JEXEC') or die('Restricted access');

if (vRequest::getInt('dynamic',false) and vRequest::getInt('virtuemart_product_id',false)) {
if (!empty($this->products)) {
if($this->fallback){
$p = $this->products;
$this->products = array();
$this->products[0] = $p;
vmdebug('Refallback');
}

echo shopFunctionsF::renderVmSubLayout($this->productsLayout,array('products'=>$this->products,'currency'=>$this->currency,'products_per_row'=>$this->perRow,'showRating'=>$this->showRating));

}

return ;
}
?> <div class="category-view flexblog_category"> <?php
$js = "
jQuery(document).ready(function () {
jQuery('.orderlistcontainer').hover(
function() { jQuery(this).find('.orderlist').stop().show()},
function() { jQuery(this).find('.orderlist').stop().hide()}
)
});
";
vmJsApi::addJScript('vm-hover',$js);

if ($this->show_store_desc and !empty($this->vendor->vendor_store_desc)) { ?>
<div class="vendor-store-desc">
<?php echo $this->vendor->vendor_store_desc; ?>
</div>
<?php } ?>

<div class="category_top flexblog_category_top" >
<?php if (!empty($this->category->category_name)) { ?>
<h1><?php echo vmText::_($this->category->category_name); ?></h1>
<?php } ?>
<div class="category-desc">
<?php echo $this->category->category_description; ?>
</div>
</div>

<div class="flexblog_category_bott" >
<?php
if(!empty($this->orderByList)) { ?>
<div class="orderby-displaynumber" style="display: none;" >
<div class="floatleft vm-order-list">
<?php echo $this->orderByList['orderby']; ?>
<?php echo $this->orderByList['manufacturer']; ?>
</div>
<div class="vm-pagination vm-pagination-top">
<?php echo $this->vmPagination->getPagesLinks (); ?>
<span class="vm-page-counter"><?php echo $this->vmPagination->getPagesCounter (); ?></span>
</div>
<div class="floatright display-number"><?php echo $this->vmPagination->getResultsCounter ();?><br/><?php echo $this->vmPagination->getLimitBox ($this->category->limit_list_step); ?></div>

<div class="clear"></div>
</div>
<?php } ?>

<div class="flexblog_category_tovar row" >
<div class="flexblog_category_filtr" >

<?php
jimport( 'joomla.application.module.helper' );
$modules = JModuleHelper::getModules('flexblog_category_filtr');
$attribs['style'] = 'xhtml';
foreach($modules as $module){
echo JModuleHelper::renderModule($module, $attribs);
}
?>
</div>
<div class="flexblog_category_right" >
<?php if (!empty($this->category->category_name)) { ?>
<h2>Купить <?php echo mb_strtolower(vmText::_($this->category->category_name)); ?></h2>
<?php } ?>
<?php
if (!empty($this->products)) {
if($this->fallback){
$p = $this->products;
$this->products = array();
$this->products[0] = $p;
vmdebug('Refallback');
}
echo shopFunctionsF::renderVmSubLayout($this->productsLayout,array('products'=>$this->products,'currency'=>$this->currency,'products_per_row'=>$this->perRow,'showRating'=>$this->showRating));
if(!empty($this->orderByList)) { ?>
<div class="vm-pagination vm-pagination-bottom"><?php echo $this->vmPagination->getPagesLinks (); ?><span class="vm-page-counter"><?php echo $this->vmPagination->getPagesCounter (); ?></span></div>
<?php }
} elseif ($this->keyword !== false) {
echo vmText::_ ('COM_VIRTUEMART_NO_RESULT'). ($this->keyword ? ' : (' . $this->keyword . ')' : '');
}
?>
</div>
</div>
</div>


<?php
// Show child categories
if ($this->showcategory and empty($this->keyword)) {
if (!empty($this->category->haschildren)) {
echo ShopFunctionsF::renderVmSubLayout('categories',array('categories'=>$this->category->children, 'categories_per_row'=>$this->categories_per_row));
}
}

if (!empty($this->products) or ($this->showsearch or $this->keyword !== false)) {
?>
<div class="browse-view">
<?php

if ($this->showsearch or $this->keyword !== false) {
//id taken in the view.html.php could be modified
$category_id  = vRequest::getInt ('virtuemart_category_id', 0); ?>

<!--BEGIN Search Box -->
<div class="virtuemart_search">
<form action="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=category&limitstart=0', FALSE); ?>" method="get">
<?php if(!empty($this->searchCustomList)) { ?>
<div class="vm-search-custom-list">
<?php echo $this->searchCustomList ?>
</div>
<?php } ?>

<?php if(!empty($this->searchCustomValues)) { ?>
<div class="vm-search-custom-values">
<?php
                echo ShopFunctionsF::renderVmSubLayoutAsGrid(
                    'searchcustomvalues',
                    array (
                        'searchcustomvalues' => $this->searchCustomValues,
                        'options' => array (
                            'items_per_row' => array (
                                'xs' => 2,
                                'sm' => 2,
                                'md' => 2,
                                'lg' => 2,
                                'xl' => 2,
                            ),
                        ),
                    )
                );
                ?>
</div>
<?php } ?>
<div class="vm-search-custom-search-input">
<input name="keyword" class="inputbox" type="text" size="40" value="<?php echo $this->keyword ?>"/>
<input type="submit" value="<?php echo vmText::_ ('COM_VIRTUEMART_SEARCH')?>" class="button" onclick="this.form.keyword.focus();"/>
<?php //echo VmHtml::checkbox ('searchAllCats', (int)$this->searchAllCats, 1, 0, 'class="changeSendForm"'); ?>
<span class="vm-search-descr"> <?php echo vmText::_('COM_VM_SEARCH_DESC')?></span>
</div>

<!-- input type="hidden" name="showsearch" value="true"/ -->
<input type="hidden" name="view" value="category"/>
<input type="hidden" name="option" value="com_virtuemart"/>
<input type="hidden" name="virtuemart_category_id" value="<?php echo $category_id; ?>"/>
<input type="hidden" name="Itemid" value="<?php echo $this->Itemid; ?>"/>
</form>
</div>
<!-- End Search Box -->
<?php
/*if($this->keyword !== false){
?><h3><?php echo vmText::sprintf('COM_VM_SEARCH_KEYWORD_FOR', $this->keyword); ?></h3><?php
}*/
$j = 'jQuery(document).ready(function() {

jQuery(".changeSendForm")
.off("change",Virtuemart.sendCurrForm)
    .on("change",Virtuemart.sendCurrForm);
})';

vmJsApi::addJScript('sendFormChange',$j);
} ?>


</div>

<?php } ?>
</div>

<?php
if(VmConfig::get ('ajax_category', false)){
$j = "Virtuemart.container = jQuery('.category-view');
VirtueMart.containerSelector = '.category-view';";

vmJsApi::addJScript('ajax_category',$j);
vmJsApi::jDynUpdate();
}
?>
<!-- end browse-view -->
*

draff

  • Гуру
  • 5803
  • 434 / 7
  • ищу работу
Re: SJ Filter for VirtueMart не фильтрует товары
« Ответ #3 : 21.04.2019, 16:06:27 »
Уважаемый draff, мог ли бы подсказать что не так в файле default.php?
Проверил код, но с другим модулем фильтра- ошибок нет. Отключите модуль или попробуйте вывести другой модуль. Проверьте может еще есть модули для этой позиции или ошибка в стилях для модуля. Отключите временно .
Код
//$attribs['style'] = 'xhtml';
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Не отображаются товары в категории

Автор iZacNT

Ответов: 0
Просмотров: 769
Последний ответ 23.06.2023, 12:20:49
от iZacNT
VirtueMart 3 Отображать только товары в наличии!

Автор GaziroFFka

Ответов: 4
Просмотров: 2126
Последний ответ 06.06.2023, 13:55:13
от Akeksandr
SP VirtueMart Category Search

Автор ve1006

Ответов: 10
Просмотров: 6058
Последний ответ 18.01.2023, 10:39:10
от AzMandius
Как вывести модуль в страницу VirtueMart?

Автор harddrop

Ответов: 11
Просмотров: 2913
Последний ответ 13.11.2022, 13:11:37
от Evgen Kulibin
Как правильно настроить покупку в VirtueMart?

Автор varella

Ответов: 1
Просмотров: 1273
Последний ответ 12.10.2022, 16:14:04
от varella