Q
Q
QenduX2021-10-21 13:24:14
MODX
QenduX, 2021-10-21 13:24:14

MODX. Not outputting MIGX to MIGX?

MODX:
[
{
"caption":"Title",
"fields": [
{
"field":"title",
"caption":"Title"
},
{
"field":"description",
"caption":"Description ",
"inputTVtype":"richtext"
}
]
},
{
"caption":"Image",
"fields":[
{
"field":"image",
"caption":"Image",
"inputTVtype":"image",
"sourceFrom":"MIGX"
}
]
},
{
"caption":"Price",
"fields": [
{
"field":"price",
"caption":"Discount price"
}
]
},

{
"caption":"Discount",
"fields": [
{
"field":"sale",
"caption":"Price without discount"
}
]
},
{
"caption":"Category",
"fields": [
{
"field":"category",
"caption":"Category",
"inputTV": "equipment_list "
}
]
},
{
"caption":"Specifications",
"fields": [
{
"field":"specifications",
"caption":"Characteristics",
"inputTV": "equipment_item_specifications"
}
]
}
]

[
{"header": "Name", "width": "160", "sortable": "true", "dataIndex": " title"},
{"header": "Image", "width": "50", "sortable": "false", "dataIndex": "image","renderer": "this.renderImage"},
{" header": "Price with discount", "width": "50", "sortable": "false", "dataIndex": "price"},
{"header": "Price without discount","width": "50", "sortable": "false", "dataIndex": "sale"},
{"header": "Category", "width": "50", "sortable": "false", "dataIndex": "category"},
{"header": "Characteristics", "width": "50", "sortable": "false", "dataIndex": "specifications"}
]

Code:Specifications", "width": "50", "sortable": "false", "dataIndex": "specifications"} ] Code:Specifications", "width": "50", "sortable": "false", "dataIndex": "specifications"} ] Code:


Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Vasiliev, 2021-10-21
@QenduX

it's better to move away from MIGx in this case and remake everything into resources. It will be problematic to update prices in the future, because. MIGX writes everything to the database in JSON format like this:
617161fa6e865516903405.jpeg
where indicated by the arrow is some text, price, etc.
It's easier to install free Minishop2.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question