Create custom notification event Carttrob - php

If I need to create a custom notification event, that sends an email when the user arrives to the ORDER SUMMARY page (coming from CHECKOUT page, but I don't think that matter) what should I do?
I found this on the documentation: https://www.cartthrob.com/docs/developers/notifications/index.html#registering-an-event
But is necessary to create an extension or a module only for an event?
Can you provide me a very basic example on how can I create an event and how can I call it on the order_summary.html ? Maybe an EE tag?

(I'm with Vector, the people behind CartThrob)
You'll definitely need some kind of custom code to create a custom event. Typically yes, that'd be in the form of an extension or module.
That said, it doesn't need to necessarily be a CartThrob notification in your case. Something like this might work: https://devot-ee.com/add-ons/email-from-template
If you want to use CartThrob notifications, you'd have your custom module or extension add the notification type to CartThrob as shown on the page you linked. Then on the summary page you'd have a tag from your custom module, and that tag's logic would fire the notification.
If you need more help with this it's certainly something we can build for you. Feel free to email us at support#cartthrob.com!

Related

How can we change the create order button link on ORO Commerce?

We need to change create order button link like: baseurl/sso/checkout/
Like on this screenshot
I have created the bundle extension and when we this bundle extension add-in our app then all create order link change to our custom URL.
How can we possibly need to change programmatically?
And How can we every cart order data get to our custom URL page?
How can we possibly need to change programmatically?
You can remove the original button that comes from workflow and insert the new one with the layout update, but it's highly not recommended.
Checkout in OroCommerce uses a workflow engine, that is highly customizable. We recommend customizing the workflow instead.
How can we every cart order data get to our custom URL page?
To customize the checkout process, it is preferred to use the custom workflow based on one of the built-in checkout workflows.
As an example of customization, there is an alternative checkout workflow available out of the box.

Trigger a specific button and run some code with Prestashop

I wanted to run some code via PrestanShop when a specific button is pressed, before/after the designed action is happened.It's not alter the designed action, just is send some notification to an external system (notify the 3-rd party that we have a new sale and maybe with sales detalis: product, prices, etc)
To be more specific the action is finish a sale(or make an order) when click the related button.
I read something related (hooks and module) but maybe someone have the same issue then any help is appreciated.(even with no code, but good hints)
Maybe what hook is to be triggered here or some hints how to alter the code using PS-standards.
(light way and not just adding some php code to alter in the hard way the core)
Note: language on interface is romanian and the action is when a sale is post into the system (became an order, payments is not relevant/order_status).
Thank you,
Traian
You can use actionValidateOrder and make your call to your 3rd party in this function.
This hook is called here :
classes/PaymentModule.php line 716

How to trigger callback in moodle 3.6 (PHP)

We have 2 application one is main application and second is moodle 3.6, we want to trigger a callback from Moodle to our main application when a user starts a course or complete a course, How to implement this functionality.
Thanks in advance.
You may code it along this lines:
Create a plugin for Moodle, if you are just handling this "event emission" thing, you may just make a "local plugin" (https://docs.moodle.org/dev/Local_plugins). I recommend you to use a plugin skeleton generator to generate the boilerplate code for the plugin: https://moodle.org/plugins/tool_pluginskel
In your plugin, register the event observers for the relevant core events (documentation here: https://docs.moodle.org/dev/Event_2#Event_observers ). For example: course_completed would be an straightforward one according to your needs. You have a list of events here: https://docs.moodle.org/dev/Event_2#Existing_events .
From the listener method linked to the observer you can make the relevant external calls to your main app.

Kanboard Custom Fields

Customization work regarding Kanboard
I need to add custom fields to the create new task form. Can this be achieved using Metadata Manager plugin?
Will I need to hire a developer to get this done?
Currently there's only Title, Description & Tags available. I Just need to add three more fields to show in the task box in Kanban view.
Thanks!
No, the Metadata plugin will not achieve that. There is a plugin that will allow you to create custom fields that will be included on the create task form, but since you didn't ask, I cannot tell you which plugin (I tried already, and it was downvoted and deleted because it didn't answer your question apparently)
No, you will not need to hire a developer to get this done, assuming you can find the plugin I am referring to.
With said plugin, you will be able to add as many custom fields as you wish, as well as, including them in task exports, filtering, change their type, etc...
Good luck in your search!

Add comment when using Paypal checkout in magento

I want to know if there is any way to allow customers to add comments during checkout process when using Paypal checkout?.
EDIT: this comment will show up in the sales email and order.
I found some comments modules but seems to work only with the regular checkout process!.
Thanks in advance.
Adding that functionality with PayPal isn't an option, but you can add a comment after the order is placed on the thanks page.
You'll want to add a form with a text area to success.phtml, then follow the steps on the controller that it submits to. You'll probably want to submit to a custom module.
First, get the customer's last order:
$order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId());
Next, take that order and update its comment.
$order->setCustomerNote($this->getRequest()->getParam('YOUR_COMMENT_FIELD_NAME'));
$order->save();
If you use AJAX you can return JSON stating the note has been saved (or a validation error occurred) directly from the controller and avoid the need for a view.
If you're unsure of how to go about creating a custom module I'd recommend starting here:
http://blog.baobaz.com/en/blog/developing-module-for-magento-tutorial-where-to-begin-part-1
The only change I'd recommend is not echoing your output (even if it is JSON directly from the controller), but instead using something like this:
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode(array('status'=>'success')));

Categories