Skip to main content

Plugin not listening to onAfterCheckoutStep trigger

8 years 6 months ago #291924 by moncho
-- HikaShop version -- : HikaShop Business 3.4
-- Joomla version -- : Joomla! 3.7.5

Hi,
I'm trying to build a simple plugin that should perform an action each time 'next' button is clicked during checkout, so tried to capture onAfterCheckoutStep :
Code:
public function onAfterCheckoutStep($controllerName, &$go_back, $original_go_back, &$controller){ var_dump("step:".$controllerName); }
Tried to create it either as a hikashop plugin and a system plugin with the same result:

Once enabled there was no output added, so in order to check if the trigger was being fired I tried to enable other plugin listening to the same event (userpoints). When this other plugin was added to the checkout, then I do receive output from my plugin, but only regarding userpoints controller, this is the var dump shown:

step:plg.shop.userpoints

I couldn't find any information about extra steps needed to capture this type of action, is there any configuration missing?

Thanks

Please Log in or Create an account to join the conversation.

8 years 6 months ago #291931 by nicolas
Hi,

The trigger is only called when a step has at least one view added by a plugin.
So you would have to implement onCheckoutStepList(&$list) to add a view to the list of available views in the checkout workflow editor, and then add that view to the checkout workflow.
The following user(s) said Thank You: moncho

Please Log in or Create an account to join the conversation.

8 years 6 months ago #292004 by moncho
Hi,
that was it. Working perfectly now, thank you very much!

Please Log in or Create an account to join the conversation.

Time to create page: 0.043 seconds
Powered by Kunena Forum