Issue
- While updating the Commerce Product through the Headless API, the expiration date of the product is changing. Even if the expiry date is not included in the Request JSON of the Headless API, the expiry date is still being changed.
-
Steps to reproduce:
1. Start the server.
2. Navigate to Global Menu > Commerce > Product Management > Catalogs.
3. Create a catalog and navigate to the http://localhost:8080/o/api
4. Now, create a commerce product through the below API, where the desired expiration date has been entered in the request body, and enter the valid catalogue ID that is created in step 3.Request URL :
http://localhost:8080/o/headless-commerce-admin-catalog/v1.0/products
Request Body :
{
"active": true,
"catalogId": 35505,
"categories": [],
"productType": "virtual",
"name": {
"en_US": "Product"
},
"description": {
"en_US": "test product description"
},
"externalReferenceCode":"10141299",
"expirationDate": "2024-08-17T12:03:45.043Z",
"neverExpire": false,
"skus": [
{
"discontinued": false,
"externalReferenceCode": "10141299",
"published": true,
"price": 0,
"promoPrice": 0,
"purchasable": true,
"sku": "BC20247534542387",
"skuOptions": null
}
]
}
5. After the execution, the new product will be created with the mentioned expiration date.
6. Then, execute the update API by using the below request URL and request body.
Request URL :
http://localhost:8080/o/headless-commerce-admin-catalog/v1.0/products/by-externalReferenceCode
Request Body:
{
"description": {
"en_US": " product description updated now"
}
}
7. Navigate to the created product in the commerce section.
Expected behavior:
The expiration date should not be changed automatically and 'Never Expire' should not be checked automatically as well.
Observed behavior: The expiration date is changed and the 'never expiration' check box is triggered automatically.
Environment
- Liferay DXP 7.4
Resolution
- The observed behavior is a known bug addressed by the LPD-32908.
Additional Information
- If a hotfix is required, please create a support ticket requesting the hotfix by attaching the patch details.
- Installing Fix Packs and Hotfixes on Liferay DXP will guide you to install the Fixpack/Hotfix in your environment.
Contenido exclusivo para suscriptores.
Una Suscripción Enterprise de Liferay proporciona acceso a más de 1.500 artículos que incluyen las mejores practicas, diagnóstico de problemas y otras soluciones útiles. Inicia sesión para tener un acceso completo.
Inicia sesión