The Digistore24 shopping cart is a useful feature if you offer multiple products on your sales page.
With the shopping cart, customers can first select and “collect” all the products they’re interested in - and then complete the purchase in one combined checkout.
This has benefits for your customers:
- Simplicity: Select everything first, then pay in one step - instead of having to go through multiple separate checkout processes.
- Clarity: See all selected products at a glance during checkout.
And it also has benefits for you:
- A simpler purchase process for multiple products can reduce friction and lead to more completed purchases (higher conversion).
- You can strategically place related products on your sales page that customers can easily add to their purchase.
You embed the Digistore24 shopping cart on your sales page. There are different options (JavaScript or via the Digistore24 WordPress plugin) - and you can configure the shopping cart extensively if needed. This article shows you how.
How purchasing with the shopping cart works
Once the Digistore24 shopping cart is embedded on your sales page, the purchase flow for your customers works like this:
- The customer opens your sales page.
-
The customer clicks the Buy button for a product.
The product is added to the shopping cart. Right afterwards, the customer sees a short confirmation that includes:- A note that the product was added to the shopping cart
- Subtotal and number of selected products
- A Continue shopping button
- A Go to checkout button
-
Optional: The customer opens the shopping cart on your page.
You can add a link or button that opens the shopping cart as an overlay window. -
The customer goes to checkout.
When they click Go to checkout, they are redirected to the Digistore24 order form. -
The customer pays for everything together in the order form.
All selected products are listed there - and the customer completes the purchase in one step.
Add the Digistore24 shopping cart to your sales page
To let your customers use the Digistore24 shopping cart, you need to add it once to your sales page. Depending on your website, there are two ways to do this: either with a small JavaScript snippet or - if you use WordPress - with the Digistore24 WordPress plugin and a shortcode.
Embed the shopping cart
To make the shopping cart available on your sales page, you need to embed it once.
Select one of the following options:
Embed the shopping cart via JavaScript
-
Add this code to the source code of your sales page (for example in the area where other scripts are embedded).
<script src="https://www.digistore24-scripts.com/service/digistore.js"></script> <script> digistoreCart("theme=v2"); </script> - Save / publish the page.
The shopping cart is now embedded on your page and can be used.
Embed the shopping cart via WordPress (plugin + shortcode)
Requirement: The shortcode only works with WordPress and the Digistore24 plugin (version 2.17 or higher).
- Install the Digistore24 plugin (if you have not already done so).
- Open the page that contains your sales page in the WordPress editor.
-
Insert the shortcode in a suitable place.
[digistore_cart theme=v2] - Save / update the page.
The shopping cart is now embedded on your WordPress page and can be used.
Link buy buttons so products land in the shopping cart
For a product to land in the shopping cart when the customer clicks Buy, your buy button must link to a specific Digistore24 address. The customer stays on your sales page - the product is simply added to the shopping cart.
How it works
Buy URL (basic principle)
The buy URL for the shopping cart is:
https://www.digistore24.com/add/PRODUCT-ID
Replace PRODUCT-ID with your product ID. You can find it, for example, under Product setup > Product configuration in the product row.
Important: Use classic HTML links only
Use a normal HTML link for the buy button in the following format:
<a href="LINK">LINK-TEXT</a>
Otherwise, Digistore24 may not recognize the buy button correctly.
Examples
Example: Text link
<a href="https://www.digistore24.com/add/PRODUCT-ID">Buy now</a>
Example: Image link
<a href="https://www.digistore24.com/add/PRODUCT-ID"><img src="IMAGE-URL" /></a>
Add a shopping cart link or button
So your customers can always see what is already in the shopping cart, you should add a shopping cart link or shopping cart button to your sales page. This lets the customer open the shopping cart and then complete the purchase.
How it works
Shopping cart URL
https://www.digistore24.com/cart
Examples
Example: Text link
<a href="https://www.digistore24.com/cart">Show shopping cart</a>
Example: Image link
<a href="https://www.digistore24.com/cart"><img src="IMAGE-URL" /></a>
Optional: Direct link to checkout
If you want, you can also add a direct link to checkout. This allows the customer to switch directly to the order form.
https://www.digistore24.com/checkout
Example: Text link
<a href="https://www.digistore24.com/checkout">Go to checkout</a>
Example: Image link
<a href="https://www.digistore24.com/checkout"><img src="IMAGE-URL" /></a>
Set checkout: standard or your own domain
In most cases, checkout on Digistore24 is sufficient. For certain tracking setups, it can be useful to use checkout on your own domain.
Checkout on Digistore24 (standard)
With the standard option, you do not need to do anything else. When a customer clicks Go to checkout in the shopping cart, they are redirected to the Digistore24 order form.
Optional: Set a specific order form (orderform_id)
If you want to use a specific order form, you can specify its ID in the shopping cart embed code. Replace 4321 with your order form ID.
JavaScript
<script src="https://www.digistore24-scripts.com/service/digistore.js"></script> <script> digistoreCart("theme=v2 orderform_id=4321"); </script>
WordPress shortcode
[digistore_cart theme=v2 orderform_id=4321]
Checkout on your own domain (e.g. tracking / iOS)
If you want to embed the checkout on your own domain (for example for certain tracking setups like Facebook ads with iOS devices), follow these three steps:
How it works
-
Embed checkout on your domain
Add one of the following code snippets to your checkout page (on your domain):-
JavaScript
<style> body { margin:0; } </style> <script src='https://www.digistore24.com/service/js/orderform_widget.js'></script> <iframe class='ds24_payIFrame' style='overflow: hidden; width: 100%; height: 100%; border: none; margin:0; padding: 0; background: transparent;' src='https://www.digistore24.com/checkout?iframe=1'></iframe> -
WordPress shortcode
[digistore_cart_checkout]
-
-
Provide your checkout URL to the shopping cart
Pass the URL of your own checkout page in the shopping cart embed code.-
JavaScript
<script src="https://www.digistore24-scripts.com/service/digistore.js"></script> <script> digistoreCart("theme=v2 checkout_url=https://www.mydomain.com/my-checkout_url"); </script> -
WordPress shortcode
[digistore_cart theme=v2 checkout_url=https://www.mydomain.com/my-checkout_url]
-
-
Replace the placeholder
Replacehttps://www.mydomain.com/my-checkout_urlwith the URL of your checkout page from step 1.
Note
You can specify the checkout URL and the order form at the same time:
JavaScript
<script src="https://www.digistore24-scripts.com/service/digistore.js"></script> <script> digistoreCart("theme=v2 orderform_id=4321 checkout_url=https://www.mydomain.com/my-checkout_url"); </script>WordPress shortcode
[digistore_cart theme=v2 orderform_id=4321 checkout_url=https://www.mydomain.com/my-checkout_url]
Settings and configuration for the Digistore24 shopping cart
You can customize how the Digistore24 shopping cart behaves using additional options - for example language, VAT display, or the destination after purchase. You simply add the options to the code or shortcode you already use for the shopping cart.
Default in this article: All examples use theme=v2. If you want to use additional settings, just append them.
How to add settings (basic principle)
JavaScript
digistoreCart("theme=v2 OPTION1 OPTION2");
WordPress
[digistore_cart theme=v2 OPTION1 OPTION2]
Example
digistoreCart("theme=v2 language=en netto");[digistore_cart theme=v2 language=en netto]
Common settings (recommended)
These options are used most often. You can combine them as needed.
Language
Set the language of the shopping cart.
-
language=de(German) -
language=en(English)
Example:digistoreCart("theme=v2 language=en");[digistore_cart theme=v2 language=en]
Prices including or excluding VAT
-
brutto- prices including VAT -
netto- prices as net prices plus VAT
Example:digistoreCart("theme=v2 brutto");[digistore_cart theme=v2 brutto]
After purchase / back to your page
-
thankyou_url=https://xyz- destination page after purchase -
return_url=https://xyz- destination when the buyer clicks “Continue shopping” in the order form -
no_return_button- hides “Continue shopping” in the order form
Voucher and tracking
-
voucher=some_voucher_code- adds a voucher code -
tracking='Your tracking key'- adds a tracking key to the purchase
Note: If your tracking key contains spaces, use quotes.
Checkout behavior
-
orderform_id=4321- uses a specific order form -
orderform_as_popup- opens the order form in a new window
Control upsells (with examples)
With upsell=..., you define whether and how upsells are shown during the order process.
Common variants
-
upsell=any- Digistore24 selects the upsells from the first product in the shopping cart that has upsells (default) -
upsell=none- disables upsells completely -
upsell=first- shows only the upsells of the first product in the shopping cart -
upsell=1234- shows the upsells of product 1234 after the initial purchase
Order rules (examples)
You can specify multiple product IDs in an order. Digistore24 then checks which products are in the shopping cart, in the order you list them.
-
upsell=12,34,56,78,12- checks whether products 12/34/56/78 are in the shopping cart (see existing logic for details) -
upsell=123,any,456- prefers 123, otherwise any other product in the shopping cart, otherwise 456 -
upsell=123,456,none- prefers 123, otherwise 456, otherwise no upsells
Example:digistoreCart("theme=v2 upsell=none");[digistore_cart theme=v2 upsell=none]
For developers: Display values and use events
These options are helpful if you want to integrate the shopping cart more deeply into your page (for example, display the shopping cart value or react to changes).
Display the shopping cart total on your page
show_total_amount=some_name displays the shopping cart total in an HTML element with the specified ID or CSS class (or matching name).
Example:digistoreCart("theme=v2 show_total_amount=total_amount");[digistore_cart theme=v2 show_total_amount=total_amount]
Display shopping cart items on your page
show_cart_items=some_name displays the contents of the shopping cart in an HTML element with the specified ID or CSS class (or matching name).
Example:digistoreCart("theme=v2 show_cart_items=cart_items");[digistore_cart theme=v2 show_cart_items=cart_items]
React to changes
on_cart_change=some_js_function calls a JavaScript function whenever the shopping cart changes. The function receives a cart object (including gross/net amounts, currency, and items).
Handle custom messages
on_message=some_alert_function calls a JavaScript function when a message should be shown to the user. msg_type is error, warning, or info.
All settings (reference table)
This table lists all available options as a reference.
(The examples in this article use theme=v2 by default.)
|
Option |
Explanation |
info_position
|
Defines where the “Added to shopping cart” info message
is displayed.
|
info_sticky
|
If specified, the shopping cart summary is always displayed and “pinned” to the edge of the window. |
brutto
|
Prices in the shopping cart are shown including VAT. If not explicitly defined, the setting of the first product in the shopping cart is used as the default for all additional products. |
netto
|
Prices in the shopping cart are shown as net prices plus VAT. If not explicitly defined, the setting of the first product in the shopping cart is used as the default for all additional products. |
orderform_id=4321
|
Selects the order form that is shown after the customer clicks “Go to checkout”. If not explicitly defined, the setting of the first product in the shopping cart is used as the default for all additional products. |
checkout_url=https://xyz
|
Defines which checkout URL is used (for example, if you embedded the checkout on your own domain). |
return_url=https://xyz
|
Defines where the buyer is redirected when they click “Continue shopping” in the order form. The default is the HTTP referrer (i.e., the most recently visited page). |
thankyou_url=https://xyz
|
After the purchase, the buyer is redirected to this page. |
no_return_button
|
Hides the “Continue shopping” link in the order form. |
currency_symbol
|
Shows the currency symbol on the order form instead of the currency code (e.g. EUR → €). |
currency=USD
|
Uses the specified currency in the shopping cart (e.g. EUR or USD). |
upsell=XXX
|
Defines whether and how upsells are shown during the order process (see the variants below). |
upsell=any
|
Digistore24 selects the upsells from the first product in the shopping cart that has upsells. (Default) |
upsell=1234
|
Shows the upsells of product 1234 after the initial purchase. |
upsell=12,34,56,78,12
|
Checks the list in order: If product 12 is in the shopping cart, its upsells are shown. Otherwise 34, otherwise 56, otherwise 78. If none of these products are in the shopping cart, the upsells of the last product ID in the list are shown (here: 12; duplicates are possible but not recommended). |
upsell=123,any,456
|
Shows the upsells of product 123 if it is in the shopping cart; otherwise the upsells of any other product in the shopping cart (if available); otherwise the upsells of product 456 (even if 456 is not in the shopping cart). |
upsell=123,456,none
|
Shows the upsells of product 123 if it is in the shopping cart; otherwise the upsells of product 456 if it is in the shopping cart; otherwise no upsells and the buyer is redirected directly to the thank-you page. |
upsell=none
|
Disables upsells completely - regardless of whether products in the shopping cart have upsells. |
upsell=first
|
Shows only the upsells of the first product in the shopping cart. This is the default behavior for sales that do not use a shopping cart. |
language=en
|
Switches the language to English. By default, the language
of the first product added
to the shopping cart is used. Available languages: en
and de.
|
orderform_as_popup
|
When the buyer clicks “Go to checkout”, the Digistore24 order form opens in a new window. |
tracking=your_tracking_keytracking='Your tracking key'
|
Adds the specified tracking key to the purchase (like
the ds24tr GET parameter).
If the tracking key contains spaces, use quotes (e.g.
tracking='my key').
|
quantity_readonly
|
The quantity cannot be changed in the order form, and products cannot be removed. |
show_total_amount=some_name
|
Displays the shopping cart total in the HTML element with the specified ID or CSS class (or name). When the shopping cart changes, the amount updates automatically. |
show_cart_items=some_name
|
Displays the contents of the shopping cart in the HTML element with the specified ID or CSS class (or name). |
on_cart_change=some_js_function
|
Calls the JavaScript function some_js_function(cart)
whenever the shopping cart changes.
cart includes (among others):
|
on_message=some_alert_function
|
Calls the JavaScript function
some_alert_function(msg_type, msg_text)
when a message should be displayed.
msg_type is error, warning,
or info.
|
voucher=some_voucher_code
|
Adds the voucher code to the order. The code is applied (provided it is valid for the first product purchased). |
theme=v2theme=moderntheme=classic
|
Selects a theme for the shopping cart. In this article,
we use theme=v2 by default.
(For the classic theme, set theme=classic;
alternatively theme=modern.)
|
Note
If a setting is not explicitly defined in the code or shortcode, the setting of the first product in the shopping cart is used as the default for all additional products.
Example:
[digistore_cart theme=v2 language=en netto tracking="campaign 1"]
Tips and tricks for the Digistore24 shopping cart
Here are a few practical tips from real-world use.
Tip 1: Align the payment plans of your products
If you sell products via subscription or installment payments, you should use the same billing intervals for all products whenever possible (e.g. monthly or yearly). This results in fewer individual charges for the buyer - and keeps the checkout process clear.
You can mix one-time payments with subscription and installment products. Digistore24 then offers the buyer the billing interval that fits all selected products.
Example
- Product 1: yearly payment and monthly payment
- Product 2: yearly payment and two-year payment
- Product 3: one-time payment only
Result: The buyer can only pay using yearly payments (because that is the common denominator).
If your products have trial periods, the shortest trial period among the selected products is used. And to ensure charges line up, you should also decide consistently for all products (including one-time payments) whether VAT is included in the price or not.
You can configure both in Digistore24 under Product setup > Product configuration - in the product details on the “Payment plans” tab.
Tip 2 (for web designers): Keep windows visible permanently
If your web designer needs to adjust the look of the shopping cart, it helps if the shopping cart windows stay visible permanently. This makes them easier to style and test.
Add the parameter ?ds24debug to the URL of the page where the shopping cart is embedded.
Example
https://www.domain.com?ds24debug
Tip 3 (for web developers): Add products via JavaScript
If you want to make your page more flexible (e.g. custom buttons, dynamic product lists), you can also add products to the shopping cart directly via JavaScript.
Add products
ds24cart_add(123) - adds product 123 to the shopping cartds24cart_add(123, 3) - adds product 123 to the shopping cart three times
Show the shopping cart
Use ds24cart_show(button) to open the shopping cart.
Example
<button onclick="return ds24cart_show(this);">Show shopping cart</button>