Support of item YRNs to improve functionality with external product services
Further to the introduction of the YaaS Resource Name (YRN) support, the Cart service now supports item YRNs (itemYrn). An item YRN is the equivalent to the current product schema. Now when you add, remove, or update an item in the cart by using the item YRN instead of the product schema or product ID. The item YRNs were introduced because, eventually, the Cart service will cease to use the product schema. When you add an item to the cart, the product schema, which consists of various attributes (for example, ID, YRN, description, and SKU), is coupled with the product information you entered using the Product service in the Product Content package. By removing the product schema and only using a generic item YRN, it allows you to use your own product service with ease.
For more information about how item YRNs are used in the current API calls, see the tutorials in the Cart service.
Cart service decoupled from the other services
The design of the Cart service is refactored so that it is no longer depends on other services such as the Product service. This way, you can use it as a standalone service, which corresponds to the true definition of a microservice.
This refactoring introduces the following validation changes:
- There is no longer any product validation when items are added to the cart during a merge cart or a change site request. This imples that when you change the site of a cart, or when you merge two carts together, these actions will be successful even if the items within the cart do not exist.
- There is no longer any tax code validations or updates when you merge two carts or when you change the site of an existing cart.
- Price validation is no longer executed when you merge two carts. Therefore, carts with different currencies can now be merged even if the price does not exist in the desired currency.
If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.
Use our private help channel. Receive updates over email and contact our specialists directly.
If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.