Sergey

Sergey

С нами с 12 января 2017; Место в рейтинге пользователей: #772
Sergey
02 декабря 2021, 16:26
1
0
Для тех у кого проблемы с вставкой token
В поле
yandexmaps_admin_ymaps_url
нужно прописать
//api-maps.yandex.ru/2.1/?lang=ru_RU&onload=package.full&apikey={token}&ymOnLoad&load=Map,Placemark,GeoObjectCollection,map.addon.balloon,geoObject.addon.balloon,package.controls,templateLayoutFactory,overlay.html.Placemark,SuggestView
Sergey
21 апреля 2021, 17:31
0
Актуально. Кто то нашел решение?
Sergey
25 марта 2021, 17:37
0
Здравствуйте, может кто сталкивался, есть созданные поля через msFieldsManager, часть полей через при создании модификации можно найти (поле Ключ) и добавляется, а часть полей по какой то причине не видит msOptionsPrice2
В чем может быть проблема?
Sergey
28 февраля 2021, 15:05
0
Здравствуйте, скажите пожалуйста, есть изображение в доп. поле, оно одинаковое для всех языковых версий сайта, как можно выводить это или что нужно сделать, что бы не дублировать изображения.
http:/sitename.ru/img/image.jpg
http:/sitename.ru/eng/img/image.jpg
http:/sitename.ru/de/img/image.jpg
Sergey
06 февраля 2021, 17:44
0
Здравствуйте, в чем может быть проблема?
На одних страницах все работает, на других изображение
«Ломается» структура, выводит Доп поля ниже основных полей без стилей и функционала.
Sergey
05 февраля 2021, 16:24
0
UPD.
Прошу прощения, упустил параметр
форма продукта — msoptionsprice-product
прописал его, все отлично работает.
Sergey
05 февраля 2021, 16:12
0
Здравствуйте, скажите пожалуйста, в чем может быть причина?
Инициализация прописана, классы для смены значения прописаны.
В консоли ошибок нет, в «Журнале ошибок» в MODX тоже ошибок нет, при переключении не обновляется значения
Sergey
27 января 2021, 12:09
0
Спасибо, к сожалению, так тоже не работает.
На сколько разобрался, должно быть правильно вот так —
ecThread|rating_simple:checkbox
И получается в «Журнале ошибок»
core/components/msearch2/model/msearch2/msearch2.class.php : 1133) [mSearch2] Method "getEcthreadValues" not exists in class "mse2FiltersHandler". Could not retrieve filters from "ecthread"
Sergey
27 января 2021, 03:00
0
Здравствуйте, скажите пожалуйста, можно ли как то получить координаты точки на карте для документа? Видно что в бд записывается json часть кода
"geometry":[48.54047113739968,39.260353189639424]
чтобы попробовать относительно этой точки вывести ближайших несколько точек(документов) или есть может другие варианты?
Sergey
26 января 2021, 22:54
0
Не верный синтаксис запроса leftJoin был, исправил, сортировка работает, но очень хотелось бы сделать фильтрацию, посмотрите пожалуйста
'filters' => 'tv|average_check_place:checkbox,ecThread|rating_simple:checkbox',
как правильно указать? или возможно вообще фильтрация не будет работать.
В документации по mFilter2 указано
Построение фильтров указывается через один параметр &filters, в формате кодовое_имя_таблицы/поле: фильтр.
, вроде так и написал.
{$_modx->runSnippet('!mFilter2', [
    'loadModels'=>'easycomm',
    'leftJoin' => '{
        "ecThread" : {
            "class" : "ecThread",
            "on" : "modResource.id = ecThread.resource"
        }
    }',
    'select' => '{
        "modResource" : "*",
        "ecThread" : "ecThread.rating_simple AS rating, ecThread.count AS reviews"
    }',
    'depth' => 1,
    'hideContainers' => 1,
    'tpl' => 'place_tpl',
    'where' => '{"template": 8}',
    'filters' => 'tv|average_check_place:checkbox,ecThread|rating_simple:checkbox',
])}
Sergey
26 января 2021, 12:33
0
Фильтр по «rating» — не выводит, выводит например по tv если указать.
Включил log, почему то получается 3 вывода лога.
0.0000081: Loaded model "easycomm" from "/core/components/easycomm/model/"
0.0000260: pdoTools loaded.
0.0000069: Loaded model "easycomm" from "/core/components/easycomm/model/"
0.0000231: Query parameters are prepared.
0.0000162: xPDO query object created
0.0009890: leftJoined mseIntro as Intro
0.0000012: Grouped by modResource.id, Intro.intro
0.0000231: Added selection of modResource: SQL_CALC_FOUND_ROWS `id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `alias_visible`, `link_attributes`, `published`, `pub_date`, `unpub_date`, `parent`, `isfolder`, `introtext`, `richtext`, `template`, `menuindex`, `searchable`, `cacheable`, `createdby`, `createdon`, `editedby`, `editedon`, `deleted`, `deletedon`, `deletedby`, `publishedon`, `publishedby`, `menutitle`, `donthit`, `privateweb`, `privatemgr`, `content_dispo`, `hidemenu`, `class_key`, `context_key`, `content_type`, `uri`, `uri_override`, `hide_children_in_tree`, `show_in_tree`, `properties`
0.0000579: Added selection of mseIntro: intro
0.0000150: Processed additional conditions
0.0001259: Added where condition: template=8, modResource.id:IN(3), modResource.published=1, modResource.deleted=0, modResource.isfolder=0
0.0000610: Sorted by FIELD(`modResource`.`id`,'3'), 
0.0000021: Limited to 10, offset 0
0.0003798: SQL prepared "SELECT SQL_CALC_FOUND_ROWS `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `modResource`.`alias_visible`, `modResource`.`link_attributes`, `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, `modResource`.`donthit`, `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, `modResource`.`content_type`, `modResource`.`uri`, `modResource`.`uri_override`, `modResource`.`hide_children_in_tree`, `modResource`.`show_in_tree`, `modResource`.`properties`, `intro` FROM `modx_site_content` AS `modResource` LEFT JOIN `modx_mse2_intro` `Intro` ON modResource.id = Intro.resource WHERE  ( `modResource`.`template` = 8 AND `modResource`.`id` IN (3) AND `modResource`.`published` = 1 AND `modResource`.`deleted` = 0 AND `modResource`.`isfolder` = 0 )  GROUP BY modResource.id, Intro.intro ORDER BY FIELD(`modResource`.`id`,'3') LIMIT 10 "
0.0097411: SQL executed
0.0004070: Total rows: 1
0.0000172: Rows fetched
0.0000138: Returning raw data
0.0143211: Total time
4 194 304: Memory usage

