Product Fields

SnipWire comes with a bunch of preinstalled product fields which will be used to render the Snipcart anchors (Add to cart button). Each product field will be converted to it's corresponding data-item-* HTML property. SnipWire takes care of the necessary output format required by Snipcart.

Please note: only a few fields are mandatory to render a valid Snipcart product anchor. All other fields are optional or only needed in specific cases.

List of Preinstalled Fields and Corresponding data-attributes

Product information
Field Name Data Attribute Summary Required
(title field by default) data-item-name ProcessWire page title by default. Can be changed to any text field type in module settings. Yes
snipcart_item_id data-item-id Unique Stock Keeping Unit - SKU (will be prefilled with page ID). Yes
snipcart_item_price_* data-item-price Will be created by selecting the desired currency(s) in module config editor. SnipWire uses 1 field for each currency. The output of all currency fields will be merged to a Json array and used by the data-item-price attribute. Output sample: data-item-price='{"usd":20,"cad":25}' Yes
(not defined as PW field) data-item-url URL where Snipcart crawler will find the Buy buttons. Will be set by SnipCart automatically. Yes
snipcart_item_description data-item-description Short product description, visible in cart and during checkout. Yes
snipcart_item_image data-item-image Thumbnail URL of product in cart. Yes
snipcart_item_categories data-item-categories The categories this product belongs to. Can be set to any page field type in module settings. Output sample: data-item-categories="cat1, cat2, cat3" No
(not defined as PW field) data-item-metadata Json-object Metadata for the product. Will be set by SnipCart automatically. Output sample: data-item-metadata='{"key1":"value1","key2":"value2"}' -
Product dimensions
Field Name Data Attribute Summary Required
snipcart_item_weight data-item-weight Using grams as weight units. This is mandatory if you use any integrated shipping provider from Snipcart. No
snipcart_item_width data-item-width Using centimeters as dimension unit. Will be used if you enabled an integrated shipping provider in Snipcart. No
snipcart_item_length data-item-length Using centimeters as dimension unit. Will be used if you enabled an integrated shipping provider in Snipcart. No
snipcart_item_height data-item-height Using centimeters as dimension unit. Will be used if you enabled an integrated shipping provider in Snipcart. No
Product quantity
Field Name Data Attribute Summary Required
snipcart_item_quantity data-item-quantity Set a default quantity for the item that you are about to add. No
snipcart_item_max_quantity data-item-max-quantity Maximum allowed quantity of product. No
snipcart_item_min_quantity data-item-min-quantity Minimum allowed quantity for product. No
snipcart_item_quantity_step data-item-quantity-step The quantity of a product will increment by this value. No
snipcart_item_stackable data-item-stackable Setting this to false, adding the same product to the cart will result in two distinct items in the cart, instead of simply increasing the quantity. No
Product taxes
Field Name Data Attribute Summary Required
snipcart_item_taxable data-item-taxable Set to false to exclude item from the taxes calculation. Default is true. No
snipcart_item_taxes data-item-taxes Using this option, you can define which tax will be applied on this product. No
(not defined as PW field) data-item-has-taxes-included Set to true if the taxes you defined are included in your product prices. Will be set by SnipCart automatically. -
Digital goods
Field Name Data Attribute Summary Required
(not yet implemented) data-item-file-guid (not yet implemented) -
Subscriptions and recurring payments
Field Name Data Attribute Summary Required
snipcart_item_payment_interval data-item-payment-interval Sets interval for the recurring payment. It can be Day, Week, Month, or Year. No
snipcart_item_payment_interval_count data-item-payment-interval-count Sets payment interval count. Example: data-item-payment-interval="Month" and data-item-payment-interval-count="2" --> customer will be charged every 2 months. No
snipcart_item_payment_trial data-item-payment-trial Enables trial period for customers. Specify the duration of the trial by number of days. No
snipcart_item_recurring_shipping data-item-recurring-shipping Set to false if you need to charge shipping only on the initial order. Default: true No
(not yet implemented) data-item-cancellation-action (undocumented) No
(not yet implemented) data-item-pausing-action (undocumented) No
Shipping
Field Name Data Attribute Summary Required
snipcart_item_shippable data-item-shippable Setting this to false, the product will be flagged as an item that can not be shipped. Default: true No