Order.OrderId token in message templates

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 5 años
Hello,

Since the introduction of the Order Mask in nopCommerce the %Order.OrderNumber% token can be something different than the actual order id. In that case, if you use an order mask you don't really have access to your order id in the message templates. This can introduce some issues for the store owners.

For example, a client of ours was trying to build a reorder URL for his clients in the Order Completed message template. Due to the fact that he wants to use an order mask, he cannot do that since the ReOrder action method in the OrderController accepts a single parameter of type int:

public virtual IActionResult ReOrder(int orderId)


That is true for any other URLs that you would want to build for your clients to see for their orders.

Right now the %Order.OrderNumber% token is populated from the CustomOrderNumber property of the Order (Nop.Services/Messages/MessageTokenProvider.cs line 912). Is it possible for a new token %Order.Id%, that will be populated by the Id property of the Order, to be added so store owners can build such URLs for their clients?

Regards,
Anton
Hace 5 años
Thanks for the suggestion. Here is a work item.
Hace 5 años
Done. Please see this commit
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.