on ‎2024 Dec 21 11:20 PM
Hello, I have installed the Telco Accelerator following the instructions on this page: https://help.sap.com/docs/COMPOSABLE_STOREFRONT_TUA/4937b4c5aee44187b01314ed50ac0f82/04ae4842d614492.... It seems to be working fine, but when adding products to the cart, I get the following error on the browser console: "Process type cannot be empty", type: "CommerceCartModificationError".
When starting a recipe, I cannot debug. Could someone help me understand why this error is being returned?
Thank you. Best regards
Request clarification before answering.
I have followed the instructions exactly, and what happens is that a request arrives from the frontend to this controller:
@RequestMapping(value = "/{cartId}/entries", method = RequestMethod.POST, consumes =
{ MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE })
@RequestMappingOverride(priorityProperty = "b2ctelcoocc.TmaCartsController.createCartEntry.priority")
@ResponseBody
@Operation(operationId = "createCartEntry", summary = "Adds a product to the cart.", description = "Applies prices to the Cart entries based on the location of the customer when the attribute region is provided and stores other details like formerSupplier of the customer.")
@ApiBaseSiteIdUserIdAndCartIdParam
public CartModificationWsDTO createCartEntry(
@Parameter(description = "Identifier of the Shopping Cart", required = true) @PathVariable("cartId") final String cartId,
@Parameter(description = "Identifier of the Customer", required = true) @PathVariable("userId") final String userId,
@Parameter(description = "Base site identifier", required = true) @PathVariable final String baseSiteId,
@Parameter(description = "Request body parameter that contains details such as the product code (product.code), BPO Code (rootBpoCode), ProcessType (processType.id), GroupNumber (entryGroupNumbers), the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name).\n\nThe DTO is in XML or .json format.", required = true) @RequestBody final OrderEntryWsDTO entry,
@Parameter(description = "Response configuration. This is the list of fields that should be returned in the response body.", schema = @Schema(allowableValues = {"BASIC", "DEFAULT", "FULL"})) @RequestParam(defaultValue = DEFAULT_FIELD_SET) final String fields)
throws CommerceCartModificationException
{
populateDefaultCartEntryValues(entry);
validate(entry, ENTRY, tmaOrderEntryCreateValidator);
final Integer groupNumber = entry.getEntryGroupNumbers().stream().findFirst().get();
final String customerId = userId.equalsIgnoreCase(CURRENT) ? customerFacade.getCurrentCustomerUid() : userId;
return addCartEntryInternal(baseSiteId, fields, entry, groupNumber, cartId, customerId);
}from the TmaCartsController, where the "OrderEntryWsDTO entry" does not have the process type filled in.
My conclusion is that this is an error when building the composable storefront, but I wouldn't be able to tell if I am doing something wrong or if, as it seems, the documentation is incomplete or incorrect.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.