Implementing Personalized Products
Learn how to implement personalized products in Umbraco Commerce.
Last updated
Was this helpful?
Learn how to implement personalized products in Umbraco Commerce.
Last updated
Was this helpful?
Personalized products can be customized by the customer. This customization can be adding a message or selecting different options for the product. This guide will show you how to implement personalized products in Umbraco Commerce.
This will be broken down into the following steps:
Add a message field on the product page in the add-to-cart form
Save the details in an order line property
Register a UI extension to display the value in the Backoffice.
This guide is not a direct follow-on from the getting started tutorial. It is assumed that your store is set up in a similar structure.
On the frontend, add a text area to the product page where the customer can enter their message.
When the customer adds the product to the cart, the message will be saved in an order line property.
Add an Observations
property of the AddToCartDto
to capture the message.
Locate the AddToCart
of the CartSurfaceController
.
Set a property on the order line if a value has been sent with the request.
To view the data in the Backoffice order editor, you need to register an ucOrderProperty
extension along with the relevant label localizations as sampled below.
Create a new umbraco-package.json
file in a folder in the App_Plugins
directory in the root of your project and add the following code:
The property is displayed in the Backoffice order editor.