All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.cart_mini.view.jsp Maven / Gradle / Ivy

There is a newer version: 4.0.63
Show newest version
<%--
/**
 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
 */
--%>

<%@ include file="/init.jsp" %>

<%
CommerceCartContentMiniDisplayContext commerceCartContentMiniDisplayContext = (CommerceCartContentMiniDisplayContext)request.getAttribute(WebKeys.PORTLET_DISPLAY_CONTEXT);

Map contextObjects = HashMapBuilder.put(
	"commerceCartContentMiniDisplayContext", commerceCartContentMiniDisplayContext
).build();

CommerceMoney subtotalCommerceMoney = null;
CommerceDiscountValue subtotalCommerceDiscountValue = null;
CommerceMoney taxValueCommerceMoney = null;
CommerceDiscountValue totalCommerceDiscountValue = null;
CommerceMoney totalOrderCommerceMoney = null;

String priceDisplayType = commerceCartContentMiniDisplayContext.getCommercePriceDisplayType();

CommerceOrderPrice commerceOrderPrice = commerceCartContentMiniDisplayContext.getCommerceOrderPrice();

if (commerceOrderPrice != null) {
	subtotalCommerceMoney = commerceOrderPrice.getSubtotal();
	subtotalCommerceDiscountValue = commerceOrderPrice.getSubtotalDiscountValue();
	taxValueCommerceMoney = commerceOrderPrice.getTaxValue();

	totalCommerceDiscountValue = commerceOrderPrice.getTotalDiscountValue();
	totalOrderCommerceMoney = commerceOrderPrice.getTotal();

	if (priceDisplayType.equals(CommercePricingConstants.TAX_INCLUDED_IN_PRICE)) {
		subtotalCommerceMoney = commerceOrderPrice.getSubtotalWithTaxAmount();
		subtotalCommerceDiscountValue = commerceOrderPrice.getSubtotalDiscountValueWithTaxAmount();
		totalCommerceDiscountValue = commerceOrderPrice.getTotalDiscountValueWithTaxAmount();
		totalOrderCommerceMoney = commerceOrderPrice.getTotalWithTaxAmount();
	}
}

SearchContainer commerceOrderItemSearchContainer = commerceCartContentMiniDisplayContext.getSearchContainer();

PortletURL portletURL = PortletURLBuilder.create(
	commerceCartContentMiniDisplayContext.getPortletURL()
).setParameter(
	"searchContainerId", "commerceOrderItems"
).buildPortletURL();

request.setAttribute("view.jsp-portletURL", portletURL);
%>


	
<% CPDefinition cpDefinition = commerceOrderItem.getCPDefinition(); String cpInstanceCDNURL = commerceCartContentMiniDisplayContext.getCPInstanceCDNURL(commerceOrderItem); %> thumbnail
<% StringJoiner stringJoiner = new StringJoiner(StringPool.COMMA); for (KeyValuePair keyValuePair : commerceCartContentMiniDisplayContext.getKeyValuePairs(commerceOrderItem.getCPDefinitionId(), commerceOrderItem.getJson(), locale)) { stringJoiner.add(keyValuePair.getValue()); } %>
<%= HtmlUtil.escape(stringJoiner.toString()) %>
<% CPInstance cpInstance = commerceOrderItem.fetchCPInstance(); %>
<%= commerceOrderItem.getQuantity() %>x
<% CommerceMoney unitPriceCommerceMoney = commerceCartContentMiniDisplayContext.getUnitPriceCommerceMoney(commerceOrderItem); CommerceMoney unitPromoPriceCommerceMoney = commerceCartContentMiniDisplayContext.getUnitPromoPriceCommerceMoney(commerceOrderItem); %> <%= HtmlUtil.escape(unitPromoPriceCommerceMoney.format(locale)) %> <%= HtmlUtil.escape(unitPriceCommerceMoney.format(locale)) %>
<%@ include file="/common/transition.jspf" %>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy