Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LPD-25497 - refactor #201

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion modules/apps/commerce/commerce-product-api/bnd.bnd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Bundle-Name: Liferay Commerce Product API
Bundle-SymbolicName: com.liferay.commerce.product.api
Bundle-Version: 88.2.1
Bundle-Version: 88.3.0
Export-Package:\
com.liferay.commerce.product.availability,\
com.liferay.commerce.product.catalog,\
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* SPDX-FileCopyrightText: (c) 2025 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
package com.liferay.commerce.product.exception;

import com.liferay.portal.kernel.exception.PortalException;

/**
* @author Marco Leo
*/
public class CPDefinitionOptionRelException extends PortalException {

public CPDefinitionOptionRelException() {
}

public CPDefinitionOptionRelException(String msg) {
super(msg);
}

public CPDefinitionOptionRelException(String msg, Throwable throwable) {
super(msg, throwable);
}

public CPDefinitionOptionRelException(Throwable throwable) {
super(throwable);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* SPDX-FileCopyrightText: (c) 2025 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
package com.liferay.commerce.product.exception;

import com.liferay.portal.kernel.exception.PortalException;

/**
* @author Marco Leo
*/
public class CPInstanceOptionValueRelException extends PortalException {

public CPInstanceOptionValueRelException() {
}

public CPInstanceOptionValueRelException(String msg) {
super(msg);
}

public CPInstanceOptionValueRelException(String msg, Throwable throwable) {
super(msg, throwable);
}

public CPInstanceOptionValueRelException(Throwable throwable) {
super(throwable);
}

}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version 13.5.0
version 13.6.0
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ CPContentHelper cpContentHelper = (CPContentHelper)request.getAttribute(CPConten
CPCatalogEntry cpCatalogEntry = cpContentHelper.getCPCatalogEntry(request);

boolean hasMultipleCPSkus = cpContentHelper.hasMultipleCPSkus(cpCatalogEntry);

boolean hasOptions = cpContentHelper.hasCPDefinitionOptionRels(cpCatalogEntry.getCPDefinitionId());
%>

<div class="cp-renderer">
Expand Down Expand Up @@ -101,7 +103,7 @@ boolean hasMultipleCPSkus = cpContentHelper.hasMultipleCPSkus(cpCatalogEntry);

<div>
<c:choose>
<c:when test="<%= !hasMultipleCPSkus && (cpSku != null) %>">
<c:when test="<%= (!hasMultipleCPSkus && (cpSku != null)) && !hasOptions %>">
<div class="mt-2">
<commerce-ui:add-to-cart
alignment="full-width"
Expand Down
2 changes: 2 additions & 0 deletions modules/apps/commerce/commerce-product-service/service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,7 @@
<exception>CPDefinitionMetaKeywords</exception>
<exception>CPDefinitionMetaTitle</exception>
<exception>CPDefinitionNameDefaultLanguage</exception>
<exception>CPDefinitionOptionRel</exception>
<exception>CPDefinitionOptionRelPriceType</exception>
<exception>CPDefinitionOptionSKUContributor</exception>
<exception>CPDefinitionOptionValueRelCPInstance</exception>
Expand All @@ -1563,6 +1564,7 @@
<exception>CPInstanceJson</exception>
<exception>CPInstanceMaxPriceValue</exception>
<exception>CPInstanceMinPriceValue</exception>
<exception>CPInstanceOptionValueRel</exception>
<exception>CPInstancePrice</exception>
<exception>CPInstancePromoPrice</exception>
<exception>CPInstanceReplacementCPInstanceUuid</exception>
Expand Down
Loading