Jump to content

Returns (Rma) Email Notification


robertomagan

Recommended Posts

  • 3 weeks later...

I don't really know what I'm doing, but after a lot of trial and error this seems to work (PS 1.4.6.2):

 

In the file "controllers/OrderFollowController.php" you need to find the following line (69 in my version):

 

  Tools::redirect('order-follow.php');

 

Immediately BEFORE this line you need to insert the following code:

 

  $customer = new Customer((int)($order->id_customer));
  $templateVars = array(
'{firstname}' => $customer->firstname,
'{lastname}' => $customer->lastname,
'{email}' => $customer->email,
'{id_order}' => $id_order,
'{message}' => $orderReturn->question);
  $id_lang = (is_object($cookie) AND isset($cookie->id_lang)) ? (int)$cookie->id_lang : (int)Configuration::get('PS_LANG_DEFAULT');
  $iso = Language::getIsoById((int)$id_lang);
  Mail::Send((int)(Configuration::get('PS_LANG_DEFAULT')), 'order_customer_comment', Mail::l('Return Merchandise Authorization request'), $templateVars, Configuration::get('PS_SHOP_EMAIL'), NULL, NULL, NULL, NULL, NULL, _PS_MAIL_DIR_, true);

 

Hope it works for you...

 

Dafydd

Link to comment
Share on other sites

  • 4 weeks later...

Dafydd,

Thanks for the work-around, but I think this is an important feature for core prestashop.

I see that many people have requested this feature.

Can anyone from Prestashop confirm if it is on the feature roadmap (or point me to a link to see the roadmap)?

Cheers.

Link to comment
Share on other sites

  • 4 months later...
  • 4 weeks later...

For PS 1.4.8.2 use:

  if (!Configuration::get('PS_MAIL_EMAIL_MESSAGE'))
  $to = strval(Configuration::get('PS_SHOP_EMAIL'));
  else
  {
   $to = new Contact((int)(Configuration::get('PS_MAIL_EMAIL_MESSAGE')));
   $to = strval($to->email);
  }
   $customer = new Customer((int)(self::$cookie->id_customer));
  if (Validate::isLoadedObject($customer))
  Mail::Send((int)self::$cookie->id_lang, 'order_customer_comment', Mail::l('Return Merchandise Authorization request', (int)self::$cookie->id_lang),
  array(
  '{lastname}' => $customer->lastname,
  '{firstname}' => $customer->firstname,
  '{email}' => $customer->email,
  '{id_order}' => $orderReturn->id_order,
  '{message}' => $orderReturn->question),
  $to,strval(Configuration::get('PS_SHOP_NAME')), $customer->email, $customer->firstname.' '.$customer->lastname);

Link to comment
Share on other sites

  • 3 months later...
  • 2 months later...
  • 3 months later...
  • 2 weeks later...
  • 1 month later...
  • 1 month later...

Somehow it doesn't work for me on 1.5.4.1

 

This is my updated file part:

 

  $orderReturn->addReturnDetail($ids_order_detail, $order_qte_input, $customizationIds, $customizationQtyInput);
  Hook::exec('actionOrderReturn', array('orderReturn' => $orderReturn));
if (!Configuration::get('PS_MAIL_EMAIL_MESSAGE'))
$to = strval(Configuration::get('PS_SHOP_EMAIL'));
else
{
$to = new Contact((int)(Configuration::get('PS_MAIL_EMAIL_MESSAGE')));
$to = strval($to->email);
 }
 $customer = new Customer((int)(self::$cookie->id_customer));
 if (Validate::isLoadedObject($customer))
 Mail::Send((int)self::$cookie->id_lang, 'order_customer_comment', Mail::l('Return Merchandise Authorization request', (int)self::$cookie->id_lang),
array(
 '{lastname}' => $customer->lastname,
 '{firstname}' => $customer->firstname,
 '{email}' => $customer->email,
 '{id_order}' => $orderReturn->id_order,
 '{message}' => $orderReturn->question),
 $to,strval(Configuration::get('PS_SHOP_NAME')), $customer->email, $customer->firstname.' '.$customer->lastname);