0.0035930: pdoTools loaded
0.0021920: Loaded "modSnippet" with name "mSearch2"
0.1581380: Created inline "modChunk" with name "e6747421ac951eec87076a3f44c6a184"
0.1639540: Total time
6 291 456: Memory usage

0.0000131: Loaded model "easycomm" from "/core/components/easycomm/model/"
0.0000410: pdoTools loaded.
0.0074718: Fetched 1 ids for building filters from element "mSearch2"
0.0000050: Total number of results: 1
0.0000021: Getting filters for 1 ids
0.0027070: Total number of filters: 0
0.2019460: Fired paginator: "pdoPage"
0.0000050: Filters retrieved
0.0000088: Total filter operations: 0
0.5595241: Total time
6 291 456: Memory usage
Sergey
26 января 2021, 01:26
0
Здравствуйте, хочу вывести рейтинг в фильтр, обычные документы, но ничего не выходит, может кто подскажет в чем ошибка?
{$_modx->runSnippet('!mFilter2', [
    'loadModels'=>'easycomm',
    'leftJoin' => [
        'ecThread' => [
            'class' => 'ecThread',
            'on' => ['modResource.id = ecThread.resource']
        ]
    ],
    'select' => [
        'modResource' => '*',
        'ecThread' => 'ecThread.rating_simple AS rating, ecThread.count AS reviews'
    ],
    'depth' => 1,
    'hideContainers' => 1,
    'where' => '{"template": 8}',
    'filters' => 'rating:checkbox',
])}
Sergey
02 октября 2020, 15:19
0
Пробовал такой вариант.
Лог выдает:
0.0000110: Loaded model "tagger" from "/core/components/tagger/model/"
0.0000200: pdoTools loaded
0.0000119: xPDO query object created
0.0000401: leftJoined localizatorContent as localizator
0.0000269: leftJoined TaggerTag as NameTag
0.0000248: leftJoined modResource as Posts
0.0000250: leftJoined modTemplateVarResource as TV1
0.0000100: Added selection of localizatorContent: SQL_CALC_FOUND_ROWS `TaggerTagResource`.*, *, `TaggerTagResource`.`id`
0.0000181: Added selection of TaggerTagResource: `tag`, `resource`
0.0000041: Added selection of TaggerTag: NameTag.tag, NameTag.alias
0.0000041: Added selection of modResource: Posts.id, Posts.pagetitle, Posts.description, Posts.publishedon, Posts.content
0.0000041: Added selection of modTemplateVarResource: TV1.value as tv1
0.0000401: Added where condition: localizator.key=pl, NameTag.id=14
0.0000210: Sorted by publishedon, ASC
0.0000010: Limited to 5, offset 0
0.0003941: SQL prepared "SELECT SQL_CALC_FOUND_ROWS `TaggerTagResource`.*, `localizator`.*, `TaggerTagResource`.`id`, `TaggerTagResource`.`tag`, `TaggerTagResource`.`resource`, NameTag.tag, NameTag.alias, Posts.id, Posts.pagetitle, Posts.description, Posts.publishedon, Posts.content, TV1.value as tv1 FROM `modx_tagger_tag_resources` AS `TaggerTagResource` LEFT JOIN `modx_localizator_content` `localizator` ON `localizator`.`resource_id` = `TaggerTagResource`.`id` LEFT JOIN `modx_tagger_tags` `NameTag` ON TaggerTagResource.tag = NameTag.id LEFT JOIN `modx_site_content` `Posts` ON TaggerTagResource.resource = Posts.id LEFT JOIN `modx_site_tmplvar_contentvalues` `TV1` ON Posts.id = TV1.contentid and TV1.tmplvarid = 3 WHERE  ( `localizator`.`key` = 'pl' AND `NameTag`.`id` = '14' )  ORDER BY publishedon ASC LIMIT 5 "
0.0007181: Could not process query, error #1054: Unknown column 'TaggerTagResource.id' in 'field list'
0.0014360: Total time
6 291 456: Memory usage
Sergey
02 октября 2020, 13:02
0
Здравствуйте, кто то пробовал подружить Localizator и Tagger?
Нужно выводить перевод по определенному тегу.
Вывод по тегу работает, но правильно подключить Localizator к выводу не удается.
[[!pdoPage?
    &element=`pdoResources`
    &limit=`5`
    &loadModels=`tagger`
    &class=`TaggerTagResource`
    &leftJoin=`{
        "NameTag": {
                "class": "TaggerTag",
                 "on": "TaggerTagResource.tag = NameTag.id"
        },
        "Posts": {
                "class": "modResource",
                "on": "TaggerTagResource.resource = Posts.id"
        },
        "TV1": {
             "class": "modTemplateVarResource",
             "on": "Posts.id = TV1.contentid and TV1.tmplvarid = 3"
        }
    }`
    &select=`{
        "TaggerTagResource": "*",
        "NameTag": "NameTag.tag, NameTag.alias",
        "Posts": "Posts.id, Posts.pagetitle, Posts.description, Posts.publishedon, Posts.content",
        "TV1": "TV1.value as tv1"
    }`
    &where=`{
        "NameTag.id": "[[+id]]"
    }`
    &sortby=`publishedon`
    &sortdir=`ASC`
    &tplFirst=`article_horizontal_tpl`
    &tpl=`article_prim_tpl`
]]
Буду рад любым подсказкам
Sergey
16 июля 2020, 15:50
0
Спасибо, теперь все понятно.
Sergey
17 июня 2020, 15:53
0
Здравствуйте, может кто то объяснить, как правильно должно работать? К сожалению никакой информации не нашел, только на странице дополнения ссылка
При вызове
[[!mscAddress]]
, получаю «Адреса не заполнены», пользователь авторизован через Office.
Буду рад любым подсказкам.
Sergey
05 октября 2018, 13:31
0
Если используете Login, есть парамтр
loginResourceId
с помощью которого можно перенаправить успешно залогиненого юзера на нужную страницу.
Документация по Login
Sergey
08 августа 2018, 11:47
+1
Мне помогла смена значения в настройках PHP хостинга, параметр mbstring.func_overload — был 2, сменил на 0
Sergey
25 мая 2018, 13:14
0
Николай, компонент прекратил свое существование?
Sergey
03 августа 2017, 01:04
0
Здравствуйте. Скажите пожалуйста, можно ли импортировать xml/xmls/csv файлы в документы (обычные страницы), collections?