Skip to main content

Affiliate Mail

More
13 years 10 months ago #76331 by manjeshmohan
Affiliate Mail was created by manjeshmohan
Hi,

How can I send the Affiliate Partner a mail with the detail of the commision he has received plus the total unpaid amount when a successful order has been placed by a user?

Thanks & Regards,
Manjesh.

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

More
13 years 10 months ago #76553 by Jerome
Replied by Jerome on topic Affiliate Mail
Hi,

This feature is not implemented in HikaShop but it could be implemented using a custom plugin or by modifying the current affiliate plugin.
HikaShop have a lot of triggers and the trigger "onAfterOrderUpdate" is called when an order is update.
You can create a plugin which would receive this trigger and which would send an email to the affiliate partner if the order is confirmed.
The first parameter of the function is the order object which would contains a lot of useful information.
You can retrieve the user_id of the order, get the affiliate (if there), retrieve affiliate information and send him an email.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: manjeshmohan

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

More
13 years 10 months ago #77704 by manjeshmohan
Replied by manjeshmohan on topic Affiliate Mail
Is this the path and file of the affiliate plugin where we need to change? Do we need to change in any other files?

\components\com_hikashop\controllers\affiliate.php

Thanks & Regards,
Manjesh.

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

More
13 years 10 months ago #77730 by manjeshmohan
Replied by manjeshmohan on topic Affiliate Mail
It would be very helpful for me if could you please get me some sample code for testing the same? Let it be a simple one to check how the mail is send and received at the recipient's end.

I've tried so many ways but could not get the mail.

Thanks.

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

More
13 years 10 months ago #77819 by Jerome
Replied by Jerome on topic Affiliate Mail
Hi,

The affiliate system is a plugin so you can find it in the plugin folder : /plugins/system/hikashopaffiliate/

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: manjeshmohan

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

More
13 years 10 months ago #78154 by manjeshmohan
Replied by manjeshmohan on topic Affiliate Mail
Thanks for mentioning the path of the affiliate plugin code.
I've tried to test by adding the OnAfterOrderUpdate function and setting the true for sending the mail but I'm not getting any mail. I've checked the documentation and tried so many experiemtns also but no result was found.
Could you please show some sample working model of this function so as to test the sending of the mail?

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

More
13 years 10 months ago #78192 by Xavier
Replied by Xavier on topic Affiliate Mail
Hi,
Code:
$mailClass = hikashop_get('class.mail'); $mail = new stdClass(); $mail->content = "content"; $mail->subject = $subject; $mail->from_email = $config->get('from_email'); $mail->from_name = $config->get('from_name'); $mail->reply_email = $element->email; $mail->dst_email = 'email1, email2; $status = $mailClass->sendMail($mail);

Or you can find a demonstration in the file: "components/com_hikashop/controllers/product.php"

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

Time to create page: 0.295 seconds
Powered by Kunena Forum