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

META-INF.resources.commerce_price_lists.commerce_price_modifier.info.jsp Maven / Gradle / Ivy

The 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" %>

<%
CommercePriceListDisplayContext commercePriceListDisplayContext = (CommercePriceListDisplayContext)request.getAttribute(WebKeys.PORTLET_DISPLAY_CONTEXT);

CommercePriceList commercePriceList = commercePriceListDisplayContext.getCommercePriceList();
CommercePriceModifier commercePriceModifier = commercePriceListDisplayContext.getCommercePriceModifier();
long commercePriceModifierId = commercePriceListDisplayContext.getCommercePriceModifierId();

CommerceCurrency commerceCurrency = commercePriceList.getCommerceCurrency();

boolean neverExpire = ParamUtil.getBoolean(request, "neverExpire", true);

if ((commercePriceModifier != null) && (commercePriceModifier.getExpirationDate() != null)) {
	neverExpire = false;
}

String amountSuffix = HtmlUtil.escape(commerceCurrency.getCode());

String modifierType = ParamUtil.getString(request, "modifierType", commercePriceModifier.getModifierType());

if (modifierType.equals(CommercePriceModifierConstants.MODIFIER_TYPE_PERCENTAGE)) {
	amountSuffix = StringPool.PERCENT;
}
%>




	
	
	
	

	

	
		

		

			<%
			for (String target : CommercePriceModifierConstants.TARGETS) {
			%>

				

			<%
			}
			%>

		

		

			<%
			for (CommercePriceModifierType commercePriceModifierType : commercePriceListDisplayContext.getCommercePriceModifierTypes()) {
				String commercePriceModifierTypeKey = commercePriceModifierType.getKey();
			%>

				

			<%
			}
			%>

		

		
			
		

		

		
	

	
		

		
			

			
		
	

	
		
			
		
	

	
		

		
	



	Liferay.provide(window, 'selectType', () => {
		const portletURL = Liferay.Util.PortletURL.createPortletURL(
			'<%= currentURLObj %>',
			{
				modifierType: document.getElementById(
					'modifierType'
				).value,
			}
		);

		window.location.replace(portletURL.toString());
	});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy