View Single Post
Old 05-05-2020, 09:38 PM
pbs's Avatar
pbs pbs is offline
Join Date: Jan 2015
Posts: 32
Default Extra fields at checkout


I'm using the 'old' shopping card because I've modified it.

Because I don't ship items, I do not need a shipping address. Also the billing address is not needed by me.
When I block State, country, address field etc., the card would not function in a right way.

Therefore I disabled this in the admin which works fine but I still would like to have a name and telephone field besides the e-mail field.

I tried this with adding the following code as a script in the website html, but no luck. Does this only works with the new shopping card look?

How to get a Name and Telephone input field besides the e-mail field? All also with labels.

Thank you in advance.

// Initialize extra fields
ec.order = ec.order || {};
ec.order.extraFields = ec.order.extraFields || {};

// Add a new optional text input 'How should we sign the package?' to shipping address form
ec.order.extraFields.wrapping_box_signature = {
'title': 'How should we sign the package?',
'textPlaceholder': 'Package sign',
'type': 'text',
'tip': 'We will put a label on a box so the recipient knows who it is from',
'required': false,
'checkoutDisplaySection': 'shipping_address'


Last edited by pbs; 05-05-2020 at 11:56 PM.