Customer Profile Type UI in Customer Profile Type UI 7
File
help/main.html
View source
<html><head><title>Customer Profile Type UI</title><style type="text/css">ol{margin:0;padding:0}.c9{color:#1155cc;font-size:10pt;background-color:#ffffff;font-family:"Verdana";text-decoration:underline}.c6{color:#0678be;font-size:10pt;background-color:#ffffff;font-family:"Verdana";text-decoration:underline}.c0{color:#222222;font-size:10pt;background-color:#ffffff;font-family:"Verdana"}.c11{color:#222222;font-size:28pt;background-color:#ffffff}.c3{list-style-type:decimal;margin:0;padding:0}.c7{color:#222222;font-size:17pt;background-color:#ffffff}.c10{list-style-type:disc;margin:0;padding:0}.c13{max-width:468pt;background-color:#ffffff;padding:72pt 72pt 72pt 72pt}.c5{text-indent:-18pt;margin-left:18pt}.c2{color:inherit;text-decoration:inherit}.c4{font-style:italic}.c8{font-weight:bold}.c12{height:11pt}.c1{direction:ltr}.title{padding-top:24pt;line-height:1.15;text-align:left;color:#000000;font-size:36pt;font-family:"Arial";font-weight:bold;padding-bottom:6pt}.subtitle{padding-top:18pt;line-height:1.15;text-align:left;color:#666666;font-style:italic;font-size:24pt;font-family:"Georgia";padding-bottom:4pt}li{color:#000000;font-size:11pt;font-family:"Arial"}p{color:#000000;font-size:11pt;margin:0;font-family:"Arial"}h1{padding-top:24pt;line-height:1.15;text-align:left;color:#000000;font-size:18pt;font-family:"Arial";font-weight:bold;padding-bottom:6pt}h2{padding-top:18pt;line-height:1.15;text-align:left;color:#000000;font-size:14pt;font-family:"Arial";font-weight:bold;padding-bottom:4pt}h3{padding-top:14pt;line-height:1.15;text-align:left;color:#666666;font-size:12pt;font-family:"Arial";font-weight:bold;padding-bottom:4pt}h4{padding-top:12pt;line-height:1.15;text-align:left;color:#666666;font-style:italic;font-size:11pt;font-family:"Arial";padding-bottom:2pt}h5{padding-top:11pt;line-height:1.15;text-align:left;color:#666666;font-size:10pt;font-family:"Arial";font-weight:bold;padding-bottom:2pt}h6{padding-top:10pt;line-height:1.15;text-align:left;color:#666666;font-style:italic;font-size:10pt;font-family:"Arial";padding-bottom:2pt}</style></head><body class="c13"><h2 class="c1"><span class="c11">The big idea</span></h2><p class="c1"><span class="c0">The aim of this project is to provide a dynamic way to add new customer profile types for the </span><span class="c6"><a class="c2" href="http://drupal.org/project/commerce">Commerce module</a></span><span class="c0"> </span><span class="c0">using a UI. This will mean that anyone wanting another customer profile type other then the default billing pane that comes with Commerce can easily add new ones.</span></p><p class="c1 c12"><span class="c0"></span></p><p class="c1"><span class="c0">This module also adds a </span><span class="c0 c8">new widget</span><span class="c0"> (</span><span class="c0 c4">Dynamic profile form manager</span><span class="c0">) for </span><span class="c0 c4">commerce customer profile reference</span><span class="c0"> fields that allows admins to enable/disable customer profiles on the order edit form using some checkboxes and some slick ajaxiness.</span></p><p class="c12 c1"><span class="c0"></span></p><p class="c1"><span class="c0">The widget settings include options to wrap the customer profile panes in collapsible fieldsets. This becomes especially useful if you have many customer profile types that clutter the order edit form. The same settings are also added to the default </span><span class="c0 c4">customer profile manager</span><span class="c0"> widget that ships with commerce.</span></p><h2 class="c1"><span class="c11">Creating new Customer Profiles</span></h2><p class="c1"><span class="c0">After enabling the module you will most likely want to </span><span class="c0 c8">clear all caches</span><span class="c0"> so that the new menu items, etc appear.</span></p><ol class="c3" start="1"><li class="c5 c1"><span class="c0">Click the new 'Add customer profile type' button on the profile types page. It will also be available in the admin menu: </span><span class="c9"><a class="c2" href="/admin/commerce/customer-profiles/profile-types/add">store > profiles > add customer profile type</a></span></li><li class="c1 c5"><span class="c0">Fill out the form and click save.</span></li><li class="c5 c1"><span class="c0">Click manage fields or display to add fields to your new customer profile type and control how it is displayed.</span></li><li class="c5 c1"><span class="c0">Finally go to the order configuration page and drag/drop the new profiles into the order checkout regions you want them to appear in.</span></li></ol><h2 class="c1"><span class="c11">Dynamically disable profile panes using rules</span></h2><p class="c1"><span class="c0">This module will also attempt to add a new rule event and actions that will allow for the dynamic disabling of customer profile panes during the checkout process.</span></p><p class="c1"><span class="c0">New rule event: 'Before customer profile panes are displayed'</span></p><p class="c1"><span class="c0">New rule actions:</span></p><ol class="c10" start="1"><li class="c5 c1"><span class="c0">'Disable all customer profile panes' - disables all customer profile panes on the order</span></li><li class="c5 c1"><span class="c0">'Disable a customer profile pane' - allows you to select a specific customer profile type to disable.</span></li><li class="c5 c1"><span class="c0">'Enable a customer profile pane' - allows you to select a specific customer profile type to enable.</span></li></ol><h3 class="c1"><span class="c7">How to enable/disable customer profile panes</span></h3><h4 class="c1"><span class="c0 c8">During checkout</span></h4><p class="c1"><span class="c0">By default all customer profile panes that have been placed in checkout regions will be enabled and appear in the checkout process. You can enable/disable them using the rules module in the following way:</span></p><ol class="c3" start="1"><li class="c5 c1"><span class="c0">Create a new rule that is triggered on the 'Before customer profile panes are displayed' event</span></li><li class="c5 c1"><span class="c0">Add in some conditions. One particular use case is for a membership system where different membership types require different customer profile fields. So my conditions involve the order's products.</span></li><li class="c5 c1"><span class="c0">Add as many 'Disable/Enable a customer profile pane' actions as panes you wish to disable. By default all panes are enabled. I tend to use the 'disable all' action and then follow it by enable actions for the panes I want to display.</span></li></ol><h4 class="c1"><span class="c0 c8">On the order edit page</span></h4><p class="c1"><span class="c0">By default all customer profile forms will be displayed on the order edit page regardless whether they were enabled during checkout or if a profile of that type has even been created for the order yet. (Commerce assumes you want to fill out these forms, however this is not always the case.)</span></p><ol class="c3" start="1"><li class="c5 c1"><span class="c0">For customer profile panes that you do not always want displayed for every order change the widget for that profile reference field on the order's manage fields page (</span><span class="c9"><a class="c2" href="/admin/commerce/config/order/fields">admin/commerce/config/order/fields</a></span><span class="c0">). Select the </span><span class="c0 c4">'dynamic profile form manager'</span><span class="c0"> widget from the options.</span></li><li class="c5 c1"><span class="c0">To toggle the collapsed/collapsible state of each customer profile form on the order edit page, edit the respective field. Change the 'Field form wrapper' setting to your preference. This setting also appears on the default </span><span class="c0 c4">'customer profile manager'</span><span class="c0"> widget.</span></li></ol><p class="c12 c1"><span></span></p></body></html>