Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Created by Mustardseed Media Inc http://mustardseedmedia.com View a tutorial of this feature at: http://mustardseedmedia.com/podcast/episode51 A simple Drupal 7 Feature which does the following: 1. Creates a product type: "Paid Event" 2. Creates a product display type: "Paid Event" 3. Designates "Paid Event" nodes as webform types Then has rules which do the following: 1. When a product is created it: a) creates a paid event product display node b) populates the product on this new node with the product reference c) autocreates a webform on this node with quantity and paid status fields d) redirects to the display node to add additional details 2. When the webform on this paid event display node is submitted it: a) takes the webform quantity field and use it as the quantity desired to purchase b) adds an order for the associated product (and the quantity) c) saves the webform "sid" in the line item's "sid" field for later reference c) redirects the user directly to checkout for these items only (it bypasses and ignores whats in the cart) 3. After checkout is completed it: a) retrieves the webform submission id (sid) from the line item b) changes the 'paid status' field from unpaid to paid SETUP: Some things couldn't be featurized. They should be setup manually after enabling the feature: 1. Edit your webform every time you create a new one and select "form validation" (provided by webform validation module). Choose "numeric" and set it to validate the quantity field. 2. Be glad you didn't have to figure all this out yourself :) 3. Say thanks via a paypal chipin: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=EL7W9FY45H66S&lc=US