Add token for message template in nopCommerce - nopcommerce

I'm working on nopCommerce and I want to send an email to
customer using message template. I made a message template. Here is
a screenshot but when I send an email then its printing the direct string not
replacing its actual value. Can someone help for that.

I added the token inside my
Libraries\Nop.Services\Messages\MessageTokenProvider.cs and also my
message template
Added on message template in backend
Customer Number:
%Order.CustomerNumber%
<br />
affilate Number:
%Order.AffilateNumber%
Libraries\Nop.Services\Messages\MessageTokenProvider.cs
tokens.Add(new Token("Order.PurchaseOrderNumber", order.CustomerNumber));
tokens.Add(new Token("Order.ReferenceNumber", order.AffilateNumber));

Related

How to add pre-made text to a form with a button click from another page? Wordpress Elementor

I have a home accomodation website and it has a page with all the rooms and another one with contact info and email form. The page with rooms has a "Book" button under every room. My idea was that when the "Book" button is pushed than the wepage automatically goes to the Contact page and room info is submitted to the email form. For example when i press the Book button under 3-people bedroom than the text "The client likes to book 3-people bedroom" is added to the email form. I am using Wordpress and Elementor builder for my page and Formidable for form.
I think you could even do this simpler then the suggestion of Umair by indeed adding a parameter to the url. But then istead of using the echo, you can easily retrieve the values by adding the following code as default value in the form [get param=parameter]
So in your example you would create three buttons with following url
https://example.org/contact?room=room1
https://example.org/contact?room=room2
https://example.org/contact?room=room3
On your contact form choose the field in which you want to show the text and add as default value
[get param=room].
Obviously you can change the text after the parameter 'room=' in whatever you want.
Hi Yes you need to add a get request url (https://testdomain.com/formpage/?formtext=formtitle) of this button so when the user click on the button it will redirect with the get request url like this https://testdomain.com/formpage/?formtext=formtitle
then you can add this variable echo where ever you want to display this text also in the fomidable form also have this variable option to place in form.
so your form will be display with the selected text by default.
if( $_GET["formtext"]){
echo $_GET["formtext"];
}

Gravity Form query string appends '|:||:||:||:|2372' to the end of the data

Right now I'm trying to create a custom confirmation page to be displayed to the user after they finish filling out one of my forms. This custom confirmation page will use some of the data that they entered into the form. Right now I only have 3 fields: name, phone number, and a logo image.
So I went into the Settings->Confirmations section of my form and set Confirmation Type to Page, chose the page, and checked off 'Pass Field Data Via Query String'. Then I entered in the string 'gym_name={Gym/Program Name:2}&gym_phone={Gym/Program website and/or phone number:3}&logo={Logo:4}'. The logo parameter is passed as the image src url.
I ran through a quick test of my form and after filling it out, all of the data was successfully sent to the confirmation page, with one problem. For some reason, Gravity Form appends '|:||:||:||:|2372' (it's not always 2372, it's different every time) to the end of the logo section of the url. This happens no matter where in the query string I put logo, and it does not get appended if I don't include the logo.
Does anyone know what the cause of this is, and how to stop it? Thank you in advance.
I'm assuming the Logo field is a Post Image field. If so, you'll need to use the :url modifier to retrieve only the URL.
&logo={Logo:4:url}
More details here: https://docs.gravityforms.com/post-image-merge-tags/

Stop AppMaker deleting email address onSend

Im just learning AppMaker and I have followed along the tutorial on sending email https://developers.google.com/appmaker/tutorials/call-scripts/
It works as expected so I decided to bring it to another level by integrating it into my sign up form.
-- ISSUE OUTLINE --
A user enters their name and email in a standard signup form.
This is saved as expected this data is presented on the follow up page I created (see screenshot below)
When the admin clicks on the blue email button it opens up the email box (see attached image) and the users email is pulled into the To: box as expected (I have pulled the email by binding it to the text field).
The admin then sends the email which is sent as expected but then the form clears the To: field deleting it from the users entry.
-- QUESTION --
Can anyone advise on a solution it would be greatly appreciated :-)
Screenshot:
In the tutorial you mentioned, there is 'clearEmailForm' function that is called in case of successful sending email. I think you can delete code, that clears 'to' field:
/**
* Clears the entire email form
*/
function clearEmailForm(){
var formWidgets = app.pages.Email.descendants;
...
formWidgets.To.value = ""; // Delete this line
...
}

How to style gravity form that is embedded inside email?

We are using Gravity form to send out notification email when a user signs up and registers for friend/family for an event, and it's embedded with following code:
[gravityforms action="conditional" merge_tag="{Do you want to register any family members or friends?:30}" condition="is" value="Yes"]
You have also registered:
{list:31}
[/gravityforms]
Since email styling only accept inline styling, how can I style the table that is embedded inside email when I don't have direct access to it?
You can format the email notification in the gravity form edit screen. Open your registration from for editing, go to 'Form Settings' -> 'Notifications' and at the bottom of the page check the 'Disable Auto-formating' box. Now you can write custom html into the 'Message' pane and format any way you like.
My colleague found where the table inside gravity form is coming from: wp-content/plugins/gravityforms/includes/fields/class-gf-field-list.php - get_field_input
So one needs to go to (line 393 in my file):
$list = "

Create a hyperlink to a specific email message

I developed a paging application to send emails and text messages to our users. We want to be able to create a hyperlink within the message that points to a specific email message on our company SMTP server.
I can send a text message that creates a link to Outlook doing this: https://mail.domain.com. We want to create a link to a specific email message.
I found instructions to do this in a couple of ways. They are:
Link: Outlook:Inbox/~Subject (surrounded by <>)
or
Link: Outlook:'GUID' (surrounded by <>)
But they are giving me the error message: ASP.NET has detected data in the request that is potentially dangerous because it might include HTML markup or script.
Can anyone direct me on how to create a link to a specific email message on our SMTP Outlook server?
Thanks.
UPDATE
I can send the text message but the link is not displayed as a link but text.
This is my email body string that can be texted to my cell phone but the link does not go to the email defined.
I tried just creating the Outlook link like this:
string test = "<Outlook:Inbox//~New Provider>";
EmailInfo.Message = HttpUtility.HtmlEncode(test);
I also tried creating a link using href:
string test = "Email Link";
EmailInfo.Message = HttpUtility.HtmlEncode(test);
Both successfully sent a text message to my phone. But I could not click on the links. They were displayed as text like this:
MSG:Email Link
Why is the link displayed as plain text?

Resources