functions for product hierarchy/save and gets
tree and get products for tree API
representation for the model as dict