When a customer clicks the Return Items button on the Order Detail page, the /atg/commerce/custsvc/returns/BaseReturnFormHandler
component (of class atg.projects.store.csr.returns.StoreBaseReturnFormHandler
) creates a new atg.commerce.csr.returns.ReturnRequest
object. The ReturnRequest
object is used to track all the data associated with the return. The data in this object is stored in the returns repository, /atg/commerce/custsvc/CsrRepository
.
Once the ReturnRequest
is created, Commerce Reference Store displays the returnItemsSelection.jsp
page. This page iterates through all of the shipping groups associated with the order, and for each shipping group displays a table that shows the shipping information and lists the commerce items in the shipping group.
The returnItemsSelection.jsp
page calls the store.war/myaccount/gadgets/returnItemRenderer.jsp
gadget for each commerce item in the shipping groups. This gadget invokes the /atg/commerce/custsvc/returns/IsReturnable
servlet bean (of class atg.commerce.csr.returns.IsReturnable
) to evaluate whether the item is returnable:
<dsp:droplet name="IsReturnable"> <dsp:param name="item" param="commerceItem"/> <dsp:oparam name="true"> <c:set var="returnable" value="${true}"/> </dsp:oparam> <dsp:oparam name="false"> <c:set var="returnable" value="${false}"/> <dsp:getvalueof param="returnableDescription" var="returnableDescription"/> </dsp:oparam> </dsp:droplet>
The gadget then renders the item as a table row that either includes controls for selecting the quantity and reason for the return, or an explanation of why it cannot be returned.
The following illustration shows a returnItemsSelection.jsp
page with multiple shipping groups and a mix of items that can be returned and items that cannot: