AbleCommerce Forums
»
AbleCommerce
»
AbleCommerce 9 Bug Reports
»
Sending an email from the admin redirects back to the wrong order 9.0.3
Rank: Advanced Member
Groups: Developers
Joined: 11/7/2018(UTC) Posts: 303
Thanks: 21 times Was thanked: 5 time(s) in 5 post(s)
|
When you send an email from the admin via the email link on an order, the link to send one passes the orderid. Then when you have previewed/sent the email, you get directed back to the order with the order number which is the same as the order id. For example, my order # 886069 passes order id of 660286 to the send email page. Then I get direct back to Admin/Orders/ViewOrder/660286 instead of Admin/Orders/ViewOrder/886069. If possible, could you post a patch? Thanks
|
|
|
|
Rank: Advanced Member
Groups: Developers
Joined: 11/7/2018(UTC) Posts: 303
Thanks: 21 times Was thanked: 5 time(s) in 5 post(s)
|
Also, when sending an email from an order in the admin, it doesn't pick up the BCC field, maybe the CC field also, but I didn't test that. The from address is always the store email, not the one specified by the email template.
|
|
|
|
Rank: Advanced Member
Groups: Admin, Developers, Registered, HelpDesk, Authorized User Joined: 10/5/2018(UTC) Posts: 704
Thanks: 5 times Was thanked: 113 time(s) in 112 post(s)
|
Quote:When you send an email from the admin via the email link on an order, the link to send one passes the orderid. Then when you have previewed/sent the email, you get directed back to the order with the order number which is the same as the order id. For example, my order # 886069 passes order id of 660286 to the send email page. Then I get direct back to Admin/Orders/ViewOrder/660286 instead of Admin/Orders/ViewOrder/886069. To fix: 1- Open file \Website\Areas\Admin\Controllers\EmailController.cs 2- Search for Code:
public ActionResult SendEmailForOrder(int orderId, string returnUrl = "")
{
if (string.IsNullOrEmpty(returnUrl)) returnUrl = Url.Action("ViewOrder", "Orders", new { id = orderId});
return SendMail(new SendEmailDestinationInfo { OrderIdList = orderId.ToString(), ReturnUrl = returnUrl } );
}
3- Replace with Code:
public ActionResult SendEmailForOrder(int orderId, string returnUrl = "")
{
var order = AbleContext.Resolve<IOrderRepository>().Load(orderId);
if (order == null)
{
if (string.IsNullOrEmpty(returnUrl))
returnUrl = Url.Action("Index", "Orders");
}
else
{
if (string.IsNullOrEmpty(returnUrl))
returnUrl = Url.Action("ViewOrder", "Orders", new { id = order.OrderNumber });
}
return SendMail(new SendEmailDestinationInfo { OrderIdList = orderId.ToString(), ReturnUrl = returnUrl } );
}
4- Compile the code. Edited by user Tuesday, January 26, 2021 12:19:37 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Admin, Developers, Registered, HelpDesk, Authorized User Joined: 10/5/2018(UTC) Posts: 704
Thanks: 5 times Was thanked: 113 time(s) in 112 post(s)
|
Quote:Also, when sending an email from an order in the admin, it doesn't pick up the BCC field, maybe the CC field also, but I didn't test that. The from address is always the store email, not the one specified by the email template. I am able to confirm these issues and registered bug reports. Thank you for identifying the issues.
|
1 user thanked shaharyar for this useful post.
|
|
|
AbleCommerce Forums
»
AbleCommerce
»
AbleCommerce 9 Bug Reports
»
Sending an email from the admin redirects back to the wrong order 9.0.3
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close