Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

В чанках добавлен вывод набора scriptProperties #711

Merged
merged 2 commits into from
Sep 2, 2022

Conversation

biz87
Copy link
Member

@biz87 biz87 commented Sep 1, 2022

Что оно делает?

Во всех сниппетах в чанки передается набор входящих параметров.

Зачем это нужно?

Теперь в вызове сниппета можно написать произвольный параметр и получить его значение в чанке

 [[!msCart? &customParam=`customValue`]]
[[!msOrder?  &customOrderParam=`customValue`]]

@biz87
Copy link
Member Author

biz87 commented Sep 1, 2022

Как проверить.
Вызвать корзину с произвольным параметром
[[!msCart? &customParam=customValue]]

В чанке корзины распечатать {$scriptProperties | print} и убедиться что доступ к произвольному параметру есть
Или просто вызывать {$scriptProperties.customParam}

@biz87 biz87 merged commit 1e9ca55 into master Sep 2, 2022
@biz87 biz87 deleted the scriptProperties_chunk branch September 2, 2022 16:17
@Alexij2
Copy link
Contributor

Alexij2 commented Oct 23, 2022

Не работает для сниппета msProduct, а хотелась бы.
Вещь добавления параметров своих в чанк при tpl в сниппете нужная очень.

Alexij2 added a commit to Alexij2/miniShop2 that referenced this pull request Oct 23, 2022
Дополнение к 
modx-pro#711
в msProduct, Добавление свойств, как это сделано в pdoResources
Если считаете что нужно по-другому - поправьте, но думаю было бы хорошо, чтобы логика поведения была одинакова как в pdoToolse сниппетах так и msProduct.
GulomovCreative pushed a commit to GulomovCreative/miniShop2 that referenced this pull request Mar 27, 2023
Дополнение к 
modx-pro#711
в msProduct, Добавление свойств, как это сделано в pdoResources
Если считаете что нужно по-другому - поправьте, но думаю было бы хорошо, чтобы логика поведения была одинакова как в pdoToolse сниппетах так и msProduct.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants