Евгений

Евгений

С нами с 07 февраля 2013; Место в рейтинге пользователей: #343
Евгений
23 мая 2023, 23:28
0
tv я думаю вбить в одном ресурсе и к нему обращаться будет проще
Евгений
22 января 2023, 17:21
0
а как переносить не все, оставлять 10 последних?
Евгений
14 ноября 2022, 14:33
0
сумбурно описал так как не мог понять как это вообще лучше реализовать
решил написать скрипт js который подменяет ref url на красивую «внутреннюю» ссылку, собственно думаю плагины не понадобятся
Евгений
12 ноября 2022, 17:24
0
нашел CloakLinks для EVO
может есть подобное для REVO?
Евгений
12 ноября 2022, 13:23
0
вот как здесь например кнопка перейти на сайт
такой плагин на wp как я понимаю есть
Евгений
18 октября 2022, 12:18
0
подправил для поле tvFilters
<?php
$filterz = '';
if(isset($_GET['types'])) $filterz = $filterz.'types=='.$_GET['types'].',';
if(isset($_GET['config'])) $filterz = $filterz.'config=='.$_GET['config'].',';
if(isset($_GET['style'])) $filterz = $filterz.'style=='.$_GET['style'].',';
if(isset($_GET['fasad'])) $filterz = $filterz.'fasad=='.$_GET['fasad'].',';

if($filterz !=='') $filterz = substr($filterz,0,-1);

return $filterz;
словил такую ошибку
[pdoTools] Error 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"`TVtypes`.`value` LIKE '1\"' AND  ( `msProduct`.`parent` IN (2,24,5,6,7,8,9,10,' at line 1
Евгений
18 октября 2022, 11:48
0
пришел к такому решению:
[[!msProducts? &tpl=`tovartplCat` &limit=`64` &parents=`2` &tvFilters=`[[!where]]` &includeTVs=`types,config,style,fasad` ]]
<?php
$filterz = '';
if(isset($_GET['types'])) $filterz['types'] = $_GET['types'];
if(isset($_GET['config'])) $filterz['config'] = $_GET['config'];
if(isset($_GET['style'])) $filterz['style'] = $_GET['style'];
if(isset($_GET['fasad'])) $filterz['fasad'] = $_GET['fasad'];
if($filterz !=='') $filterz = substr($filterz,0,-1);

//if(!empty($filterz)) {$where = json_encode($filterz);} else {$where = '';}

return $filterz;
но чтото не завелось :(
Евгений
12 октября 2022, 15:35
0
нету ничего такого у меня
Евгений
12 октября 2022, 12:03
0
добавил, а где лог смотреть? в логе ошибок тоже самое все
Евгений
12 октября 2022, 11:03
0
добавил правки под новую
if(isset($_GET['types'])){$filterz[] = 'types=' . $_GET['types'];}
if(isset($_GET['config'])){$filterz[] = 'config=' . $_GET['config'];}
if(isset($_GET['style'])){$filterz[] = 'style=' . $_GET['style'];}
if(isset($_GET['fasad'])){$filterz[] = 'fasad=' . $_GET['fasad'];}
и where

if(isset($filterz)) { $where = $modx->toJSON(array($filterz)); } else { $where = ''; }
if(isset($filterz)) {
        $modx->log(1,print_r($filterz,1));
	$where = $modx->toJSON(array($filterz));
}
в итоге получаю в лог такое
[2022-10-12 06:31:26] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/37.include.cache.php : 28) Array
(
    [0] => types=1
    [1] => config=1
    [2] => style=1
    [3] => fasad=1
)
ну и в результатах фильтрации 0
Евгений
12 октября 2022, 11:03
0
вернулся
сайт где работает на 7.4.28
на сайте где 7.4.32 не работает
пробовал и старее весрии ставить не помогло
Евгений
10 октября 2022, 13:20
0
modx 2.8.4
PHP Version 8.0.24 была ранее 7,4 это ничего не меняло
mysql 5.7.36-39

pdotools 2.13.2-pl
minishop 3.0.6-pl

