VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: dfin on September 24, 2014, 06:26:31 AM

Title: Order Confirmation Email - file locations?
Post by: dfin on September 24, 2014, 06:26:31 AM
which folders and areas are the main ones to edit the email function for sending the vendor their order confirmation email?

(also using authorize.net plugin)

I wanted to manually add a second site owner to receive it, since I can't figure another way (and owner is against the orders@ mailbox forwarded idea)

Joomla  2.5.24  virtuemart 2.6.6

Thanks.
Title: Re: Order Confirmation Email - file locations?
Post by: GJC Web Design on September 25, 2014, 00:45:57 AM
I did this  components/com_virtuemart/helpers/shopfunctionsf.php  line 262

if(isset($view->doVendor) && !$noVendorMail) {
$recipient = explode(',',$view->vendor->vendorFields['fields']['address_2']['value']);//GJC added
$recipient[] = $view->vendorEmail; //GJC added

if(isset($vars['orderDetails'])){
$order = $vars['orderDetails'];
$orderstatusForVendorEmail = VmConfig::get('email_os_v',array('U','C','R','X'));
if(!is_array($orderstatusForVendorEmail)) $orderstatusForVendorEmail = array($orderstatusForVendorEmail);
if ( in_array((string)$order['details']['BT']->order_status,$orderstatusForVendorEmail)){
#self::sendVmMail( $view, $view->vendorEmail, TRUE );
self::sendVmMail($view, $recipient, TRUE);//GJC added
}else{
$user = -1;
}
} else {
#self::sendVmMail( $view, $view->vendorEmail, TRUE );
self::sendVmMail($view, $recipient, TRUE);//GJC added
}

}



then use the address_2 vendor field as the second email address input

Title: Re: Order Confirmation Email - file locations?
Post by: dfin on October 21, 2014, 19:31:51 PM
I'm just getting back to this....

Thanks for replying. There are 2 people on here I see a lot & like reading and learning things from...and they both have responded to my threads. Makes it easy to bookmark their professional sites...thanks.

Was I to replace 'address_2' with the email address I'm wanting to add, or is this field referenced somewhere else as well?

Thank you.

Title: Re: Order Confirmation Email - file locations?
Post by: GJC Web Design on October 21, 2014, 22:23:01 PM
yes - sorry - address_2 not clear

To prevent having to hack the admin to provide an input for the second address I just used the Vendor address 2 field in the admin
relabeled this as 2nd email address .. therefore it's stored in the config etc without needing back end hacks
Title: Re: Order Confirmation Email - file locations?
Post by: rhand-vm on July 07, 2015, 05:26:54 AM
Quote from: GJC Web Design on October 21, 2014, 22:23:01 PM
yes - sorry - address_2 not clear

To prevent having to hack the admin to provide an input for the second address I just used the Vendor address 2 field in the admin
relabeled this as 2nd email address .. therefore it's stored in the config etc without needing back end hacks
I know this has been nine months but was also looking for adding a secondary address so purchase information requests would go to client and to two company email addresses.  I understand that you added a vendor and used the Vendor address to field in the admin to send the extra email there? And I assume change the template to send to that address?