Ecwid.OnOrderPlaced() event allows you to get details of an order placed by a customer in storefront right after an order is placed. This event provides the order object in callback function so that you can get order details right after the event occurs.
URL to this product details page in store front (store front URL is generated from a field in Ecwid Control panel > Settings > General > Store profile)
weight
Integer
Weight of a product
OptionsInfo
Name
Type
Description
selectedOption
string
Selected option name as a key, its value as a value of that key. For dropdown, radio, textarea, textfield options value is a string; for checkbox option the value is a comma-separated list of selected values in a single string; for date option the value is a selected date according to the store format; for files option the value is a string in a format: "4 files"
PersonInfo
Name
Type
Description
name
string
Customer's name
companyName
string
Customer's company name
street
string
Customer's street address
city
string
Customer's city
countryName
string
Customer's country name. countryCode can be used instead
countryCode
string
Customer's country code. countryName can be used instead
postalCode
string
Customer's zip code
stateOrProvinceCode
string
Customer's state or province code
stateOrProvinceName
string
Customer's state or province name
phone
string
Customer's phone number
CustomerInfo
Name
Type
Description
name
string
Customer's name
email
string
Customer's email
OrderExtraFieldsInfo
Name
Type
Description
orderBy
integer
Extra field position at an order section in Ecwid Control Panel. The smaller the number, the higher the position is