#1  
Old 05-05-2020, 09:38 PM
pbs's Avatar
pbs is offline
Member
 
Join Date: Jan 2015
Posts: 32
Default

Extra fields at checkout


Hi,

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'
};

Ecwid.refreshConfig();

Last edited by pbs; 05-05-2020 at 11:56 PM.
  #2  
Old 05-27-2020, 09:21 AM
Razita's Avatar
Razita Razita is offline
Ecwid Team
 
Join Date: Jul 2019
Posts: 6
Default

Hello!
This is Razita from the Ecwid team.


Thank you for reaching out!

So if you want to add fields to your checkout, you can do this by creating an app for the store at https://my.ecwid.com/#develop-apps Then add your JS code (by sending us an URL to your JS file) that adds JS for extra fields.

You can use the extra fields API documentation to add extra fields to your checkout: https://api-docs.ecwid.com/reference/order-extra-fields

If you are not sure about how to do it, you can contact our specialists at https://developers.ecwid.com/contact

I hope this information was useful.

If any questions arise, please let us know. Additionally, you can contact us via email at support@ecwid.com or via live chats. To open a chat, go to ecwid.com and click on the chat icon in the top menu of the site. We'd be glad to assist you.
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:59 AM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.