[Skip to main content](#vessel-content)

#   Plugin not listening to onAfterCheckoutStep trigger

##

- **[moncho](/forum/user/35822-moncho "View moncho's Profile")**
- [![moncho's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35822-moncho "View moncho's Profile") Topic Author
- [ Offline](/forum/user/35822-moncho)

Less More

- Posts: 4
- Thank you received: 1
-
-

8 years 6 months ago [\#291924](#291924) by [moncho](/forum/user/35822-moncho "View moncho's Profile")  *[Plugin not listening to onAfterCheckoutStep trigger](/forum/25-install-update/894565-plugin-not-listening-to-onaftercheckoutstep-trigger#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 :  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")* was created by *[moncho](/forum/user/35822-moncho "View moncho's Profile")*

-- 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, &amp;$go_back, $original_go_back, &amp;$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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg5NDU2NS1wbHVnaW4tbm90LWxpc3RlbmluZy10by1vbmFmdGVyY2hlY2tvdXRzdGVwLXRyaWdnZXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86573
- Thank you received: 14317
-
-

8 years 6 months ago [\#291931](#291931) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Plugin not listening to onAfterCheckoutStep trigger](/forum/25-install-update/894565-plugin-not-listening-to-onaftercheckoutstep-trigger#291931 "-- 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 :  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")*

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(&amp;$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](/forum/user/35822-moncho "View moncho's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg5NDU2NS1wbHVnaW4tbm90LWxpc3RlbmluZy10by1vbmFmdGVyY2hlY2tvdXRzdGVwLXRyaWdnZXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[moncho](/forum/user/35822-moncho "View moncho's Profile")**
- [![moncho's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35822-moncho "View moncho's Profile") Topic Author
- [ Offline](/forum/user/35822-moncho)

Less More

- Posts: 4
- Thank you received: 1
-
-

8 years 6 months ago [\#292004](#292004) by [moncho](/forum/user/35822-moncho "View moncho's Profile")  Replied by *[moncho](/forum/user/35822-moncho "View moncho's Profile")* on topic *[Plugin not listening to onAfterCheckoutStep trigger](/forum/25-install-update/894565-plugin-not-listening-to-onaftercheckoutstep-trigger#292004 "-- 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 :  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")*

Hi,
that was it. Working perfectly now, thank you very much!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg5NDU2NS1wbHVnaW4tbm90LWxpc3RlbmluZy10by1vbmFmdGVyY2hlY2tvdXRzdGVwLXRyaWdnZXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.043 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
