Quantcast
Channel: Programmierung - Shopware Community Forum
Viewing all articles
Browse latest Browse all 2871

Attribut Model wird nicht neu "gebaut"

$
0
0

Ich lege wie folgt Attribute an, leider wenn ich das Plugin installiere bleiben die alten Models erhalten und ich habe somit kein Setter und kein Getter. Erst wenn ich den /var/cache/revision Order komplett lösche wird das Model neu gebaut.

 

	public function installOrderAttributes()
	{
		Shopware()->Models()->addAttribute(
			's_order_attributes',
			'ordermod',
			'Random1',
			'DECIMAL(12,4)',
			false,
			0.0000);
		Shopware()->Models()->addAttribute(
			's_order_attributes',
			'ordermod',
			'Random2',
			'DECIMAL(12,4)',
			false,
			0.0000);

		$metaDataCacheDoctrine = Shopware()->Models()->getConfiguration()->getMetadataCacheImpl();
		$metaDataCacheDoctrine->deleteAll();

		Shopware()->Models()->generateAttributeModels(array('s_order_attributes'));
	}

 


Viewing all articles
Browse latest Browse all 2871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>