Developer forum

Forum » Dynamicweb 10 » Orderline fields not initiated

Orderline fields not initiated

Wiktor Wieczorek
Reply

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:


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi WiKtor,
OrderLineFields need to be assigned to the Shop or to Groups before they are initiated:

Adrian

 
Wiktor Wieczorek
Reply

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
Reply

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 Dynamicweb Employee
Adrian Ursu
Reply
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