Developer forum

Forum » CMS - Standard features » Item dropdown list matching ecom prod category dropdown list

Item dropdown list matching ecom prod category dropdown list

Nuno Aguiar
Reply

Hi,

 

We want to create an item field (dropdown list) that matches a product category dropdown field.

 

I expected to get this done using SQL, but it turns out the dropdown list options for eCommerce are in XML in the EcomProductCategoryFieldTranslation table. Is there anyway to get this working? I don't want to have to update the options in 2 different places.

 

Best Regards,

Nuno Aguiar


Replies

 
Nuno Aguiar
Reply

Hi,

 

Any ideas?

 
Nicolai Høeg Pedersen
Reply

No ideas....

 
Nuno Aguiar
Reply

Hi Nicolai,

 

I thought a little bit more about it and I see 3 outcomes:

  1. have product category dropdown fields be stored as records in a SQL table rather than an XML
  2. add another possibility to Item dropdown list to match a field with XML and parse it - similar to SQL option but the SQL query would output an XML (1 record with 1 column) that would be parsed by the items (check attachment)
  3. not possible - we have to duplicate the setting

 

I think option 2 is the best one, avoiding restructuring the database (option 1). Let me know what you think.

 

Maybe in the future updating the way we create eCom custom fields to match the same possibilities as Items would be a good idea.

 

Best Regards,

Nuno Aguiar

ItemType.png

 

You must be logged in to post in the forum