Feature Request: Parse parameter to MessageToken from AdminSection => MessageTemplate

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
Hey,

our shop has a skonto. I don't know what the english translation equivalent would be so a simple explanation:

When a order is placed and the pays in 7 days, he gets a additional discount of 2% on his order total.(This should encourage the customer to pay as fast as possible).
If he pays on the 8th day after the order is placed, he won't get this extra discount.

Now to the problem I had:
I added a MessageToken to the ShipmentSent.CustomerNotification template %Order.PayUntil%. The only think that this token does is add 7 days to the todays date (DateTime.Today.AddDays(7);).

Now I needed another token for my Email Template, because I need to add a text which simply says "If you don't pay within 30 days we will delete your order" (or something like this) and this message needs to contain the Date in 30 Days so DateTime.Today.AddDays(30).

My solution is that I simply created a 2nd token for this, but the best solution would be to create a token, that gets a paramtere and calculates the day in the MessageToken Controller.

Example in the MessageTemplate:

Pay within 7 days %Order.PayUntil(7)% to receive 2% extra discount.
If you don't pay within 30 days %Order.PayUntil(30)% we will delete your order.


So to keep this short:
I'd like parse a paramtere through a MessageToken in the Adminsection => Message Templates and use/access this paramtere in the backend/source code to create a dynamic MessageToken.

Edit: Removed the inline code Tags.
6 years ago
Hello,

I'm curious if you found a solution ultimately and I actually have a need to conditionally display text in a the e-mail templates. I'm currently using version 3.8 and wondered if there would be a way to work some magic without modifying source code.

Thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.