Developer forum

Forum » Development » How to fill a Custom Orderfield

How to fill a Custom Orderfield


Reply
If had added a custom datefield into the orderfields, so the customer can pick a date when to deliver the order.

In the list of templatetags, i see my custom field in step 3 where i want to use it: <!--@DeliveryDate-->

When i put the tag on the page, i can select a date. It works fine, but the date will not be saved to the database. So it's quite useless.

Is there any way or workaround to let the form save the value to my custom orderfield?

Grtz
Martijn

Replies

 
Reply
Hi,

as i wrote a custom module and used the timeselector control of dynamicweb, i discovered that it wont work until i check the field "Disable pop-up calendar" in the Management Center....

You can find this setting @ the Management Center > Editing > Setup

Does it make any difference?

Maybe a link to the page would help, but i guess that will be a bit difficult in a shop?

// Josef
 
Reply
Does anybody know how to get orderfields to work in CartV2?

Date and Date/time field
No matter what I do, the date will not get stored. I tried using the input fields available in standard tags and also tried making various custom inputs, but with no luck.

Disabling the pop-up calender does not help. It actually breaks User Management.

File field
The file name will be stored, but the actual file is missing. How do I upload/attach the file to the order?

Any ideas on how to get this to work?

DW version: 19.1.2.1


BR.
Morten
 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply
Hi

With regard to File Field, then I'm pretty sure that it never worked as an upload functionality. Neither for CartV1 or CartV2. However it's very easy to code a custom uploader, at least for CartV2.

Date and Date/Time Fields do indeed have a bug. I've registered the bug with ID 5846, which will be fixed in an upcoming Service Release for 7.2.

It is possible to work around this issue, both for a custom date picker but also for the standard Dynamicweb date picker.
The way to do it for the standard is simply to add a html control in the template. This control needs to have name set to the System Name of the order field. So if I have a date order field with the System Name "myDate", then I can add the following: <input type="hidden" name="myDate" value="something" />.

- Jeppe

EDIT: This is only for CartV2.
 
Reply
Hi Jeppe,

Thanks for your reply.

Date field
Your recommended workaraound did not work for me - nothing gets stored :/

File field
Why have an orderfield type that only works in admin?
Being able to upload and attach a file to an order is something we need to do on some B2B solutions. I hope you will consider making this work at some point.

BR.
Morten
 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply
Are you using the default Date picker from DW or are you using your own date picker?

The workaround I posted only works for the default. The workaround for custom date pickers is a bit more tricky.

For File Fields, I will add this to our backlog as a feature request :-)

- Jeppe
 
Reply
Oh, sorry. I misunderstood you.

Adding the default datepicker and a hidden field solved it - although we will probably use some jquery datepicker and not the default one - although it is beautiful  :)

Thanks... and merry christmas

/Morten
 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply
Indeed it is very pretty ;-)

Merry christmas to you too :-)

- Jeppe

 

You must be logged in to post in the forum