Last active
May 6, 2020 21:27
-
-
Save OlegShchavelev/0b697f5b00ba20ac4fc26a86827cc33e to your computer and use it in GitHub Desktop.
Получаем опции и тв и работает над выводом.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$tv_prod_coffee_ids = (explode(',' , $modx->resource->getTVValue('prod_coffee_ids'))); | |
$tv_prod_coffee_sprecial = (explode(',' , $modx->resource->getTVValue('prod_coffee_sprecial'))); | |
$option_coffee_total = explode(',' , $modx->getOption('coffee_total')); | |
$output = $tv_prod_coffee_sprecial | |
? $tv_prod_coffee_sprecial | |
: array_filter(array_unique(array_merge($tv_prod_coffee_ids,$option_coffee_total))); | |
return (implode(',' , $output)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment