Search code examples
moryx

I can't import Products with the DefaultImporterin a Moryx Application


When I try to import a new product in the UI using the "DefaultImporter", I get the error message "Something went wrong on the server". I can select the producttypes in the dropdown menu, but when trying to add any product I just get the beforementioned generic error message. I added the other products with the DemoImporter.

My Entrys which should work by my knowledge

My Entrys which should work by my knowledge

Image of the error

Image of the error

I was expecting the Default Importer to just add a product without showing an error. I tried restarting the application and adding other products, but I couldn't add them either. Does anyone have an idea what might be the issue or how to add products without the importer ?


Solution

  • The problem occurs because of the lack of configuration of the type to be created in Product Management. This should happen automatically if the product was created with the MORYX CLI. To configure the product manually, the following way is recommended:

    To fix the problem, you need to click on the three dots in the top right corner of the UI and open the Command Center. Then you have to expand the Product Manager under "Modules". After that you have to configure the product type, the recipe and the instance in the console and save the whole thing.

    In this example, we will now configure the whole thing only for the product type "DisplayWatchfaceType". For the rest of the product types, proceed in exactly the same way. For example, to configure "DisplayWatchFaceType" now, you need to assign the corresponding Value to the "productType" property. In this case, it's "MORYX.Products.Samples.DisplayWatchFaceType". You shouldn't forget to execute the whole thing afterwards by clicking on the Invoke button.

    With the rest, you do the same. You choose ConfigureInstance and ConfigureRecipe and give the properties the corresponding value, in our case WatchFaceType.

    Important: At the end, don't forget to click on "SaveConfig" and then "Invoke" to save your changes to the Command Center. You also have to press the "Reincartnate" button on the ProductManager module.

    Now you should be able to see the "Display Watchface" product type as usual.

    Configure Type

    Configure Instance

    Configure Recipe

    Save Config