Webform Product Module

Submitted by Drupalguy on Fri, 08/14/2020 - 12:19

Webform Product Module

Webform Product module is used to create a Commerce order (payment) for a Webform submission.

It requires using commerce for payment. This module provides payment for a product type where flexibility and/or complexity is needed.

Webforn product provides handler to interface your webform with a payment method that is tracked through Commerce.

One of the issues I ran into with trying to implement Webform Product is it's lack of detailed instructions and a 'How To' for how to setup a simple webform to use as a starting point.

Simple Setup for Webform Product Module

  1. Create a webform
  2. Add elements
    1. Order ID (number)
    2. Order URL (url)
    3. Order status (text field)
    4. Product (select)
      1. Option Value is the SKU
      2. Option Text is the description of the variation
      3. Price is the price of the variation
  3. Set the permissions for Order ID, Order URL and Order status to administrator.
  4. Setup Order Type 'Webform'
    1. Workflow (Fulfillment, with validation)
    2. Check (Generate a sequential order number when the order is placed)
    3. Check (Email the customer a receipt when an order is placed)
    4. Checkout flow (Default)
  5. Setup Webform Product Handler and map the fields
    1. Store (set to the correct store)
    2. Order type (Webform)
    3. Order item type (Default)
    4. Order item title ([current-page:title])  or (([webform_submission:source-entity:title]) depending on which title you want displayed)
    5. Checkout step (order_information)
    6. Payment Provider (PayPal Commerce Platform)
    7. Payment status (Order Status)
    8. Order ID (Order ID)
    9. Order URL (Order Url)
    10. Total Price (None)