Cart Custom Fields

Vendors have the ability to create cart custom fields that can either be completed by the customer during checkout or passed to DPD through the add to cart URL.  This is good for getting extra information from the customer, or passing in tracking variables from your own website to DPD using hidden external custom fields.

Custom field data is stored with the purchase in DPD and can be retrieved from the system using both the DPD Cart API and the DPD IPN system.

 

Creating a Custom Field

To create a custom field, go to the Custom Fields left menu option when you have a product store selected.   On the custom field page, you can see already created custom fields, manage them, and create new custom fields.

custom_field_list.png

 

Custom Field Types

DPD allows you to create every type of form field element:

 

Screen_Shot_2012-12-17_at_12.24.05_PM.png

 

Text:

For text input, such as a name, website, etc.   Can optionally be marked as required.

Text Area:

A multi-line text box for large blocks / paragraphs of text.  Good for notes or instructions.  Can optionally be marked as required

Pulldown / Select:

For when you want to give vendors a choice of pre-configured options. 

Radio Button:

For when you want to give vendors a choice of pre-configured options. 

Checkbox:

Good for when you want customers to agree to something, or add something.  Can optionally be marked as required, for instance if you want them to check the box to agree to terms before they checkout.

External / Hidden:

External fields are hidden fields in the cart that are populated through the add-to-cart URL.   These are useful for when you want to track ad campaigns or other variables and have them passed from your site and stored with the purchase in DPD.   External fields are optional.

 

Passing External / Hidden Field Data to the Cart

External custom fields are intended for advanced users.   By manipulating the add to cart URL you can pass additional data to be stored with the transaction to DPD.

To pass external custom field data, append the custom field ID (from the custom fields list page in DPD, pictured above) with a value.

For example, for the product with the add-to-cart URL of:

https://demo.dpdcart.com/cart/add?product_id=3062&method_id=1620

And the custom field with the ID "custom_6" like our external test in the screenshot above, you would add:

https://demo.dpdcart.com/cart/add?product_id=3062&method_id=1620&custom_6=foo

to populate the custom_6 field data with "foo".

 

Have more questions? Submit a request

Comments

  • Avatar
    Stewart Gatenby

    I found the main thrust of this article to be confusing. What exactly (in plain English) is this used for? I am looking for an option to add a postage option and I still don't know if this will do that for me...

Powered by Zendesk