Sent Invoice to Vendors
-
- Ensign (ENS)
- Posts: 1
- Joined: Thu Oct 16, 2008 8:54 am
Sent Invoice to Vendors
In your Demo Version I set up 2 vendors and assigned an email to each one. I then created a product for each vendor and assigned the vendor to the product. I placed a product in the cart from each vendor. I was hoping each vendor would get a reciept with only their products on it. Currently both vendors recieve an email with the order however the whole order appears rather then their certian products. Please advise asap how this works.
Glen
Glen
Re: Sent Invoice to Vendors
---comments removed---
see a solution in my last post....
see a solution in my last post....
Last edited by mazhar on Tue Oct 21, 2008 9:29 am, edited 1 time in total.
Re: Sent Invoice to Vendors
When we select a particular email template to be sent on an email event the contents of that email will be sent to all the recipients. There is no way to distinguish who the mail is being sent to so that we could chose to modify its contents depending on the recipient.
One way to handle this would be to change the way mails are currently being generated. We will have to generate a separate email for each vendor.
One way to handle this would be to change the way mails are currently being generated. We will have to generate a separate email for each vendor.
-
- Lieutenant Commander (LCDR)
- Posts: 102
- Joined: Wed Apr 02, 2008 11:00 am
- Location: Stockholm, Sweden
- Contact:
Re: Sent Invoice to Vendors
How do I manually select an emailtemplate and send it to vendors as I could do in Able5.5?
Best regards, Thomas
Best regards, Thomas
Re: Sent Invoice to Vendors
Well guys here is the solution to send vendor specific notification. For this we have to write a piece of code and create a new Email Template that will be sent to the vendors. In order to use this solution each vendor must have Name and Email address provided.In your Demo Version I set up 2 vendors and assigned an email to each one. I then created a product for each vendor and assigned the vendor to the product. I placed a product in the cart from each vendor. I was hoping each vendor would get a reciept with only their products on it. Currently both vendors recieve an email with the order however the whole order appears rather then their certian products. Please advise asap how this works.
Glen
First of all we need to locate the place from where we want our Email to be triggered and I have selected that i have to trigger the Email when admin ships the orders. Edit the
Website\Admin\Orders\Shipments\ShipOrder.aspx page and locate the following lines of code in it
Code: Select all
//SHIP THE CURRENT SHIPMENT
_OrderShipment.Ship();
Code: Select all
//SHIP THE CURRENT SHIPMENT
_OrderShipment.Ship();
//Vendor Notification Code Start
foreach (OrderItem orderItem in _Order.Items)
{
if (orderItem.OrderItemType == OrderItemType.Product)
{
if (orderItem.Product.Vendor != null)
{
EmailTemplateCollection emailTemplates = EmailTemplateDataSource.LoadForCriteria(" Name = 'VendorNotificationEx' ");
if (emailTemplates.Count > 0)
{
emailTemplates[0].Parameters.Add("store", Token.Instance.Store);
emailTemplates[0].Parameters.Add("order", _Order);
emailTemplates[0].Parameters.Add("vendorname", orderItem.Product.Vendor.Name);
emailTemplates[0].ToAddress = orderItem.Product.Vendor.Email;
emailTemplates[0].Send();
}
}
}
}
//Vendor Notification Code End
Template Contents
Code: Select all
<html>
<head>
<style type="text/css">
TABLE.Email {
width: 640px;
padding: 5px;
margin: 0px;
border: 1px solid #5872CB;
}
TABLE.Email TH {
font-weight: bold;
font-size: 12px;
color: #ffffff;
font-family: Arial, Verdana, Sans-Serif;
font-style: strong;
background-color: #304FBA;
text-align: center;
text-decoration: none;
padding: 5px;
}
TABLE.Email TD {
font-weight: normal;
font-size: 12px;
color: #000000;
font-family: Arial, Verdana, Sans-Serif;
background-color: #ffffff;
text-align: left;
text-decoration: none;
padding: 3px;
}
</style>
</head>
<body>
<table class="Email">
<tr>
<td valign="top"><strong>$store.Name</strong><br>
<div style="padding-left:30px;">
$store.DefaultWarehouse.FormatAddress(true)
<BR>Phone: $store.DefaultWarehouse.Phone
<BR>Email: $store.DefaultWarehouse.Email
</div>
</td>
<td align="right">
<H1>Packing Slip</H1>
<strong>Order Number</strong>: $order.OrderId<br>
<strong>Order Date</strong>: ${order.OrderDate}</td>
</tr>
</table>
<table class="Email">
#foreach( $shipment in $order.Shipments )
<tr>
<td>
<strong>Ship To:</strong>
<div style="padding-left:30px;">
<p>$shipment.FormatToAddress(true)
<BR>Phone: $shipment.ShipToPhone
<br><strong>Address Type:</strong>
#if ($shipment.ShipToResidence) Residential #else Commercial #end
#if ($shipment.ShipMessage.Length > 0) <br>
<strong>Message:</strong> $shipment.ShipMessage
#end</p>
</div>
</td>
</tr>
<tr>
<td>
<table width="100%" border="2" align="center">
<tr>
<th class="Email">SKU</th>
<th class="Email">Product Name</th>
<th class="Email">Options</th>
<th class="Email">Quantity</th>
</tr>
<b>Vendor Name: </b>$vendorname
#foreach( $orderItem in $order.Items )
#if($orderItem.Product.Vendor.Name == $vendorname)
#if ($orderItem.OrderShipmentId == $shipment.OrderShipmentId)
<tr>
<td style="text-align: center;">$orderItem.Sku</td>
<td>$orderItem.Name<br><font size=2><strong>$orderItem.LineMessage</strong>
#if ($orderItem.Inputs.Count > 0)
#foreach( $input in $orderItem.Inputs )
<strong>$input.Name</strong><strong>:</strong>
$input.InputValue
#end
#end
</font></td>
<td>$orderItem.VariantName</td>
<td style="text-align: center;">$orderItem.Quantity</td>
</tr>
#end
#end
#end
</table>
</td>
</tr>
<tr>
<td style="text-align: center;">
<br>
Thank you for your order. If you have any questions, please contact
$store.Name<br></td>
</tr>
#end
</table>
</body>
</html>
Re: Sent Invoice to Vendors
[/quote]
First of all we need to locate the place from where we want our Email to be triggered and I have selected that i have to trigger the Email when admin ships the orders. Edit the
Website\Admin\Orders\Shipments\ShipOrder.aspx page and locate the following lines of code in it
[/quote]
What if I wanted to trigger the Email to send when the Admin captures payment for the order? Could you please post the code for that? Pretty please!
I need the email to send to the vendor BEFORE we Ship the item. We are "shipping" the item once we get a tracking number back from the vendor and can put this information into Able for the customer to see.
Thank you!
Jay
http://www.American-Gymnast.com/shop
First of all we need to locate the place from where we want our Email to be triggered and I have selected that i have to trigger the Email when admin ships the orders. Edit the
Website\Admin\Orders\Shipments\ShipOrder.aspx page and locate the following lines of code in it
Code: Select all
//SHIP THE CURRENT SHIPMENT
_OrderShipment.Ship();
What if I wanted to trigger the Email to send when the Admin captures payment for the order? Could you please post the code for that? Pretty please!
I need the email to send to the vendor BEFORE we Ship the item. We are "shipping" the item once we get a tracking number back from the vendor and can put this information into Able for the customer to see.
Thank you!
Jay
http://www.American-Gymnast.com/shop
Re: Sent Invoice to Vendors
Edit your Admin/Orders/Payments/CapturePayment.aspx.cs file and locate the following method
and change it as
Code: Select all
protected void SubmitCaptureButton_Click(object sender, EventArgs e)
{
//GET THE CAPTURE AMOUNT
LSDecimal captureAmount = AlwaysConvert.ToDecimal(CaptureAmount.Text);
bool finalCapture = NoAdditionalCapture.Checked;
if (captureAmount > 0)
{
_Payment.Capture(captureAmount, finalCapture, false);
if (!string.IsNullOrEmpty(CustomerNote.Text))
{
OrderNote note = new OrderNote(_Order.OrderId, Token.Instance.UserId, DateTime.UtcNow, CustomerNote.Text, NoteType.Public);
note.Save();
}
}
Response.Redirect("Default.aspx?OrderId=" + _OrderId.ToString());
}
Code: Select all
protected void SubmitCaptureButton_Click(object sender, EventArgs e)
{
//GET THE CAPTURE AMOUNT
LSDecimal captureAmount = AlwaysConvert.ToDecimal(CaptureAmount.Text);
bool finalCapture = NoAdditionalCapture.Checked;
if (captureAmount > 0)
{
_Payment.Capture(captureAmount, finalCapture, false);
if (!string.IsNullOrEmpty(CustomerNote.Text))
{
OrderNote note = new OrderNote(_Order.OrderId, Token.Instance.UserId, DateTime.UtcNow, CustomerNote.Text, NoteType.Public);
note.Save();
}
}
//Vendor Notification Code Start
foreach (OrderItem orderItem in _Order.Items)
{
if (orderItem.OrderItemType == OrderItemType.Product)
{
if (orderItem.Product.Vendor != null)
{
EmailTemplateCollection emailTemplates = EmailTemplateDataSource.LoadForCriteria(" Name = 'VendorNotificationEx' ");
if (emailTemplates.Count > 0)
{
emailTemplates[0].Parameters.Add("store", Token.Instance.Store);
emailTemplates[0].Parameters.Add("order", _Order);
emailTemplates[0].Parameters.Add("vendorname", orderItem.Product.Vendor.Name);
emailTemplates[0].ToAddress = orderItem.Product.Vendor.Email;
emailTemplates[0].Send();
}
}
}
}
//Vendor Notification Code End
Response.Redirect("Default.aspx?OrderId=" + _OrderId.ToString());
}
Re: Sent Invoice to Vendors
Thank you for the help, however something broke when I tried that. I uploaded that code to the Admin/Orders/Payments/CapturePayment.aspx.cs file. Then I created a new vendor notification email named "VendorNotificationEx" according to your previous post.
When I tried processing the payment on an order, I now get the following "Compilation Error Message."
Any thoughts? Again, thanks so much for your help on this!
Jay
When I tried processing the payment on an order, I now get the following "Compilation Error Message."
Any thoughts? Again, thanks so much for your help on this!
Jay
Re: Sent Invoice to Vendors
Edit the file again and find the following code
and make it look like
Code: Select all
using CommerceBuilder.Users;
Code: Select all
using CommerceBuilder.Users;
using CommerceBuilder.Messaging;
Re: Sent Invoice to Vendors
Thanks again, but I now get a different error message after trying that:mazhar wrote:Edit the file again and find the following codeand make it look likeCode: Select all
using CommerceBuilder.Users;
Code: Select all
using CommerceBuilder.Users; using CommerceBuilder.Messaging;
Re: Sent Invoice to Vendors
It seems that you over written the Cancel_Button method. so just add following method to the file
Code: Select all
protected void CancelCaptureButton_Click(object sender, EventArgs e)
{
Response.Redirect("Default.aspx?OrderId=" + _OrderId.ToString());
}
Re: Sent Invoice to Vendors
mazhar wrote:It seems that you over written the Cancel_Button method. so just add following method to the file
Code: Select all
protected void CancelCaptureButton_Click(object sender, EventArgs e) { Response.Redirect("Default.aspx?OrderId=" + _OrderId.ToString()); }
I appreciate your patience and work with me on this. I'm not sure where to add this code in the file (I'm not a programmer ... more just a internet marketing guy). Here is my code currently for that file:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CommerceBuilder.Utility;
using CommerceBuilder.Orders;
using CommerceBuilder.Payments;
using CommerceBuilder.Payments.Providers;
using CommerceBuilder.Common;
using CommerceBuilder.Users;
using CommerceBuilder.Messaging;
public partial class Admin_Orders_Payments_CapturePayment : CommerceBuilder.Web.UI.AbleCommerceAdminPage
{
private int _OrderId = 0;
private Order _Order;
private int _PaymentId = 0;
private Payment _Payment;
protected void InitVars()
{
_PaymentId = AlwaysConvert.ToInt(Request.QueryString["PaymentId"]);
_Payment = PaymentDataSource.Load(_PaymentId);
if (_Payment == null) Response.Redirect("../Default.aspx");
_OrderId = _Payment.OrderId;
_Order = _Payment.Order;
}
protected void Page_Load(object sender, EventArgs e)
{
InitVars();
if (!Page.IsPostBack)
{
Caption.Text = string.Format(Caption.Text, (_Order.Payments.IndexOf(_PaymentId) + 1), _Payment.ReferenceNumber);
CurrentPaymentStatus.Text = StringHelper.SpaceName(_Payment.PaymentStatus.ToString()).ToUpperInvariant();
CurrentPaymentStatus.CssClass = CssHelper.GetPaymentStatusCssClass(_Payment.PaymentStatus);
PaymentDate.Text = string.Format("{0:g}", _Payment.PaymentDate);
Amount.Text = string.Format("{0:lc}", _Payment.Amount);
PaymentMethod.Text = _Payment.PaymentMethodName;
LSDecimal orig = _Payment.Transactions.GetTotalAuthorized();
LSDecimal rem = _Payment.Transactions.GetRemainingAuthorized();
LSDecimal bal = _Order.GetBalance(false);
OriginalAuthorization.Text = string.Format("{0:lc}", orig);
RemainingAuthorization.Text = string.Format("{0:lc}", rem);
trRemainingAuthorization.Visible = (orig != rem);
CaptureAmount.Text = string.Format("{0:F2}", bal);
OrderBalance.Text = string.Format("{0:lc}", bal);
trAdditionalCapture.Visible = IsPartialCaptureSupported();
}
AccountDataViewport.PaymentId = _PaymentId;
}
protected bool IsPartialCaptureSupported()
{
Transaction lastAuth = _Payment.Transactions.LastAuthorization;
if (lastAuth != null)
{
PaymentGateway gateway = lastAuth.PaymentGateway;
if (gateway != null)
{
IPaymentProvider instance = gateway.GetInstance();
return ((instance.SupportedTransactions & SupportedTransactions.PartialCapture) == SupportedTransactions.PartialCapture);
}
}
return false;
}
protected void SubmitCaptureButton_Click(object sender, EventArgs e)
{
//GET THE CAPTURE AMOUNT
LSDecimal captureAmount = AlwaysConvert.ToDecimal(CaptureAmount.Text);
bool finalCapture = NoAdditionalCapture.Checked;
if (captureAmount > 0)
{
_Payment.Capture(captureAmount, finalCapture, false);
if (!string.IsNullOrEmpty(CustomerNote.Text))
{
OrderNote note = new OrderNote(_Order.OrderId, Token.Instance.UserId, DateTime.UtcNow, CustomerNote.Text, NoteType.Public);
note.Save();
}
}
//Vendor Notification Code Start
foreach (OrderItem orderItem in _Order.Items)
{
if (orderItem.OrderItemType == OrderItemType.Product)
{
if (orderItem.Product.Vendor != null)
{
EmailTemplateCollection emailTemplates = EmailTemplateDataSource.LoadForCriteria(" Name = 'VendorNotificationEx' ");
if (emailTemplates.Count > 0)
{
emailTemplates[0].Parameters.Add("store", Token.Instance.Store);
emailTemplates[0].Parameters.Add("order", _Order);
emailTemplates[0].Parameters.Add("vendorname", orderItem.Product.Vendor.Name);
emailTemplates[0].ToAddress = orderItem.Product.Vendor.Email;
emailTemplates[0].Send();
}
}
}
}
//Vendor Notification Code End
Response.Redirect("Default.aspx?OrderId=" + _OrderId.ToString());
}
}
Re: Sent Invoice to Vendors
Here is the fixed version
Code: Select all
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CommerceBuilder.Utility;
using CommerceBuilder.Orders;
using CommerceBuilder.Payments;
using CommerceBuilder.Payments.Providers;
using CommerceBuilder.Common;
using CommerceBuilder.Users;
using CommerceBuilder.Messaging;
public partial class Admin_Orders_Payments_CapturePayment : CommerceBuilder.Web.UI.AbleCommerceAdminPage
{
private int _OrderId = 0;
private Order _Order;
private int _PaymentId = 0;
private Payment _Payment;
protected void InitVars()
{
_PaymentId = AlwaysConvert.ToInt(Request.QueryString["PaymentId"]);
_Payment = PaymentDataSource.Load(_PaymentId);
if (_Payment == null) Response.Redirect("../Default.aspx");
_OrderId = _Payment.OrderId;
_Order = _Payment.Order;
}
protected void Page_Load(object sender, EventArgs e)
{
InitVars();
if (!Page.IsPostBack)
{
Caption.Text = string.Format(Caption.Text, (_Order.Payments.IndexOf(_PaymentId) + 1), _Payment.ReferenceNumber);
CurrentPaymentStatus.Text = StringHelper.SpaceName(_Payment.PaymentStatus.ToString()).ToUpperInvariant();
CurrentPaymentStatus.CssClass = CssHelper.GetPaymentStatusCssClass(_Payment.PaymentStatus);
PaymentDate.Text = string.Format("{0:g}", _Payment.PaymentDate);
Amount.Text = string.Format("{0:lc}", _Payment.Amount);
PaymentMethod.Text = _Payment.PaymentMethodName;
LSDecimal orig = _Payment.Transactions.GetTotalAuthorized();
LSDecimal rem = _Payment.Transactions.GetRemainingAuthorized();
LSDecimal bal = _Order.GetBalance(false);
OriginalAuthorization.Text = string.Format("{0:lc}", orig);
RemainingAuthorization.Text = string.Format("{0:lc}", rem);
trRemainingAuthorization.Visible = (orig != rem);
CaptureAmount.Text = string.Format("{0:F2}", bal);
OrderBalance.Text = string.Format("{0:lc}", bal);
trAdditionalCapture.Visible = IsPartialCaptureSupported();
}
AccountDataViewport.PaymentId = _PaymentId;
}
protected bool IsPartialCaptureSupported()
{
Transaction lastAuth = _Payment.Transactions.LastAuthorization;
if (lastAuth != null)
{
PaymentGateway gateway = lastAuth.PaymentGateway;
if (gateway != null)
{
IPaymentProvider instance = gateway.GetInstance();
return ((instance.SupportedTransactions & SupportedTransactions.PartialCapture) == SupportedTransactions.PartialCapture);
}
}
return false;
}
protected void SubmitCaptureButton_Click(object sender, EventArgs e)
{
//GET THE CAPTURE AMOUNT
LSDecimal captureAmount = AlwaysConvert.ToDecimal(CaptureAmount.Text);
bool finalCapture = NoAdditionalCapture.Checked;
if (captureAmount > 0)
{
_Payment.Capture(captureAmount, finalCapture, false);
if (!string.IsNullOrEmpty(CustomerNote.Text))
{
OrderNote note = new OrderNote(_Order.OrderId, Token.Instance.UserId, DateTime.UtcNow, CustomerNote.Text, NoteType.Public);
note.Save();
}
}
//Vendor Notification Code Start
foreach (OrderItem orderItem in _Order.Items)
{
if (orderItem.OrderItemType == OrderItemType.Product)
{
if (orderItem.Product.Vendor != null)
{
EmailTemplateCollection emailTemplates = EmailTemplateDataSource.LoadForCriteria(" Name = 'VendorNotificationEx' ");
if (emailTemplates.Count > 0)
{
emailTemplates[0].Parameters.Add("store", Token.Instance.Store);
emailTemplates[0].Parameters.Add("order", _Order);
emailTemplates[0].Parameters.Add("vendorname", orderItem.Product.Vendor.Name);
emailTemplates[0].ToAddress = orderItem.Product.Vendor.Email;
emailTemplates[0].Send();
}
}
}
}
//Vendor Notification Code End
Response.Redirect("Default.aspx?OrderId=" + _OrderId.ToString());
}
protected void CancelCaptureButton_Click(object sender, EventArgs e)
{
Response.Redirect("Default.aspx?OrderId=" + _OrderId.ToString());
}
}
Re: Sent Invoice to Vendors
Working like a charm now! Thank you for all your help!
Jay
Jay
Re: Sent Invoice to Vendors
sounds good
-
- Lieutenant (LT)
- Posts: 53
- Joined: Tue Mar 24, 2009 9:49 pm
- Contact:
Re: Sent Invoice to Vendors
Hi,
is it possible to do this for multiple orders at once. For example, in the "Administration > Orders" screen, is it possible to select multiple orders and then collate all sales items in those orders into one email per Vendor.
Any assistance would be greatly appreciated,
Kind regards,
Lance
is it possible to do this for multiple orders at once. For example, in the "Administration > Orders" screen, is it possible to select multiple orders and then collate all sales items in those orders into one email per Vendor.
Any assistance would be greatly appreciated,
Kind regards,
Lance
- Intelliflex
- Lieutenant (LT)
- Posts: 78
- Joined: Tue Feb 17, 2004 7:51 pm
Re: Sent Invoice to Vendors
Mazhar
I assume we can do something similar to send a packing slip to the vendor also? We have developed a site that sells the products for the vendors, we just process it, so getting an order and packing slip to the vendor with just the vendors portion of the order is critical.
I assume we can do something similar to send a packing slip to the vendor also? We have developed a site that sells the products for the vendors, we just process it, so getting an order and packing slip to the vendor with just the vendors portion of the order is critical.
Dave
Re: Sent Invoice to Vendors
Yes possible.
Re: Sent Invoice to Vendors
Thanks Mazhar. Wouldn't this also have to be added to \Admin\Orders\Default.aspx.cs as well as \Admin\Orders\Payments\CapturePayment.aspx.cs so that if you process payments from the default Order Manager page, it also happens? I haven't tested the above code, but it also looks like it sends a notification for each item. So if the order contains 2 items for Vendor A, it will send 2 notifications. Am I missing something?mazhar wrote:Edit your Admin/Orders/Payments/CapturePayment.aspx.cs file and locate the following methodand change it asCode: Select all
protected void SubmitCaptureButton_Click(object sender, EventArgs e) { //GET THE CAPTURE AMOUNT ... SNIP ... }
Code: Select all
protected void SubmitCaptureButton_Click(object sender, EventArgs e) { //GET THE CAPTURE AMOUNT ... SNIP ... //Vendor Notification Code Start foreach (OrderItem orderItem in _Order.Items) { if (orderItem.OrderItemType == OrderItemType.Product) { if (orderItem.Product.Vendor != null) { EmailTemplateCollection emailTemplates = EmailTemplateDataSource.LoadForCriteria(" Name = 'VendorNotificationEx' "); if (emailTemplates.Count > 0) { emailTemplates[0].Parameters.Add("store", Token.Instance.Store); emailTemplates[0].Parameters.Add("order", _Order); emailTemplates[0].Parameters.Add("vendorname", orderItem.Product.Vendor.Name); emailTemplates[0].ToAddress = orderItem.Product.Vendor.Email; emailTemplates[0].Send(); } } } } //Vendor Notification Code End Response.Redirect("Default.aspx?OrderId=" + _OrderId.ToString()); }
For my client, I think I need the following process:
- customer places order
- gateway set to authorize and capture so order status goes directly to Shipment Pending (I'll have to disable the normal vendor notification email trigger)
- merchant reviews orders and changes order to a custom order status called Shipment Approved
- custom vendor notification code must be triggered somehow for this custom status.
- Find all code locations where statuses can be changed to custom order status Shipment Approved and make call to custom vendor notification there.
Re: Sent Invoice to Vendors
Yes it seems that sample code will send vendor notification for each product within order. We need to make a small change to the code that will first group the vendors available in order and then send one copy of notification to each of them. Update code could be something likeThanks Mazhar. Wouldn't this also have to be added to \Admin\Orders\Default.aspx.cs as well as \Admin\Orders\Payments\CapturePayment.aspx.cs so that if you process payments from the default Order Manager page, it also happens? I haven't tested the above code, but it also looks like it sends a notification for each item. So if the order contains 2 items for Vendor A, it will send 2 notifications. Am I missing something?
Code: Select all
//Vendor Notification Code Start
VendorCollection vendors = new VendorCollection();
foreach (OrderItem orderItem in _Order.Items)
{
if (orderItem.OrderItemType == OrderItemType.Product)
if (orderItem.Product.Vendor != null)
vendors.Add(orderItem.Product.Vendor);
}
foreach (Vendor vendor in vendors)
{
EmailTemplateCollection emailTemplates = EmailTemplateDataSource.LoadForCriteria(" Name = 'VendorNotificationEx' ");
if (emailTemplates.Count > 0)
{
emailTemplates[0].Parameters.Add("store", Token.Instance.Store);
emailTemplates[0].Parameters.Add("order", _Order);
emailTemplates[0].Parameters.Add("vendorname", orderItem.Product.Vendor.Name);
emailTemplates[0].ToAddress = orderItem.Product.Vendor.Email;
emailTemplates[0].Send();
}
}
//Vendor Notification Code End
Yes above procedure is correct. You need to put Email trigger code against the code changing order status.For my client, I think I need the following process:
* customer places order
* gateway set to authorize and capture so order status goes directly to Shipment Pending (I'll have to disable the normal vendor notification email trigger)
* merchant reviews orders and changes order to a custom order status called Shipment Approved
* custom vendor notification code must be triggered somehow for this custom status.
For the above process, can you tell me if the following is workable or would you suggest something else?
* Find all code locations where statuses can be changed to custom order status Shipment Approved and make call to custom vendor notification there.
Re: Sent Invoice to Vendors
Is there an easy way to search for those code locations? Or can you list where I need to change them? In some cases, I think the order status isn't changed by the code but is changed by commerceBuilder actions. For example, payment.Capture or shipment.Ship.mazhar wrote:Yes above procedure is correct. You need to put Email trigger code against the code changing order status.
So far, I think I need to trigger the code from the following locations:
- Order Summary - Update Selected Orders
- Order Shipments - Ship Items (if changing quantity)
Re: Sent Invoice to Vendors
Yep you need to automate these locations in order manager.
Re: Sent Invoice to Vendors
According to another post, there is no way to reissue a normal vendor notification through the system. Am I correct that if I wanted to reissue normal vendor notifications or the above modified multiple vendor notifications, I would have to customize the View Order -> Send Email Functionality?
As a work-around, since our vendor emails are BCC'd to the merchant, they can forward the copy from their email client.
As a work-around, since our vendor emails are BCC'd to the merchant, they can forward the copy from their email client.
Re: Sent Invoice to Vendors
Yes you can manually trigger Emails from Admin -> View Order -> Trigger an Email, so you can update that place as well for your custom Emails or as you stated they can also forward to resend notification copy they received as bcc.
Re: Sent Invoice to Vendors
This thread has given me a headache. ...Can't tell the fixes from the repairs.
Sending a vendor ONLY his products from a multi-product order seems like an important - and basic - feature.
Please tell me that 7.0.3 will incorporate this into it.
Sending a vendor ONLY his products from a multi-product order seems like an important - and basic - feature.
Please tell me that 7.0.3 will incorporate this into it.