Tools::redirect('index.php?controller=order-follow');
 }
}

 

Is there anything else I should do in order to get this notification working?

 

Thanks for help.

Link to comment
Share on other sites

  • 3 weeks later...

GitHub: https://github.com/Ha99y/PrestaShop-modules-rmaNotify

 

V1.0 rmanotify_v1.0.zip

I am attaching a module that works with prestashop 1.5+

 

V1.1 rmanotify-v1.1.zip

Now you select if customer should get a email for submitting RMA request

 

V1.2 rmanotify-v1.2.zip 

- Now you can use 2 custom email templates (edit files in folder modules/rmanotify/mails/en/)

- Option to enter custom email address

 

Edited by HA!*!*Y (see edit history)
  • Like 5
Link to comment
Share on other sites

  • 1 month later...

I have made some modification to HA!*!*Y module, since I needed for a client, i'm going to share it here.

 

 

Changelog:

1. Module Option allow you to choose one of your contact services configured in backend instead of writing emai.

 

2. Email is sent to the contact choosen.

 

3. Messages appear in Customer Threads in BO attached to the existing thread for the order or a new one if it doesn't exist.

 

thanks HA!*!*Y not me since it is his module.

rmanotify.zip

  • Like 6
Link to comment
Share on other sites

I have made some modification to HA!*!*Y module, since I needed for a client, i'm going to share it here.

 

 

Changelog:

1. Module Option allow you to choose one of your contact services configured in backend instead of writing emai.

 

2. Email is sent to the contact choosen.

 

3. Messages appear in Customer Threads in BO attached to the existing thread for the order or a new one if it doesn't exist.

 

thanks HA!*!*Y not me since it is his module.

 

Hi friend, in my 1.4.9.0 not show the email service and i have all right, i already check that, any suggestion for this ?

 

Tks..

Link to comment
Share on other sites

  • 4 weeks later...
  • 8 months later...
  • 2 weeks later...
  • 4 weeks later...

I have made some modification to HA!*!*Y module, since I needed for a client, i'm going to share it here.

 

 

Changelog:

1. Module Option allow you to choose one of your contact services configured in backend instead of writing emai.

 

2. Email is sent to the contact choosen.

 

3. Messages appear in Customer Threads in BO attached to the existing thread for the order or a new one if it doesn't exist.

 

thanks HA!*!*Y not me since it is his module.

Thanks a lot!!.

Perfect in ps1.5.6

Link to comment
Share on other sites

  • 2 weeks later...

I have made some modification to HA!*!*Y module, since I needed for a client, i'm going to share it here.

 

 

Changelog:

1. Module Option allow you to choose one of your contact services configured in backend instead of writing emai.

 

2. Email is sent to the contact choosen.

 

3. Messages appear in Customer Threads in BO attached to the existing thread for the order or a new one if it doesn't exist.

 

thanks HA!*!*Y not me since it is his module.

Hello Misthero

How we can add any separate email addresses which is not belong to customer service and webmaster, then how we can do that.

I want to add email address as we able to add email ids in Mail alert module.

 

Thanks.

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 1 month later...
  • 2 months later...
  • 1 month later...

Hello, thanks for the module!

But I'm having problems with the upload... I install the module but the modules page is empty after the upload. I also can't find it in the modules list.

Does anyone know why?

Thanks

 

I have the version 1.6.0.14

Edited by shopcommetoi (see edit history)
Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...
  • 2 years later...
  • 5 months later...

Hello everyone,

sorry to revive such an old post, but I have a similar problem! I would like my customer to receive an email when he submits a new rma, but I haven't find a way to make it happen on PrestaShop 1.7.

Does anyone know how yo do it (manually or with a module)?

Thanks!

Link to comment
Share on other sites

6 hours ago, Ale_BB said:

Hello everyone,

sorry to revive such an old post, but I have a similar problem! I would like my customer to receive an email when he submits a new rma, but I haven't find a way to make it happen on PrestaShop 1.7.

