Add Variant Dropdown In Baseproduct template

Is there a way to add a variant drop-down in the base product template like we have one at the top on the same template?

Litium version: 7.6.2

Only by creating a custom field type.

Thanks, @NilsN. I will check that.

Even if I create a custom fieldtype, Is it possible to populate the custom fieldtype with variants based on the products in which we have added the fieldtype?

In a custom field, you should be able to get the owning entity from this.ownerId. So if the field is on the base product, from that GUID you should be able to find the variants to populate the field.

I have created a custom field based on this documentation and it’s working fine. I have to convert this to a drop-down and also have to add customized options to this drop-down based on the product template in which it has been added(mentioned in the scenario above). I have gone through the forum and docs and couldn’t find anything related to this. An example or any info about this would be very much appreciated.

In the Accelerator there’s a custom field for setting the filters - it’s a dropdown that’s populated dynamically. You could use that as a starting point.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.