ich möchte einen den Hook 'modifyPaymentOrShippingMethodInfo' nutzen, um die Versandkosten abhängig von Produkteigenschaften zu nutzen.
Theoretisch gibt es eine Doku dazu im Handbuch unter https://www.merconis.com/contao-handbuc ... rhsyns=%20
Mir fehlt allerdings die Angabe, welche Klasse die 'myMerconisHookClass' erweitern soll...
Nehme ich keine, funktioniert das $this->import nicht:
Code: Alles auswählen
request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\UndefinedMethodException: "Attempted to call an undefined method named "import" of class "alysionMerconisHooks"." at /var/www/clients/client1/web2/kraus/contao/system/modules/alysion_merconis/classes/alysionMerconisHooks.php line 58 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\UndefinedMethodException(code: 0): Attempted to call an undefined method named \"import\" of class \"alysionMerconisHooks\". at /var/www/clients/client1/web2/kraus/contao/system/modules/alysion_merconis/classes/alysionMerconisHooks.php:58)"} []
Hängt das mit diesem Hinweis im Code zusammen:
Code: Alles auswählen
FIXME: The singleton architecture doesn't really work here because when processing getCartFromSession()
* somewhere in the program flow ls_shop_cartX::getInstance() is being called before the first call of
* ls_shop_cartX::getInstance was able to store the self-reference.