Custom Email Notification To Vendor

Hi,

I would like vendors to receive a custom message whenever they get an order processed. Currently, they get copied on the same email sent to customers. Can this be easily done with a few lines of codes or this would be a candidate for a custom addon?

Thanks!

Multivendor 4.3.9

Hi,

I would like vendors to receive a custom message whenever they get an order processed. Currently, they get copied on the same email sent to customers. Can this be easily done with a few lines of codes or this would be a candidate for a custom addon?

Thanks!

Multivendor 4.3.9

Hi,

You can add some custom message by adding some lines of code in some files.

Please open file named

app/functions/fn.cart.php

There is function name :

fn_order_notification(&$order_info, $edp_data = array(), $force_notification = array())

This function contains the lines of code from where vendor got notification related to order. The lines of code is:

 if ($notify_vendor == true) {
            if (fn_allowed_for('MULTIVENDOR') && !empty($order_info['company_id'])) {
            $company_lang_code = fn_get_company_language($order_info['company_id']);

            // Translate descriptions to admin language
            fn_translate_products($order_info['products'], '', $company_lang_code, true);

            Mailer::sendMail(array(
                'to' => 'company_orders_department',
                'from' => 'default_company_orders_department',
                'reply_to' => $order_info['email'],
                'data' => array(
                    'order_info' => $order_info,
                    'shipments' => $shipments,
                    'use_shipments' => $use_shipments,
                    'order_status' => fn_get_status_data($order_info['status'], STATUSES_ORDER, $order_info['order_id'], $company_lang_code),
                    'payment_method' => fn_get_payment_data($payment_id, $order_info['order_id'], $company_lang_code),
                    'status_settings' => $status_settings,
                    'profile_fields' => fn_get_profile_fields('I', '', $company_lang_code),
                    'secondary_currency' => $secondary_currency
                ),
                'tpl' => 'orders/order_notification.tpl',
                'company_id' => $order_info['company_id'],
            ), 'A', $company_lang_code);
        }
    }

You can add custom data here accordingly.

For example : if you want to add a index "custom_message" which contains the custom data after a index "'secondary_currency' => $secondary_currency" in above lines of code.

'custom_message' =>'custom text',

When you add custom code after that you need to add code according in tpl file also.

Go to design/backend/mail/templates/orders :

At this point you need to think logically. There are two tpl files :

1) invoice.tpl

2) order_notification.tpl

You need to add "custom_message" index data in the above tpl file also as per requirements.

Hope above steps help you.

Thank you

Is there an easier way to edit this email? I want to edit the text sent to the new vendor that signs up but this is not easy for someone who doesn't code. Any tips or ideas would be appreciated

I think if you use ver4.4.1 then you can use the email editor to create custom message for admin/vendors. I haven't tried yet though.

I'll try that thanks! Isn't there a letter that is automatically sent to the new Vendor when they sign up and hit the Submit Button? This seems like it should be easily available to Admin to update. Otherwise how on earth do the new vendors know what to do?