Hey guys,
I'm attempting to add a field to the "default" metadata schema . I've read the documentation here https://experienceleague.adobe.com/docs/experience-manager-64/assets/administer/metadata-schemas.htm... , but I want the field that I'm adding to mimic the functionality of the default "Product Skus." field under the commerce tab (picture attached). Said "Product Skus." field appears as a Text Field in the gui, but obviously there is some functionality under the hood allowing the user to select from a list of products. Is this functionality possible to duplicate in a custom field? Or is there some place in CRX I can look to see how the "Product Skus." field operates?
Solved! Go to Solution.
Views
Replies
Total Likes
You need to add metadata schema here, you can add clientlibs also
/conf/global/settings/dam/adminui-extension/metadataschema
e.g.
<tab5 granite:rel="aem-assets-metadata-form-tab" jcr:primaryType="nt:unstructured" jcr:title="Commerce" sling:resourceType="granite/ui/components/coral/foundation/container" listOrder="4"> <granite:data jcr:primaryType="nt:unstructured" tabid="dd9d71ff-4524-435d-a16c-0249020660fc" /> <items jcr:primaryType="nt:unstructured"> <tabs jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/include" path="/apps/myproj/dam/metadata/accesscontrol/tabs" /> <clientlibs jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/includeclientlibs" categories="myproj.dam.metadataeditor.commerce" /> </items> </tab5>
Hi,
Technically, it is possible to reuse the logic for assets as well.
You can create the metadata schema using granite types and can check the logic for Product SKU and write the same code/could be a small piece of code to make a request to some API.
but it is possible.
I did something similar but not for the products.
Hey Arun,
Thanks for your response -- where did your xml end up living in CRX? I'm having some trouble tracking that down haha...
You need to add metadata schema here, you can add clientlibs also
/conf/global/settings/dam/adminui-extension/metadataschema
e.g.
<tab5 granite:rel="aem-assets-metadata-form-tab" jcr:primaryType="nt:unstructured" jcr:title="Commerce" sling:resourceType="granite/ui/components/coral/foundation/container" listOrder="4"> <granite:data jcr:primaryType="nt:unstructured" tabid="dd9d71ff-4524-435d-a16c-0249020660fc" /> <items jcr:primaryType="nt:unstructured"> <tabs jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/include" path="/apps/myproj/dam/metadata/accesscontrol/tabs" /> <clientlibs jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/includeclientlibs" categories="myproj.dam.metadataeditor.commerce" /> </items> </tab5>
Views
Likes
Replies