What are Parameters?

In a template, parameters are variables that are passed to the template when it is called or included in another template. Parameters allow you to pass data to the template from the calling code, and to use that data to generate dynamic content in the template.

There are many different parameters that you might use in a template, depending on the specific information that you want to include and the layout and design of the template. Here are a few examples of parameters that you might use in an order confirmation template:

  • Order details: These might include the order number, the date and time of the order, the shipping and billing addresses, and the items in the order (including the name, quantity, and price of each item).

  • Customer details: These might include the customer's name, email address, and phone number.

  • Payment details: These might include the payment method (e.g. credit card, PayPal), the total amount paid, and any applicable taxes or fees.

  • Shipping details: These might include the shipping method, the estimated delivery date, and any tracking information.

  • Promotional details: If the order was eligible for any promotional discounts or offers, you might include details about these in the template.

  • Return policy: You might include information about your return policy and any relevant details (e.g. deadlines, conditions).

Overall, the specific parameters you use in a template will depend on your business's needs and the information you want to communicate to your customers. To use parameters in a template, use the parameter name in a ${parameter.name} format, like so:

<h2>Customer Information</h2>
<p>Name: ${customer.name}</p>
<p>Email: ${customer.email}</p>
<p>Phone: ${customer.phone}</p>
The output would look something like this:
Customer Information
Name: John Doe
Email: john.doe@example.com
Phone: 0123456789