Class Name

atg.commerce.claimable.AvailableStoreCredits

Component(s)

/atg/commerce/claimable/AvailableStoreCredits

The AvailableStoreCredits servlet bean gives you access to store credits associated with a given user’s profile. You can then use this information in your page code.

Input Parameters

profile (Required)
The RepositoryItem that represents the customer for whom you want to display store credit information.

Output Parameters

storeCredits
A list of store credits associated with the provided user profile.

Open Parameters

output
The open parameter is always rendered.

empty
The open parameter rendered if there are no store credits for the current user.

Example

The following example uses the AvailableStoreCredits servlet bean to provide information on a user’s store credits.

<dsp:droplet name="AvailableStoreCredits">
   <dsp:param name="profile" bean="Profile"/>
   <dsp:oparam name="output">

     <dsp:getvalueof var="onlineCredits" vartype="java.lang.Object"
param="storeCredits"/>
     <c:if test="${not empty onlineCredits}">
       <div id="atg_store_onlineCredits">
         <h3><fmt:message key="myaccount_onlineCredits.savedOnlineCredits"/></h3>
         <c:forEach var="onlineCredit" items="${onlineCredits}"
varStatus="onlineCreditStatus">
           <dsp:setvalue param="storeCredit" value="${onlineCredit}"/>
           <dsp:getvalueof var="storeCredit" param="storeCredit"/>
           <c:if test="${not empty storeCredit}">
             <div class="atg_store_onlineCreditsDetails">
               <dsp:getvalueof var="count" vartype="java.lang.Double"
value="${onlineCreditStatus.count}"/>
               <h4>
                 <fmt:message key="common.credit"/><fmt:message
key="common.numberSymbol"/>
                 <fmt:formatNumber value="${count}" type="number"/>
               </h4>
               <div>
                 <fmt:message
key="myaccount_onlineCredits.remainingCredit"/><fmt:message
key="common.labelSeparator"/>
               </div>
               <dsp:getvalueof var="amountRemaining" vartype="java.lang.Double"
param="storeCredit.amountAvailable"/>
               <dsp:getvalueof var="currencyCode" vartype="java.lang.String"
param="currencyCode"/>
               <div class="atg_store_onlineCreditTotal">
                 <fmt:formatNumber value="${amountRemaining}" type="currency"
currencyCode="${currencyCode}" />
               </div>
             </div>
           </c:if>
         </c:forEach>
       </div>
     </c:if>
   </dsp:oparam>
 </dsp:droplet>
 
loading table of contents...