- Issue created by @lhubbert
I am really hoping to be able to use this module as I have a very complex set of registration fields that have to accompany each purchase. I really need to make the purchases work from Webform instead of trying to do custom fields on my order type in Commerce.
I have 15 products set up in Commerce. Each represents a camp session. Some have more than one variation (aftercare is offered) and some have only one. I would like to keep Commerce as my default place for pricing, etc.
When I go to configure the handler I run into some questions and issues that I'm not sure how to fix.
STORE >> I choose Reference one... and it finds my default store
ORDER ITEM >>
Store the order item ID - is this just a field that I add to the form (I assume hidden) that acts as placeholder for carrying the order item ID (SKU?) to the checkout page?
Purchasable Entity Type - I put Product Variation here, right?
Purchasable Entity - Here I put the key value for a Select list field I created in the form that has all the SKUs I want to include - Is this correct? They show up correctly on the form as I would expect.
Title, Amount and Currency I keep as Use the product variation selected.
Order item type I keep as default
This all feels like it should work. But when I go to the form and select a camp session from the pull down and click submit, I get a message - "There was a problem processing your request. Please, try again." And a log entry of "Exception: Unable to load the specified entity of type commerce_product_variation. in Drupal\commerce_webform_order\Plugin\WebformHandler\CommerceWebformOrderHandler->loadEntityValue() (line 1713 of ....."
I hate asking for help but I've searched high and low for more details on how to configure the handler. Hoping someone can give me a hand.
Pasting my YAML in case it helps:
tudent_first_name:
'#type': textfield
'#title': "Student's First Name"
student_last_name:
'#type': textfield
'#title': "Student's Last Name"
student_birthdate:
'#type': webform_date
'#title': "Student's Birthdate"
student_school:
'#type': textfield
'#title': "Student's School"
allergies_emergency_info:
'#type': webform_textarea
'#title': 'Allergies Emergency Information'
special_medical_instructions:
'#type': webform_textarea
'#title': 'Special Medical Instructions'
special_medical_concerns:
'#type': webform_textarea
'#title': 'Special Medical Concerns'
emergency_contact_name:
'#type': textfield
'#title': 'Emergency Contact Name'
emergency_contact_phone:
'#type': webform_tel
'#title': 'Emergency Contact Phone'
emergency_contact_address:
'#type': textfield
'#title': 'Emergency Contact Address'
physician_name:
'#type': textfield
'#title': "Physician's Name"
physician_phone:
'#type': webform_tel
'#title': "Physician's Phone"
physician_address:
'#type': textfield
'#title': "Physician's Address"
insurance_company:
'#type': textfield
'#title': 'Name of Insurance Company'
policy_number:
'#type': textfield
'#title': 'Policy Number'
policy_holder_name:
'#type': textfield
'#title': 'Name of Policy Holder'
emergency_hospital:
'#type': textfield
'#title': 'Hospital that child should be taken to in case of emergency'
authorized_pickup:
'#type': webform_textarea
'#title': 'These people are allowed to pick up my child from camp'
permission_release:
'#type': webform_radios
'#title': 'Permission for Release at end of day'
'#options':
'Yes': 'Yes'
'No': 'No'
parent1_first_name:
'#type': textfield
'#title': 'First Name Parent 1'
parent1_last_name:
'#type': textfield
'#title': 'Last Name Parent 1'
parent1_address:
'#type': textfield
'#title': 'Address Parent 1'
parent1_city:
'#type': textfield
'#title': 'City Parent 1'
parent1_state:
'#type': webform_select
'#title': 'State Parent 1'
'#options':
AL: Alabama
AK: Alaska
AZ: Arizona
AR: Arkansas
CA: California
CO: Colorado
CT: Connecticut
DE: Delaware
FL: Florida
GA: Georgia
HI: Hawaii
ID: Idaho
IL: Illinois
IN: Indiana
IA: Iowa
KS: Kansas
KY: Kentucky
LA: Louisiana
ME: Maine
MD: Maryland
MA: Massachusetts
MI: Michigan
MN: Minnesota
MS: Mississippi
MO: Missouri
MT: Montana
NE: Nebraska
NV: Nevada
NH: 'New Hampshire'
NJ: 'New Jersey'
NM: 'New Mexico'
NY: 'New York'
NC: 'North Carolina'
ND: 'North Dakota'
OH: Ohio
OK: Oklahoma
OR: Oregon
PA: Pennsylvania
RI: 'Rhode Island'
SC: 'South Carolina'
SD: 'South Dakota'
TN: Tennessee
TX: Texas
UT: Utah
VT: Vermont
VA: Virginia
WA: Washington
WV: 'West Virginia'
WI: Wisconsin
WY: Wyoming
parent1_zip:
'#type': textfield
'#title': 'Zip Parent 1'
parent1_main_phone:
'#type': webform_tel
'#title': 'Main Phone Parent 1'
parent1_secondary_phone:
'#type': webform_tel
'#title': 'Secondary Phone Parent 1'
parent1_email:
'#type': webform_email
'#title': 'Email Address Parent 1'
parent2_first_name:
'#type': textfield
'#title': 'First Name Parent 2'
parent2_last_name:
'#type': textfield
'#title': 'Last Name Parent 2'
parent2_address:
'#type': textfield
'#title': 'Address Parent 2'
parent2_city:
'#type': textfield
'#title': 'City Parent 2'
parent2_state:
'#type': webform_select
'#title': 'State Parent 2'
'#options':
AL: Alabama
AK: Alaska
AZ: Arizona
AR: Arkansas
CA: California
CO: Colorado
CT: Connecticut
DE: Delaware
FL: Florida
GA: Georgia
HI: Hawaii
ID: Idaho
IL: Illinois
IN: Indiana
IA: Iowa
KS: Kansas
KY: Kentucky
LA: Louisiana
ME: Maine
MD: Maryland
MA: Massachusetts
MI: Michigan
MN: Minnesota
MS: Mississippi
MO: Missouri
MT: Montana
NE: Nebraska
NV: Nevada
NH: 'New Hampshire'
NJ: 'New Jersey'
NM: 'New Mexico'
NY: 'New York'
NC: 'North Carolina'
ND: 'North Dakota'
OH: Ohio
OK: Oklahoma
OR: Oregon
PA: Pennsylvania
RI: 'Rhode Island'
SC: 'South Carolina'
SD: 'South Dakota'
TN: Tennessee
TX: Texas
UT: Utah
VT: Vermont
VA: Virginia
WA: Washington
WV: 'West Virginia'
WI: Wisconsin
WY: Wyoming
parent2_zip:
'#type': textfield
'#title': 'Zip Parent 2'
parent2_main_phone:
'#type': webform_tel
'#title': 'Main Phone Parent 2'
parent2_secondary_phone:
'#type': webform_tel
'#title': 'Secondary Phone Parent 2'
parent2_email:
'#type': webform_email
'#title': 'Email Address Parent 2'
parent1_employer:
'#type': textfield
'#title': 'Employer Parent 1'
parent1_high_school:
'#type': textfield
'#title': 'High School Alma Mater Parent 1'
parent1_college:
'#type': textfield
'#title': 'College/University Parent 1'
parent1_degrees:
'#type': textfield
'#title': 'Degree(s) Earned Parent 1'
parent2_employer:
'#type': textfield
'#title': 'Employer Parent 2'
parent2_high_school:
'#type': textfield
'#title': 'High School Alma Mater Parent 2'
parent2_college:
'#type': textfield
'#title': 'College/University Parent 2'
parent2_degrees:
'#type': textfield
'#title': 'Degree(s) Earned Parent 2'
home_languages:
'#type': textfield
'#title': 'What languages are spoken in your home?'
arts_education_importance:
'#type': textarea
'#title': 'Why is arts education important to you and your family?'
payment_method:
'#type': commerce_webform_order_payment_method
'#title': 'Payment Method'
'#allowed_payment_gateways':
manual: manual
orderid:
'#type': textfield
'#title': OrderID
camp_options:
'#type': select
'#title': 'Camp Options'
'#options':
BB-1: BB-1
BB-2: BB-2
BB-3: BB-3
EX-1: EX-1
EX-1-EC: EX-1-EC
EX-2: EX-2
EX-2-EC: EX-2-EC
EX-3: EX-3
EX-3-EC: EX-3-EC
Active
3.0
User interface