Customer Experience Center - RMA
The Customer Experience Center - RMA app is a paragraph app for rendering details about RMA-requests - aka. returns - in frontend.
When you add this app to a paragraph it has the following settings: Basically, you need to:
- Use the Display-settings to set the:
- Lists per page
- Sort by field
- Sort direction
- Select the Templates used to render the app output
- List - this template is used to render a list of open returns
- Details - this template is used to render details about each return
Templates
When you create a List-template you should inherit the RmaListViewModel and use the Dynamicweb.Rendering and Dynamicweb.Ecommerce.Frontend.ReturnMerchandiseAuthorization namespaces. You can then loop through each RMA and list them to the user:
@inherits ViewModelTemplate<RmaListViewModel>
@using Dynamicweb.Rendering
@using Dynamicweb.Ecommerce.Frontend.ReturnMerchandiseAuthorization
@if (Model.Rmas.Count() != 0)
{
<table>
<thead>
<tr>
<th>ID</th>
<th>Order number</th>
<th>State</th>
<th>Type</th>
<th>Date</th>
<th>Info</th>
</tr>
</thead>
<tbody>
@foreach (var rma in Model.Rmas)
{
<tr>
<td>@rma.Id</td>
<td>@rma.OrderId</td>
<td>@rma.State.Name</td>
<td>@rma.Type</td>
<td>@rma.Date</td>
<td><a href="?rmaid=@rma.Id">See more</a></td>
</tr>
}
</tbody>
</table>
}
The Details-template is loaded when the parameters rmaid is present in the url alongside an appropriate ID. Inside this template you can then show information to the user about the RMA request.