Skip to content

Implement the attributes system #73

@rensPols

Description

@rensPols

Current idea:

Scope

  • global
    • websites (key, name)
      • storeviews (key, name)

*Can differ per scope

Attributes

  • key
  • name*
  • dataType
  • Required / nullable
  • Default value*
  • Scope level [global, website, storeview]
    • The deepest level that it can have different values for.

Attribute sets

  • attribute_set_key: String
  • name*: String
  • attributes: List (this is recursive)
    -- attribute_key: String
    -- folder: Map<String, String|List>
    --- name*: String
    --- attributes: List (this is recursive)

Attribute (set) types

  • Product attributes / attribute sets
  • Category attributes / attribute sets
  • Page attributes / attribute sets

Implementation within MongoDB

Every request needs to provide a scope.
When you request an attribute with a scope, the server fetches all the data of the scope (e.g. storeview_a -> fetches storeview_a, websiteOfStoreviewA, Global) (here presides a caching oppertunity).
And combines that all together by overlapping all the data and prioritises the storeview data over the website data over the global data.

Collection names

Attributes

  • product_attributes (x1) global data
  • category_attributes (x1) global data
  • page_attributes (x1) global data

How different scope collection names work

  • x1
    • x1_websiteKey (x2) website data
      • x2_storeviewKey storeview data

Attribute sets

  • product_attribute_sets
  • category_attribute_sets
  • page_attribute_sets

Metadata

Metadata

Assignees

Labels

initialisationpart of the initialisation of the project
No fields configured for Feature.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions