robert_baumrobert_baum MemberComments: 3 Received thanks: 0 Member since: June 17

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

Answers

  • ShyimShyim MemberComments: 875 Received thanks: 349 Member since: May 2015

    clear all caches

    Thanked by 1robert_baum
  • robert_baumrobert_baum MemberComments: 3 Received thanks: 0 edited June 27 Member since: June 17

    clear all caches

    I cleared it but the same result

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

  • robert_baumrobert_baum MemberComments: 3 Received thanks: 0 Member since: June 17

    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. 

     

  • robert_baumrobert_baum MemberComments: 3 Received thanks: 0 Member since: June 17

    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']);

     

  • Moritz NaczenskiMoritz Naczenski AdministratorsComments: 8044 Received thanks: 2354 edited June 27 Member since: September 2013

    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.

    Thanked by 1robert_baum
Sign In or Register to comment.