different addresses from Order creation notification

  • Posts: 1056
  • Thank you received: 11
  • Hikashop Business
8 years 1 month ago #251351

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 2.5.28
-- PHP version -- : 5.4

Hello,

i use two registration forms (fabrik for retail customers and hikashop for wholesale customers), when a user makes an order they receive the "Order creation notification" email for their order from the same email address "This email address is being protected from spambots. You need JavaScript enabled to view it.".

I was wondering if it is possible, when the retail customers make an order to receive the "Order creation notification" email from "This email address is being protected from spambots. You need JavaScript enabled to view it." address and the wholesale customers to receive the same "Order creation notification" from different address "This email address is being protected from spambots. You need JavaScript enabled to view it.".

Thank you

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
8 years 1 month ago #251365

Hi,

The question is how do you know that a customer is a retailer or a wholesaler ?
Do you have a custom user field where that is set ? Or maybe the user group ?
It's only a matter of editing the email, and adding a check on that and then changing the sender email of the email with such code:
$mail->from_mail = 'This email address is being protected from spambots. You need JavaScript enabled to view it.';

The following user(s) said Thank You: verzevoul

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

  • Posts: 1056
  • Thank you received: 11
  • Hikashop Business
8 years 1 month ago #251410

Hi nicolas,

i have different user groups. When you say to add a check i m not really sure how to do that!
Could you help me with that? I will send you joomla admin if you could check.

Thank you

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
8 years 1 month ago #251420

Hi,

You can get the user id in $data->customer->id
And you can get the groups of a user like that:
forum.joomla.org/viewtopic.php?t=826562
Then, it is basic PHP to check the user groups once you have them.

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

Time to create page: 0.063 seconds
Powered by Kunena Forum