logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
judy at Web2Market  
#1 Posted : Monday, January 25, 2021 8:57:11 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 286

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

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

judy at Web2Market  
#2 Posted : Monday, January 25, 2021 9:28:51 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 286

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.
shaharyartiwana25816656  
#3 Posted : Tuesday, January 26, 2021 12:18:28 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 703

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

shaharyartiwana25816656  
#4 Posted : Tuesday, January 26, 2021 12:37:11 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 703

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.
thanks 1 user thanked shaharyar for this useful post.
judy at Web2Market on 1/26/2021(UTC)
Users browsing this topic
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.