<dsp:importbean bean="/..../droplet/PexUpdateLastSavedPageDroplet"/>
<dsp:importbean bean="/atg/commerce/ShoppingCart" />
Put the below code at the end of the page:
<%-- Last Saved Page logic starts --%>
<dsp:getvalueof var="v_request_URI" bean="/OriginatingRequest.requestURI"/>
<dsp:getvalueof var="v_lastSavedPage" bean="ShoppingCart.current.lastSavedPage"/>
<c:if test="${v_request_URI ne v_lastSavedPage}">
<dsp:droplet name="PexUpdateLastSavedPageDroplet">
<dsp:param name="orderId" bean="ShoppingCart.current.id" />
<dsp:oparam name="output">
</dsp:oparam>
</dsp:droplet>
</c:if>
<%-- Last Saved Page logic ends --%>
LastSavedPageDroplet.properties
$class=....droplet.LastSavedPageDroplet
$scope=session
orderManager=/atg/commerce/order/OrderManager
transactionManager=/atg/dynamo/transaction/TransactionManager
shoppingCart=/atg/commerce/ShoppingCart
LastSavedPageDroplet.java
public static final ParameterName OUTPUT = ParameterName.getParameterName("output");
....
order.setLastSavedPage(pRequest.getRequestURI());
getOrderManager().updateOrder(order);
getShoppingCart().setCurrent(order);
<dsp:importbean bean="/atg/commerce/ShoppingCart" />
Put the below code at the end of the page:
<%-- Last Saved Page logic starts --%>
<dsp:getvalueof var="v_request_URI" bean="/OriginatingRequest.requestURI"/>
<dsp:getvalueof var="v_lastSavedPage" bean="ShoppingCart.current.lastSavedPage"/>
<c:if test="${v_request_URI ne v_lastSavedPage}">
<dsp:droplet name="PexUpdateLastSavedPageDroplet">
<dsp:param name="orderId" bean="ShoppingCart.current.id" />
<dsp:oparam name="output">
</dsp:oparam>
</dsp:droplet>
</c:if>
<%-- Last Saved Page logic ends --%>
LastSavedPageDroplet.properties
$class=....droplet.LastSavedPageDroplet
$scope=session
orderManager=/atg/commerce/order/OrderManager
transactionManager=/atg/dynamo/transaction/TransactionManager
shoppingCart=/atg/commerce/ShoppingCart
LastSavedPageDroplet.java
public static final ParameterName OUTPUT = ParameterName.getParameterName("output");
....
order.setLastSavedPage(pRequest.getRequestURI());
getOrderManager().updateOrder(order);
getShoppingCart().setCurrent(order);
No comments:
Post a Comment