Uploaded image for project: 'E-commerce'
  1. E-commerce
  2. ECOMMERCE-379

Investigation. Hard to use category and product chooser in a content type

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Minor
    • None
    • 1.2.3
    • None
    • None

    Description

      As a developer I want to add a product or category item to my content app by using contentTypes feature.

      Since there is no contenttype property for ecomm product or categories, as a developer I must resort to "overlaying" the app definition which is quite complicated. 

      As a developer I would hope to be able to just use a "product" or "productCategory" property type in my contenttype definition. Ideally I dont need to do anything in the app definition.

      Notes

      Here is an example of the workaround which must currently be employed. This does not look too bad, but it gets quite complicated when using multi-field setups. (Look at productId)

      Content Type Definition

      datasource:  
        workspace: inspirations 
      
      model:  
      nodeType: inspiration  
      properties:
        productId:          
          label: Product        
        productDesc:          
          label: Product description
      

      App Definition

      !content-type:inspiration
      name: inspiration-app
      label: Inspirations
      
      subApps:  
        detail:    
          label: Inspiration    
          form:      
            properties:
              productId:                      
                $type: categoryChooserField                      
                selectProduct: true

       

      Here is what I would want to be able to do:

       

      Content Type Definition

      (See type: Product)

      datasource:  
        workspace: inspirations 
      
      model:  
      nodeType: inspiration  
      properties:
        productId:          
          label: Product
          type: Product # or 'ExternalProduct' or something like that.        
        productDesc:          
          label: Product description
      

      No special App definition overrides are necessary: 

       

      App Definition

      !content-type:inspiration
      name: inspiration-app
      label: Inspirations

       

       

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                czimmermann Christopher Zimmermann
                AuthorX
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:

                  Checklists

                    Task DoR