Hello, I'm trying to understand the relationship of EntityId to stores and users. I see there are multiple tables where the EntityId is used but I don't see where the EntityId is created. Thank you for any insights you can shed on the topic.
publicvirtualvoid InsertStoreMapping<T>(T entity, int storeId) where T : BaseEntity, IStoreMappingSupported
When a store mapping is inserted then the EnityId is set to the Id for the Item being mapped to a Store i.e. the Id for the Topic, Category, Newsitem, etc
Hi Yidna, thanks for the reply. Does that mean that all objects get mapped to a store when they're created? I guess I'm still unclear on what an entity actually represents.
It must also be noted that not all entities are "Limited to store". Just a few of them are.
adam9367 wrote:
Hi Yidna, thanks for the reply. Does that mean that all objects get mapped to a store when they're created? I guess I'm still unclear on what an entity actually represents.
I have an existing custom CMS that I have multiple customers logging into for managing content. (It's a multi-site CMS for hosting websites) Each customer uploads their data into a single database using my tools, and then I use their data to generate individual websites for them based off of web address. I want to add shopping cart features to my product using nopCommerce. It seems like the nopCommerce DB is already configured for this type of integration.
Is it safe to assume that each object in the database is mapped to a store? Is a store (storeId) at the top of the hierarchy? I would like to be able to map stores to my existing customers accounts via an AccountId.
Is it safe to assume that each object in the database is mapped to a store?
There are no default mappings i.e. no entries in the storemapping table The system works by either having no mapping i.e. the object is displayed on all stores or limiting an object to a store i.e. the object only displays on the store to which it is mapped
adam9367 wrote:
I would like to be able to map stores to my existing customers accounts via an AccountId.
I think you could do this If there is no accountId mapped i.e. default value - they can see all objects in all stores If you mapped an accountId to a storeId then they only see the objects in only that store to which they are mapped