商品 橱窗 里 的 巧克力 with things like 里 or 上 in the noun part of the 的 how do you know to use this sentence structure rather then for example, 恰克力上这个 商品出 橱窗 i guess my question is why is this more appropriate to say 'Chocolate on the display window'?

商品 橱窗 里 的 巧克力
with things like 里 or 上 in the noun part of the 的 how do you know to use this sentence structure rather then for example, 恰克力上这个 商品出 橱窗 i guess my question is why is this more appropriate to say ‘Chocolate on the display window’?

If your other example is 巧克力上的这个商品橱窗 (i.e. with 的), that would seem to suggest that the window is on the chocolate. If you intentionally did not have a 的 in there, then this is more like a sentence, and 上 is a verb that makes it sound like the chocolate is climbing into position. When you use “上的” and the English is “the X on the Y” then it should be “Y上的X.” The location is “Y上” and the description of X is “Y上的.”

ah ok i see

what about the case of 里?

Same logic, 里 goes directly after the location. Unlike 上 it doesn’t work as a verb of motion.