[New Commerce UI] Removed product/variant properties still show in Commerce Catalog

Vote:
 

How can I remove obsolete properties from content in new Commerce UI?

I cannot find Admistration > Catalog System > Meta Classes (or similar) menu option.

Related thread: https://world.optimizely.com/forum/developer-forum/Commerce/Thread-Container/2016/1/removed-productvariant-properties-still-show-in-commerce-catalog-/

#283619
Jul 13, 2022 11:17
Vote:
 

You need to add and remove properties in code. There's no longer an admin for commerce manager

You can build a migration step to do the lifting https://world.optimizely.com/blogs/scott-reed/dates/2021/11/run-once-migration-step/ 

Then create code to delete https://docs.developers.optimizely.com/commerce/v14.0.0-commerce-cloud/docs/metaclassmanager-class 

#283621
Jul 13, 2022 12:29
Vote:
 

Thank you for the reply, Scott.

I removed properties from the code but these are still showing up in the Commerce editor.

Is there any way to have a cleanup of these?

#283623
Edited, Jul 13, 2022 12:46
Vote:
 

Sorry I thought you referring to meta classes not the catalog.

I checked and in our solution on commerce 14 we have built a tool that uses the property definition repository to delete them. We've done this as an admin plugin but could be an init module 

Here's a link to tool, expires in 1 week https://we.tl/t-dZUDyqIVgh 

Just setup the admin area and add in your properties to the dictionaries or use the code as a base

#283624
Jul 13, 2022 12:58
Vote:
 

Thank you for the help again, Scott.

Does that tool require manually defining all missing properties in the `_missingCommercePropertiesDict` collection? If so, is there any way to do that automatically (or, like in the older version of Commerce UI, choose which properties should be removed)?

Also, the question - are there any plans to have it as a feature of Commerce UI again?

#283625
Jul 13, 2022 13:08
Vote:
 

You'd have to build something if you wanted to replicate that type of functionallity, in our solution I think it was done as a quick and dirty workaround by the devs. So yes you'd need to do that, you could just for now change the admin tool to a textbox where you enter the property name / meta type and it deletes it so you don't need to recompile.

I don't know of any plans to bring the missing commerce areas back in but it would definately be a great nuget plugin for someone to create. (I would if I had the time)

#283626
Jul 13, 2022 13:11
Vote:
 

Would be nice to see it as a feature again though :)

I removed data in the database, i.e. the following tables:

  • CatalogContentProperty
  • ecfVersionProperty
  • MetaClassMetaFieldRelation
  • MetaField
    #283681
    Edited, Jul 14, 2022 8:37
    Vote:
     

    Hey I've built a plugin, it's a bit rough and ready but works for any catalog content types. It will show you any properties that have been deleted and allow you to delete them or delete all for a model type or everything property it's found. I'm going to style it and nuget-ify it but thought I'd give it to you for now

    https://we.tl/t-Zt02J1jU3n

    #284144
    Jul 21, 2022 15:20
    Vote:
     

    Thank you very much, I'll check this out.

    Do you think you can share it on GitHub or here, so anyone that will come to that thread later will find the solution in place?

    #284145
    Jul 21, 2022 15:23
    Vote:
     

    As mentioned I'm going to set it up as a proper package in the feed, I'll be moving it to github but I've got some clean up to do as well first this is just an early version in case you were still having problems.

    #284146
    Jul 21, 2022 15:26
    Vote:
     

    I see now - thank you :)

    #284150
    Jul 21, 2022 19:47
    * You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.