Developer forum

Forum » Swift » Custom OrderLine fields Swift

Custom OrderLine fields Swift

Marie Louise Veigert
Reply

Hi,

I try to add some orderline fields in checkout in Swift on DW9.

It seems like it isn't as 'straight forward' as it used to be :)

I saw a suggestion on forum to add a submit const for the orderline field, but it didn't work in our solution.

Are there a 'how to' regarding adding orderline fields in Swift and to get it submitted to the cart?

 

BR
Marie Louise


Replies

 
Marie Louise Veigert
Reply

Anyone? :)

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Marie,

I will try to describe the process the way I am used to it:

1. Define Orderline Field

2. Assign OrderlineField to Shop or to specific categories.
a. If you want the OrderlineField to apply to all products on your shop, you assign the OrderlineField to the shop:
Settings >Ecommerce > ProductCatalog>Shops>{YourEcommerceShop}>Order Line Fields
b. If you want the OrderlineField to apply only to specific ProductCategories, you go to Ecommerce>ProductCatalog>{YourEcommerceShop}>{YourCategory}>Edit>Order line fields

3. Now that you have assigned your OrderlineField, you can add values to it. All you need is an input field named like this: "EcomOrderLineFieldInput__{YourOrderlineFieldSystemName}"

This should be enough. I hope I did not miss any relevant step :)

Adrian

 
Marie Louise Veigert
Reply

Hi Adrian,

I have done the same steps as you have listed up. But it still doesn't 'save' to the orderline in DW when going to next step. So it seems like it isnt saving anything :)

If I use the 'field' the templatetags suggest it looks like this:

But it doesnt work either.


BR
Marie Louise

 

You must be logged in to post in the forum