I'm using this API function https://docs.miva.com/api-functions/category_insert and the API doc page doesn't say what to use for the variables, which I'm used to so I figured most of it out, but for the life of me I can not get it to assign a parent category while creating one using this function.
I have working code to create root categories ok. :)
But I can't tell how to assign a parent category. I have tried a bunch of stuff even calling a parent ID and I have opened up the LSK to look but didn't find anything. I'm beginning to think this function just can't assign a parent as well as insert at the same time. Yet I can't find a function that's just for assigning a parent category.
Some stuff I've tried:
etc etc. No luck.
Basically I'm looking for somebody who works at Miva to let me know if it is possible to use this function to assign a parent category and what the code would be if so. Or what other function to call.
PS: I do not want to use the JSON API for this. AND the XML API example is also poor without any parent category assignment.
I have working code to create root categories ok. :)
HTML Code:
<mvt:assign name="l.settings:cat:code" value="'colin'" /> <mvt:assign name="l.settings:cat:name" value="'colin category name'" /> <mvt:assign name="l.settings:cat:active" value="'1'" /> <mvt:do file="g.Module_Library_DB" name="l.success_catOK" value="Category_Insert(l.settings:cat)" />
Some stuff I've tried:
HTML Code:
<mvt:assign name="l.settings:cat:parent_id" value="20" /> <mvt:assign name="l.settings:cat:parent_code" value="'trees'" /> <mvt:assign name="l.settings:cat:parent" value="'trees'" /> <mvt:assign name="l.settings:cat:category_parent_code" value="'trees'" /> <mvt:assign name="l.settings:cat:parent_category_code" value="'trees'" />
Basically I'm looking for somebody who works at Miva to let me know if it is possible to use this function to assign a parent category and what the code would be if so. Or what other function to call.
PS: I do not want to use the JSON API for this. AND the XML API example is also poor without any parent category assignment.
Comment