[gelöst] Hook Problem, bzw. Frage nach zugriff auf Variable

Ich hab einen Hook für die UpdateArtikel geschrieben mit TypeReplace. damit die nun wie das Original funktioniert muss man ja bestimmte Stellen umschreiben, wie zB. aus $this->sSYSTEM->sSESSION_ID wird session_id() und aus $this->sSYSTEM->sDB_CONNECTION->GetRow wird Shopware()->Db()->fetchOne nun meine Frage: wird aus [quote]$this->sSYSTEM->sCONFIG[‚sMAXPURCHASE‘][/quote] das[quote]Shopware()->Config()->sMAXPURCHASE[/quote] ?? und was wird aus folgendem: [quote]$this->sSYSTEM->sUSERGROUP[/quote] das [quote]Shopware()->sUSERGROUP[/quote] Ich habe nämlich für die Usergroup ein problem, das bleibt nmlich leer und holt so auch nicht den default wert.

Keiner eine Lösung ?? Shopware-Team?! HILFE

Hallo troemmelt, versuch’ es doch mal mit Shopware()-\>System()-\>sUSERGROUP Das dürfte bereits funktionieren. Gruß, Patrick :shopware:

1 „Gefällt mir“

gilt dann für den zugriff auf die config die ursprünglich $this->sSYSTEM->sCONFIG[‘sMAXPRUCHASE’] folgendes: Shopware()->System()->Config()->sMAXPURCHASE ???

Hallo, nein, dein vorheriger Ansatz war bereits richtig. Shopware()-\>Config()-\>sMAXPURCHASE und Shopware()-\>System()-\>sUSERGROUP sind somit die richtigen Befehle. Gruß, Patrick :shopware:

1 „Gefällt mir“

danke dir