msProductOptions глюк
[[msProductOptions? &hideEmpty=`1`]]
в итоге на странице получаю характеристики товара в таком видеПовреждения: ROLLOVER
Привод: privod, , default, , listbox
Пробег: probeg, , default, , number
Розничная цена: roznicaprice, , default, , number
Состояние: sostoyanie, , default, , listbox
Статус ставки: statusstavki, Never Bid, default, , listbox
Стоимость ремонта: stoimostremonta, , default, , number
Аукцион: auction, Manheim, default, , listbox
Тип кузова: tipkuzova, , default, , listbox
Цилиндры: cilindri, , default, , number : tipprodazi, s1, default, , listbox : colorinto, , default, , listbox
Тип топлива: tiptopliva, бензин, default, , listbox
Цвет кузова: colorext, черный, default, , listbox
Вид транспорта: vidtransporta,
Автомобиль, default, , listbox : datesale, , default, , date
ВИН номер: vin, , default, , text
Расположение: location, TX - DALLAS, default, , listbox
Марка: make, Acura, default, , listbox
Лот: lotid, , default, , text
Год: year, , default, , number : model, ESCAPE SE, default, , listbox
Текущая ставка: 200
Объем двигателя: obemdvigatel, , default, , text
Конструкция вида <pre>[[msProductOptions? &tpl=``]]</pre>
выводит следующее:
Array
(
[options] => Array
(
[obemdvigatel] => Array
(
[id] => 10
[caption] => Объем двигателя
[description] =>
[measure_unit] =>
[category] => 47
[type] => textfield
[properties] =>
[product_id] => 51
[key] => obemdvigatel
[value] => Array
(
[0] => obemdvigatel
[1] =>
[2] => default
[3] =>
[4] => text
)
[category_name] => 1 - Характеристики
)
[povrezdenia] => Array
(
[id] => 11
[caption] => Повреждения
[description] =>
[measure_unit] =>
[category] => 47
[type] => textfield
[properties] =>
[product_id] => 51
[key] => povrezdenia
[value] => Array
(
[0] => ROLLOVER
)
[category_name] => 1 - Характеристики
)
[privod] => Array
(
[id] => 12
[caption] => Привод
[description] =>
[measure_unit] =>
[category] => 47
[type] => textfield
[properties] =>
[product_id] => 51
[key] => privod
[value] => Array
(
[0] => privod
[1] =>
[2] => default
[3] =>
[4] => listbox
)
[category_name] => 1 - Характеристики
)
[probeg] => Array
(
[id] => 13
[caption] => Пробег
[description] =>
[measure_unit] =>
[category] => 47
[type] => numberfield
[properties] =>
[product_id] => 51
[key] => probeg
[value] => Array
(
[0] => probeg
[1] =>
[2] => default
[3] =>
[4] => number
)
[category_name] => 1 - Характеристики
)
[roznicaprice] => Array
(
[id] => 14
[caption] => Розничная цена
[description] =>
[measure_unit] =>
[category] => 47
[type] => numberfield
[properties] =>
[product_id] => 51
[key] => roznicaprice
[value] => Array
(
[0] => roznicaprice
[1] =>
[2] => default
[3] =>
[4] => number
)
[category_name] => 1 - Характеристики
)
[sostoyanie] => Array
(
[id] => 15
[caption] => Состояние
[description] =>
[measure_unit] =>
[category] => 47
[type] => textfield
[properties] =>
[product_id] => 51
[key] => sostoyanie
[value] => Array
(
[0] => sostoyanie
[1] =>
[2] => default
[3] =>
[4] => listbox
)
[category_name] => 1 - Характеристики
)
[statusstavki] => Array
(
[id] => 16
[caption] => Статус ставки
[description] =>
[measure_unit] =>
[category] => 47
[type] => textfield
[properties] =>
[product_id] => 51
[key] => statusstavki
[value] => Array
(
[0] => statusstavki
[1] => Never Bid
[2] => default
[3] =>
[4] => listbox
)
[category_name] => 1 - Характеристики
)
[stoimostremonta] => Array
(
[id] => 17
[caption] => Стоимость ремонта
[description] =>
[measure_unit] =>
[category] => 47
[type] => textfield
[properties] =>
[product_id] => 51
[key] => stoimostremonta
[value] => Array
(
[0] => stoimostremonta
[1] =>
[2] => default
[3] =>
[4] => number
)
[category_name] => 1 - Характеристики
)
[tipkuzova] => Array
(
[id] => 18
[caption] => Тип кузова
[description] =>
[measure_unit] =>
[category] => 47
[type] => textfield
[properties] =>
[product_id] => 51
[key] => tipkuzova
[value] => Array
(
[0] => tipkuzova
[1] =>
[2] => default
[3] =>
[4] => listbox
)
[category_name] => 1 - Характеристики
)
[auction] => Array
(
[id] => 1
[caption] => Аукцион
[description] =>
[measure_unit] =>
[category] => 47
[type] => textfield
[properties] =>
[product_id] => 51
[key] => auction
[value] => Array
(
[0] => auction
[1] => Manheim
[2] => default
[3] =>
[4] => listbox
)
[category_name] => 1 - Характеристики
)
[tipprodazi] => Array
(
[value] => Array
(
[0] => tipprodazi
[1] => s1
[2] => default
[3] =>
[4] => listbox
)
)
[cilindri] => Array
(
[id] => 2
[caption] => Цилиндры
[description] =>
[measure_unit] =>
[category] => 47
[type] => numberfield
[properties] =>
[product_id] => 51
[key] => cilindri
[value] => Array
(
[0] => cilindri
[1] =>
[2] => default
[3] =>
[4] => number
)
[category_name] => 1 - Характеристики
)
[tiptopliva] => Array
(
[id] => 20
[caption] => Тип топлива
[description] =>
[measure_unit] =>
[category] => 47
[type] => textfield
[properties] =>
[product_id] => 51
[key] => tiptopliva
[value] => Array
(
[0] => tiptopliva
[1] => бензин
[2] => default
[3] =>
[4] => listbox
)
[category_name] => 1 - Характеристики
)
[colorinto] => Array
(
[value] => Array
(
[0] => colorinto
[1] =>
[2] => default
[3] =>
[4] => listbox
)
)
[vidtransporta] => Array
(
[id] => 21
[caption] => Вид транспорта
…
Комментарии: 3
Здравствуйте, у меня та же ситуация, в чем же проблема?
привет! получилось разобраться?
Я использовал вывод опций через pdoResources, и это сработало
[[!pdoResources?
&tpl=`tpl.productOptions`
&parents=`[[*parent]]`
&class=`msProduct`
&leftJoin=`{
"Options": {
"class": "msProductOption",
"on": "msProduct.id = Options.product_id"
},
"captionOption": {
"class": "msOption",
"on": "Options.key = captionOption.key"
}
}`
&select=`{
"Options": "key,value",
"captionOption":"caption,measure_unit"
}`
&where=`["msProduct.id = [[*id]]"]`
]]
а в чанке вывода используем переменные {$key} {$value} {$caption} {$measure_unit}
Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.