Hello,
I think we have found a small bug.
We have added a few custom fields to the order lines, for example, a "Reference" field.
When I add a new product to the cart, the order line fields are not initiated on the order line.
I only have these 5 fields:
I need to go to the orderline click edit, like on the screenshot above and save it.
Only then are all the order line fields initiated:
Developer forum
E-mail notifications
Orderline fields not initiated
Wiktor Wieczorek
Posted on 27/03/2026 13:21:24
Replies
Adrian Ursu
Posted on 27/03/2026 13:39:48
Hi WiKtor,
OrderLineFields need to be assigned to the Shop or to Groups before they are initiated:
Adrian
Wiktor Wieczorek
Posted on 27/03/2026 16:20:55
Sorry, I forgot to mention, we already checked it earlier. Everything is there.
Please note that when I hit save on the orderline the fields are initiated.
Wiktor Wieczorek
Posted on 31/03/2026 18:04:25
Could you please let me know if anyone is looking into it? 🙏
Edit: I got this information:
This is standard behaviour - you need to add the orderline field as part of the add to cart command https://doc.dynamicweb.dev/documentation/implementing/commerce/cartcommands.html#add
If you need to include blank data for each orderline field, i.e. "initialize" them then you have to do so via custom code
Adrian Ursu
Posted on 31/03/2026 19:09:49
This post has been marked as an answer
Hi Wiktor,
I don't have any additional suggestions; it's up to DW team to suggest a solution.
Maybe you can open a ticket with Dynamicweb Care?
Adrian
Votes for this answer: 1
You must be logged in to post in the forum