в целом на хосте несколько сайтов, но там нет такого фильтра
Евгений
10 октября 2022, 12:17
0
вот такое при обновлении страницы и потом нажатии чекбоксов в фильтре, что это?
[2022-10-10 09:15:12] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/35.include.cache.php : 7) PHP warning: Undefined array key "types"
[2022-10-10 09:15:12] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/35.include.cache.php : 10) PHP warning: Undefined array key "config"
[2022-10-10 09:15:12] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/35.include.cache.php : 13) PHP warning: Undefined array key "style"
[2022-10-10 09:15:12] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/35.include.cache.php : 16) PHP warning: Undefined array key "fasad"
[2022-10-10 09:15:12] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/35.include.cache.php : 23) PHP warning: Undefined array key "sortby"
[2022-10-10 09:15:12] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/35.include.cache.php : 28) PHP warning: Undefined array key "sortdir"
[2022-10-10 09:15:12] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/35.include.cache.php : 37) PHP warning: Undefined array key "offset"
[2022-10-10 09:15:12] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/components/minishop2/handlers/storage/session/cartsessionhandler.class.php : 15) PHP warning: Undefined array key "minishop2"
[2022-10-10 09:15:12] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/components/minishop2/handlers/storage/session/cartsessionhandler.class.php : 15) PHP warning: Trying to access array offset on value of type null
[2022-10-10 09:15:12] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/components/minishop2/handlers/storage/session/ordersessionhandler.class.php : 22) PHP warning: Undefined array key "minishop2"
[2022-10-10 09:15:12] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/components/minishop2/handlers/storage/session/ordersessionhandler.class.php : 22) PHP warning: Trying to access array offset on value of type null
[2022-10-10 09:15:34] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/35.include.cache.php : 10) PHP warning: Undefined array key "config"
[2022-10-10 09:15:34] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/35.include.cache.php : 13) PHP warning: Undefined array key "style"
[2022-10-10 09:15:34] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/35.include.cache.php : 16) PHP warning: Undefined array key "fasad"
[2022-10-10 09:15:34] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/35.include.cache.php : 37) PHP warning: Undefined array key "offset"
[2022-10-10 09:15:34] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/35.include.cache.php : 47) Array
(
    [0] => types=1
)
Евгений
10 октября 2022, 12:07
0
хмммм

[2022-10-10 09:06:13] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/35.include.cache.php : 7) PHP warning: Undefined array key "types"
[2022-10-10 09:06:13] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/35.include.cache.php : 24) PHP warning: Undefined array key "sortby"
[2022-10-10 09:06:13] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/35.include.cache.php : 29) PHP warning: Undefined array key "sortdir"
[2022-10-10 09:06:13] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/35.include.cache.php : 38) PHP warning: Undefined array key "offset"
[2022-10-10 09:06:13] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/components/minishop2/handlers/storage/session/cartsessionhandler.class.php : 15) PHP warning: Undefined array key "minishop2"
[2022-10-10 09:06:13] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/components/minishop2/handlers/storage/session/cartsessionhandler.class.php : 15) PHP warning: Trying to access array offset on value of type null
[2022-10-10 09:06:13] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/components/minishop2/handlers/storage/session/ordersessionhandler.class.php : 22) PHP warning: Undefined array key "minishop2"
[2022-10-10 09:06:13] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/components/minishop2/handlers/storage/session/ordersessionhandler.class.php : 22) PHP warning: Trying to access array offset on value of type null
Евгений
10 октября 2022, 12:02
0
[2022-10-10 09:01:03] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/cache/includes/elements/modsnippet/35.include.cache.php : 48) Array
(
    [0] => types=
)

[2022-10-10 09:01:03] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/components/pdotools/model/pdotools/pdofetch.class.php : 178) [pdoTools] Error 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND  ( `msProduct`.`parent` IN (2,24,5,6,7,8,9,10,11,12,13,14,21,64,62,65,66,67,' at line 1
[2022-10-10 09:01:03] (ERROR @ /home/host1834153/maltipuhome.ru/htdocs/www/core/components/pdotools/model/pdotools/pdofetch.class.php : 178) [pdoTools] Error 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND  ( `msProduct`.`parent` IN (2,24,5,6,7,8,9,10,11,12,13,14,21,64,62,65,66,67,' at line 1
оставил в запросе только одно поле, думаю иначе бы по каждому были ошибки подобные
Евгений
10 октября 2022, 09:43
0
что с этим where не так?
if($filter) {
	$where = $modx->toJSON(array($filter));
} else {
	$where = '';
}
как проверить что за массив он получает и вообще получает ли из

//Filter Fields Settings
$filter = array();
 
//Radio, Select & Text Fields Type

if($_GET['types']) {
	$filter[] = 'types='.$_GET['types'];
}
if($_GET['config']) {
	$filter[] = 'config='.$_GET['config'];
}
if($_GET['style']) {
    $filter[] = 'style='.$_GET['style'];
}
if($_GET['fasad']) {
	$filter[] = 'fasad='.$_GET['fasad'];
}
Евгений
05 октября 2022, 14:30
0
да
сейчас поглядимс
а где смотреть лог?
Евгений
05 октября 2022, 13:01
0
ага, понятно
но оба варианта не работают
$where = $modx->toJSON(array($filter));
заменить на 
$where = $modx->toJSON($filter);