Order Fields

Order Fields allows you to map order fields to member fields. After an order is placed, the member fields will be updated based on the value of the current cart. The location to update order fields is in the CP of the store addon, under Settings > Order Fields. The Title section allows you to edit what will appear in the CP section when viewing specific completed orders. The ‘Mapped to Member Field’ section allows for the mapping of the store field to a selected dropped down member field. These member fields will be updated with what the customer inputs on the checkout when logged in and checking out.

image

A specific example will be given for how to implement an order field and map it to a member field. We will be doing order_custom9 as our example: Our title is set to ‘Title Nine’ and our dropdown is set to ‘Nine’ the dropdown here is a member field that we created earlier. (You may review how to add a member field from this documentation Create Member Field)

image

Next, in the template for your checkout tag, here is an example of how to display the order field: This example can also be found in the example templates included with the store addon.

image

Now, when a logged in member of the site places an order, their member field will be updated with the value of the order field, and in the order part your custom ‘Title’ from earlier will be displayed.

image

Updating Order Fields From an Older Store Version

In previous Store Versions, Order Fields were relying on Legacy Member Templates. If you used this in prior Store versions, you likely have $config['legacy_member_templates'] = 'y'; in your config file. This legacy setting is no longer needed for Store’s Order Fields. To update - you may turn that setting off. Then, map your new member fields to the order fields as shown above and save the settings page. Finally, you will switch to using the new templating described above and an example of that can also be found in the store template examples. The example specifically outlines order_custom9 but you will extend this to all of your specific order fields that are in use for your site.