Does anyone know how yo do it (manually or with a module)?

Thanks!

You can find the paid modules on the addon store. 

https://addons.prestashop.com/en/search?search_query=RMA

Most of the modules on addon store offers the demo so you can check the module demo to find if these meets your requirement or not. 

Link to comment
Share on other sites

Hello,

18 hours ago, philipp.haugg said:

You can find the paid modules on the addon store. 

https://addons.prestashop.com/en/search?search_query=RMA

Most of the modules on addon store offers the demo so you can check the module demo to find if these meets your requirement or not. 

Hello Philipp,

I have already tried one of these module fo replace the stock rma procedure, but it didn't work well, so we came back to the original one.

What I simply need to add is the notification email for the customer as he opens the rma, nothing more than that. I suppose I should put some code somewhere, but I'm not experienced enough to do that on my own.

Link to comment
Share on other sites

Hi everyone,

 

The free PS Module  is called Email Notifications and works FINE with PrestaShop 1.7.6.4. It has to be downloaded via Modules >> Module Catalog

 

PS_module_email_notifications.thumb.png.af8327e6ee1f3f072fd9d8879a2b1080.png

 

The emails are send to Merchant for: 

  • new orders
  • merchandise order returns 
  • low stock based on limit defined by merchant 

PS_module_email_notifications_sent.thumb.png.f5ebbe9bd098077f3ae7492f1298542f.png

 

I hope this helps, 

 

Regards, Martin Mi

DataQuo, s.r.o. 

www.dataquo.eu

  • Like 1
Link to comment
Share on other sites

23 minutes ago, Martin Mi said:

Hi everyone,

 

The free PS Module  is called Email Notifications and works FINE with PrestaShop 1.7.6.4. It has to be downloaded via Modules >> Module Catalog.

Hi Martin,

isn't it the module that comes already installed with PrestaShop?

Link to comment
Share on other sites

  • 2 weeks later...
On 6/1/2020 at 5:45 AM, HA!*!*Y said:

Tested on PrestaShop version:1.7.6.4

Hello Happy!

I've downloaded your module and tested it on my PrestaShop 1.7.5.1 and it works perfectly, so I recommend it since it does what it says and, plus, it's free!

 

I came across your GitHub repository before, while searching for the module:

The only thing I would have liked even more is the ability to choose a different email template for this purpose, instead of the generic customer message one. This is only a suggestion, not a complain! It's a free module and, hey, you've done even more then you had to do :)

Have a nice day!

Link to comment
Share on other sites

  • 2 weeks later...
  • 8 months later...
  • 3 months later...
  • 3 months later...

Confirm that this works on Prestashop 1.7.7.7

I made a single email template so that is can distinguish the normal costumer email regarding questions and RMA emails.

 

$customer = new Customer((int)($order->id_customer));
  $templateVars = array(
'{firstname}' => $customer->firstname,
'{lastname}' => $customer->lastname,
'{email}' => $customer->email,
'{id_order}' => $id_order,
'{message}' => $orderReturn->question);
  $id_lang = (is_object($cookie) AND isset($cookie->id_lang)) ? (int)$cookie->id_lang : (int)Configuration::get('PS_LANG_DEFAULT');
  $iso = Language::getIsoById((int)$id_lang);
  Mail::Send((int)(Configuration::get('PS_LANG_DEFAULT')), 'order_customer_return', Mail::l('Retourmelding van klant'), $templateVars, Configuration::get('PS_SHOP_EMAIL'), NULL, NULL, NULL, NULL, NULL, _PS_MAIL_DIR_, true);
			

I added the code in "controllers/OrderFollowController.php" right before:

Tools::redirect('index.php?controller=order-follow');

and replaced the email to: order_costumer_return - also i changed the subject to my own language -> Retourmelding van klant.

See the atteached files for a custom email. Place both files in /mails/{YOURLANGUAGE}

 

 

order_customer_return.txt order_customer_return.html

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...