Plugin not listening to onAfterCheckoutStep trigger

  • Posts: 4
  • Thank you received: 1
5 years 11 months ago #291924

-- 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 :

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.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
5 years 11 months ago #291931

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.

  • Posts: 4
  • Thank you received: 1
5 years 11 months ago #292004

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.060 seconds
Powered by Kunena Forum