cart_include_template

Description

The Cart Include Template contains the Twig content used to display the actual cart data within your sidecart, full page cart, checkout, and receipt pages. When you include cart.inc.twig in any of your templates, this is the content that will be included. To use the default responsive theme, leave the content property empty. If you want to set your own template content, configure a content_url and then POST to the cache link relationship to cache your store's cart include template. This will run your content through our caching system which will rewrite all the JavaScript, CSS, and HTML to cache images securely on our servers.

Sandbox Example

You can interact with this resource and run actions against the sandbox API via our HAL Brower.

Actions

GET
View a cart_include_template
PATCH
Update a cart_include_template (send only the properties you want to modify)
PUT
Replace a cart_include_template (send the entire representation)
DELETE
Delete a cart_include_template
HEAD
Get just the header response
OPTIONS
Get a response explaining which HTTP methods are supported

Properties

Property Description Type Constraints
description The description of your cart include template. String Required. 100 characters or less. Defaults to Cart Include Template.
content The content of your cart include template. Leave blank to use the default responsive template. This shouldn't be set directly unless all of your image references are already over https. If they are not, set the content_url to point to your template content online and then POST to the cache link relationship. String Optional
content_url The URL of your cart include template hosted on your own server online and publicly available for our server to cache. URL Optional. 300 characters or less.
date_created The date this resource was created. Date Read only
date_modified The date this resource was last modified. Date Read only

Example Representation

{
    "_links": {
        "curies": [
            {
                "name": "fx",
                "href": "https://api.foxycart.com/rels/{rel}",
                "templated": true
            }
        ],
        "self": {
            "href": "https://api-sandbox.foxycart.com/cart_include_templates/16",
            "title": "This Template"
        },
        "fx:store": {
            "href": "https://api-sandbox.foxycart.com/stores/8",
            "title": "This Store"
        },
        "fx:template_sets": {
            "href": "https://api-sandbox.foxycart.com/cart_include_templates/16/template_sets",
            "title": "Template Sets using this template"
        },
        "fx:cache": {
            "href": "https://api-sandbox.foxycart.com/cart_include_templates/16/cache",
            "title": "POST here to cache your template using the content_url"
        },
        "fx:encode": {
            "href": "https://api-sandbox.foxycart.com/encode",
            "title": "POST here to encode a body of html for use with our HMAC cart encryption."
        }
    },
    "description": "Cart Include Template",
    "content": "",
    "content_url": "",
    "date_created": "2012-08-10T11:58:54-0700",
    "date_modified": "2012-08-10T11:58:54-0700"
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="https://api-sandbox.foxycart.com/cart_include_templates/16" rel="https://api.foxycart.com/rels/cart_include_template">
  <link rel="self" href="https://api-sandbox.foxycart.com/cart_include_templates/16" title="This Template"/>
  <link rel="https://api.foxycart.com/rels/store" href="https://api-sandbox.foxycart.com/stores/8" title="This Store"/>
  <link rel="https://api.foxycart.com/rels/template_sets" href="https://api-sandbox.foxycart.com/cart_include_templates/16/template_sets" title="Template Sets using this template"/>
  <link rel="https://api.foxycart.com/rels/cache" href="https://api-sandbox.foxycart.com/cart_include_templates/16/cache" title="POST here to cache your template using the content_url"/>
  <link rel="https://api.foxycart.com/rels/encode" href="https://api-sandbox.foxycart.com/encode" title="POST here to encode a body of html for use with our HMAC cart encryption."/>
  <description>Cart Include Template</description>
  <content></content>
  <content_url></content_url>
  <date_created>2012-08-10T11:58:54-0700</date_created>
  <date_modified>2012-08-10T11:58:54-0700</date_modified>
</resource>
{
    "class": [
        "cart_include_template"
    ],
    "properties": {
        "description": "Cart Include Template",
        "content": "",
        "content_url": "",
        "date_created": "2012-08-10T11:58:54-0700",
        "date_modified": "2012-08-10T11:58:54-0700"
    },
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "https://api-sandbox.foxycart.com/cart_include_templates/16"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/store"
            ],
            "href": "https://api-sandbox.foxycart.com/stores/8"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/template_sets"
            ],
            "href": "https://api-sandbox.foxycart.com/cart_include_templates/16/template_sets"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/cache"
            ],
            "href": "https://api-sandbox.foxycart.com/cart_include_templates/16/cache"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/encode"
            ],
            "href": "https://api-sandbox.foxycart.com/encode"
        }
    ]
}

Zoomable Resources

This resource has no linked resources which can be "zoomed" in on, filtered and embedded within this resource.