Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi-level Items MICROS ISL 1

Status
Not open for further replies.

manelandrea

Programmer
Jul 10, 2017
34
0
0
PH
Hi! May I know how can I get the level of menu items from MICROS using ISL? I need to pass to our 3rd party system something like this:

Structure:
"items": [
// parent item
{
"level": 0,
"line_number": 1,
"parent_line_number": 0,
"name": "Pizza",
"description": "Pizza Crust",
"sku": "1231",
"categories": [
"102"
],
"quantity": 1.0,
"unit_price": 5.25,
"discountable": true
},
// child items
{
"level": 1,
"line_number": 2,
"parent_line_number": 1,
"name": "Cheese",
"description": "Mozzarella ",
"sku": "31241",
"categories": [
"106"
],
"quantity": 1.0,
"unit_price": 0.75,
"discountable": true
}
]



How can I get the level and parent line number using ISL? I tried the @dtl_mlvl[] and @dtl_slvl but I kept on getting the number 1 for all the items that I entered.
 
What exactly do you mean by level? Micros has something called menu levels and sub levels, which have nothing to do with where in the menu item structure the item is. Typically these levels are just used to change the prices. There also aren't necessarily parent items in Micros, outside of combo meals. Even then the condiments aren't actually associated with their parent in the ISL details. You would basically have to loop through the items and programmatically build that association.

I could be wrong about that, but I've not actually seen those kind of associations anywhere in Micros before.
 
Hi Moregelen!

You're right about what I am trying to do. I need to know the parent-child relationship of items but it seems like MICROS doesn't have it. How will I do it with combo meals? Like for example:

I ordered BLT sandwich, and MICROS would require condiments, so I added
*W/ Fries
*W/ Chili
*W/ Strings

so what I am planning to pass to the 3rd party API would be something like this:

name: BLT sandwhich
level: 0
id: 1

name: W/ Fries
level: 1
id: 2

name: BLT sandwhich
level: 1
id: 3

name: BLT sandwhich
level: 1
id: 4


and also, with the categories, is every item belongs to only 1 Major group and 1 Family group?
 
3700 only supports a single major and family group for each item, yes.

If you AREN'T using combo meals, this is actually not that hard to do:

Code:
...

VAR ITEM_NAMES[ @NUMDTLT ] : A200
VAR ITEM_IDS[ @NUMDTLT ] : N9
VAR ITEM_LEVELS[ @NUMDTLT ] : N9

VAR I : N9
VAR ID : N9 = 0
FOR I = 1 TO @NUMDTLT
[indent]IF @DTL_TYPE[I] = "M"[/indent]
[indent][indent]ID = ID + 1[/indent][/indent]
[indent][indent]ITEM_NAME[ID] = @DTL_NAME[I][/indent][/indent]
[indent][indent]ITEM_IDS[ID] = ID[/indent][/indent]
[indent][indent]IF @DTL_IS_COND[I][/indent][/indent]
[indent][indent][indent]ITEM_LEVELS[ID] = 1[/indent][/indent][/indent]
[indent][indent]ELSE[/indent][/indent]
[indent][indent][indent]ITEM_LEVELS[ID] = 0[/indent][/indent][/indent]
[indent][indent]ENDIF[/indent][/indent]
[indent]ENDIF[/indent]
ENDFOR

I'm doing this all from memory when normally I would actually test something like this in my lab, but this should reproduce three arrays with the same information you showed in your post.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top