Adds items to a cart. If a cart doesn't exist, it creates a cart.
|productinventoryid||number||Y||The ID of the product variant being added to the cart.|
|qty||number||Y||The qty of the item being added to the cart.|
|donation||number||N||If the product is a donation, this is the amount of the donation.|
|productfields||array||N||If you are passing in custom field data, this is an array of custom field values. Read More...|
|redirect_to||string||N||The URL you want to redirect to after the item is added to the cart. By default, the checkout screen is loaded. If you are going to choose another page, we recommend using a page on your DS account and not on an external site. It may confuse the end user to land on a different website with no reference to their cart/donation.|
|tribute_name||string||N||The name on the Tribute/Dedication.|
|tribute_type_id||number||N||The ID of the Tribute/Dedication type.|
|tribute_notify_at||date||N||The date the notification should be sent. (NOT SUPPORTED YET)|
|tribute_message||string||N||A custom message to display on the dedication.|
|tribute_notify_name||string||N||The name of the individual being notified.|
|tribute_notify_email||string||N||The email of the individual being notified.|
|tribute_notify_address||string||N||The mailing address of the individual being notified.|
productfields is a key/value array. The key should be the ID of the custom field. The value is the answer from the donor/customer.
If you had a custom field labelled "Why do you want to sign-up?" that had an ID of 73, the HTML Input might look like this:
<input name="productfields" value="" />
To find the custom field ID, find the related product in your control panel and click to the details screen. Click on the Custom Fields tab, then look for the small grey ID reference in the bottom right corner of each custom field's panel.