Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount! Get 20% off now with code SPOOKY-2024!

Virtuemart - Using new Trigger with CB auto actions

8 years 3 weeks ago #286669 by smalldragoon
Hello Team,
Understading correctly , CB do nto support anymore Virtuemart Natively.
My need would be to trigger an action when cart is processed for payment.


I think the best solution would be to implement a custom CB trigger and use it through CB auto actions.
My first reference is www.joomlapolis.com/documentation/18358-using-cb-triggers
and I followed this post as well : link

to reformalize and make it easier ,
I must

insert at the appropriate location on virtuemart code the follwing to raise a new trigger :
Code:
global $_PLUGINS; if ( ( ! file_exists( JPATH_SITE . '/libraries/CBLib/CBLib/Core/CBLib.php' ) ) || ( ! file_exists( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ) ) ) { echo 'CB not installed'; return; } include_once( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ); cbimport( 'cb.html' ); cbimport( 'language.front' ); $_PLUGINS->loadPluginGroup( 'user' ); $_PLUGINS->trigger( 'VirtueMart_Checkout', array( $cartvalue,$cart_id ) );


Then , I assume I should create a reference of this somewhere in CB auto action right ? where and how ? ( jsut as ex, to have it availabe lin the drop down list ? )
Thx !

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48454
  • Thanks: 8280
  • Karma: 1443
8 years 3 weeks ago #286698 by krileon
Once your code is added to VM and you're sure it's executing just use your custom trigger in CB Auto Actions and it'll work. The triggers dropdown is a tags usage so to add new triggers just type them and press enter or space.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

8 years 2 weeks ago #286791 by smalldragoon
Replied by smalldragoon on topic Virtuemart - Using new Trigger with CB auto actions
OK, Thanks ! did not paid attention you can specify custom triggers

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

Moderators: beatnantkrileon
Powered by Kunena Forum