less than a minute read • Updated 9 minutes ago
Cart parameters reference
A reference guide to all cart parameters available in Foxy for controlling cart behavior, session values, and output format.
These parameters are included in cart requests to control cart behaviour, session data, and output format. They are not product-specific — for product parameters, see the product parameters reference.
Parameters are added to cart links or as hidden inputs in add to cart forms.
cart
Controls the action performed when the cart is requested.
Value | Description |
|---|---|
| Default. Adds products to the cart. |
| Displays the cart without adding products. |
| Adds products and immediately redirects to checkout. |
| Redirects to PayPal Express Checkout immediately. |
| Redirects to PayPal legacy Express Checkout immediately. |
| Redirects to checkout with the update billing info flag set. Empties the cart. |
empty
Clears the contents of the cart.
Value | Description |
|---|---|
| Empties the cart including session values, coupons, address, and shipping selections. |
| Same as |
If products are added in the same request, the cart is emptied first and then the products are added.
coupon
Adds one or more coupon codes directly to the cart.
Accepts any valid coupon codes, separated by a comma. If an invalid or duplicate code is added, an error may display. Once added, a coupon code remains for the life of the session or until removed.
Do not sign the coupon value if using link and form validation.
redirect
Immediately redirects the customer to a page after the cart loads.
Accepts a path relative to your store’s domain (e.g. redirect=index.html). For security reasons, you cannot redirect to a different domain. URL encode any ? and & symbols in the path.
locale
Sets the currency and locale for the cart session.
Accepts a full locale code (e.g. en_US, es_MX). Changing the locale will empty the cart of existing products. Products added in the same request will be added normally.
template_set
Applies a specific template set to the cart session.
Accepts any valid template set code. If the template set changes the locale, existing products are removed.
output
Specifies the output format for the cart request.
Value | Description |
|---|---|
| Default. Returns the cart as HTML. |
| Returns the cart as a JSON object. |
callback
Used with output=json to return a JSONP response instead of JSON. Typically used with a JavaScript library like jQuery.
fc_auth_token
Used with Single Sign-On (SSO) to allow a customer to proceed through to checkout already authenticated.
residential
Overrides the residential/commercial shipping setting from the Foxy admin.
Value | Description |
|---|---|
| Treats the address as residential. |
| Treats the address as commercial. |
fc_show_maintenance
Set to true to override maintenance mode and view the store normally. Useful for testing while the store is in maintenance mode.
h: session values
Session values are added to the customer’s session and are not tied to products. Use the h: prefix on any parameter name to store it as a session value (e.g. h:customer_id=12345).
Session values are available in the cart JSON and in the transaction datafeed on a completed transaction. Maximum value length is 700 characters.
Do not sign h: values if using link and form validation.
UTM and Klaviyo parameters
utm_source, utm_medium, utm_campaign, utm_term, utm_content, and _ke are passed through to the next page load of the cart or checkout for Google Analytics campaign tracking and Klaviyo.
These values must be passed as URL parameters — not within the hash. They are not stored in the session.