The api don't get new added attributes at the order

i added there free text field to s_order_attribute but the api just get the atrributes from atrribute1 to atrribute6 and dont get the new added attribute

clear all caches

1 „Gefällt mir“

@Shyim schrieb:

clear all caches

I cleared it but the same result

does the added free text field attribute supported at the API?

Hi I created the free text field by a plugin and it appeared at there places but the API couldn’t retrieve  theme even after clear cache,

but after adding another free text field  from the backend  all the attribute begin appearing  

I thought there is a problem, and there is a code must be implemented at the plugin to update doctrine or another think ?!

because after uninstalling the plugin and uninstall the free text filed the uninstaller of the plugin for example (the order trying to find the removed field) and the problem goes when I add some free text field or remove anyone.

the backend do something to refresh the framework. 

 

ah yes I found the code that must implemented after adding or removing the attribute 

		$metaDataCache = Shopware()->Models()->getConfiguration()->getMetadataCacheImpl();
		$metaDataCache->deleteAll();
		Shopware()->Models()->generateAttributeModels(['s_order_attributes']);

 

The attributes are cached, but this cache won’t be cleared via backend, only when called in a plugin installation (like you mentioned in your last answer), by generating attribute models in the free text field module and by clearing the cache manually on the server.

1 „Gefällt mir“