Closed Quentindeve closed 1 month ago
That's odd - I just tried logging some things from an order using that event, on version 2.6.5, and it worked as expected.
I tried something like this:
And I had both the order ID, and the name of the product I had in the order output in the logs.
Whatever Community Store version are you running?
I use CS version 2.6.4 with Concrete 9.2.8.
Is it the same for the Invoice method, as for other payment methods?
On Mon, 10 Jun 2024, 09:26 Quentin, @.***> wrote:
I use CS version 2.6.4.
— Reply to this email directly, view it on GitHub https://github.com/concretecms-community-store/community_store/issues/881#issuecomment-2157689748, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIHSMDU55WBVL2ST7KL7WLZGVPKXAVCNFSM6AAAAABJBYMXL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJXGY4DSNZUHA . You are receiving this because you commented.Message ID: @.*** com>
Yes, the issue is unrelated to payment methods unfortunately
How strange.
If you want to send me the add-on you're working on I'm happy to take a look. Or if you've got a development environment to debug, happy to look at that too. Shoot a message to ryan@mesuva.co.uk
Done !
After few emails with @Mesuva the solution was found:
/index.php/dashboard/system/environment/entities
Doctrine development mode
Refresh entities
It solved the issue on my side !
What went wrong
I did a simple package for ConcreteCMS that subscribes to the "on_community_store_order" event. The function called on trigger is here:
However, the array returned by this Order is empty. Moreover, fetching it with Order::getByID(int $id) doesn't solve the issue. Therefore this code snippet doesn't work too: