DPD Website Configuration

Note

This document covers the hosted site (*.dpdcart.com) only. If you are trying to update your lightbox cart, please see the documentation for it. We highly recommend upgrading to the hosted site as soon as possible as the lightbox cart does not support all DPD features.

About

Important

This document is targeted at designers and programmers. If you are unsure of how to modify your hosted website, please contact DPD support. You can easily prevent your site from receiving sales by modifying your templates.

The DPD shopping cart is based on Twig, a flexible templating engine. Because Twig comes with some potentially unsafe features, the DPD cart templates are restricted to a sandboxed Twig instance.

We highly recommend that you look at the default layout before attempting to modify your website.

What’s Available

All of the default Twig filters and functions are available.

All of the default Twig tags are available except for extends.

In addition to the default filters, we have added several variables, filters, and snippets.

What’s Not Available

Template inheritance, including the extends keyword. The include keyword only works with snippets and cannot load files or other pages.

Page Templates

There are several page templates that make up your DPD cart. This document references the templates by name:

cart
This page renders your customer’s cart. It includes all of the products in the cart, any coupons, and checkout options.
delivery
This page renders your customer’s order after successful checkout. It includes all of the download links and a link to print a receipt.
index
This page is your website index. It contains a list of all your available products.
product
This page renders a product. It includes the product description, image(s), and links to up-sale and cross-sale products.
checkout
This page renders the checkout page. Its contents are dependent on what kind of purchase the customer made. For example, this page may display a credit card form if paying by credit card.
error
This page renders an error page. This includes the 404 page not found, download time limit reached, download limit reached, and download inactive error messages. The error page has access to the error_title and error_message variables.
layout
This page wraps all other pages on your site.