StreamCart
Integration Guide

Drupal Integration

Install the StreamCart Drupal module via Composer and load shoppable videos on any Drupal site without modifying your theme.

Composer Modulehook_page_attachmentsDrupal 9/10

Requirements

  • Drupal 9.5 or Drupal 10
  • PHP 8.1 or later
  • Composer 2.x
  • A StreamCart account (free trial available)

Installation Guide

Connect StreamCart to Drupal

1

Install the StreamCart module via Composer

In your Drupal project root, run the Composer command to download and register the StreamCart module.

composer require drupal/streamcart
2

Enable the module

Go to Admin → Extend → find StreamCart in the module list and check the box. Click Install.

3

Configure the module

Go to Admin → Configuration → StreamCart. Enter your Project ID (from StreamCart dashboard → Settings → Project) and save configuration.

4

Script loaded via hook_page_attachments()

The module implements hook_page_attachments() to attach the StreamCart embed script as a JavaScript library on every page. No theme changes are needed.

5

Add products and create widgets

Add your products manually in the StreamCart dashboard under Products → Add Product, then create widgets and publish.

Quick Reference

Commands

composer
composer require drupal/streamcart
drush
# Enable module via Drush
drush en streamcart -y
drush cache-rebuild

Manual Installation

Edit html.html.twig directly

If you prefer not to use the module, add the embed script directly to your theme's html.html.twig template before the closing </head>.

html.html.twig
{# Add to html.html.twig in your theme, before </head> #}
<script
  src="https://cdn.streamcart.it/embed.js"
  data-project-id="YOUR_PROJECT_ID"
  async>
</script>

Troubleshooting

Common issues and fixes

Module does not appear in the Extend list

Run composer require drupal/streamcart again to ensure it downloaded successfully. Then clear the Drupal cache with drush cache-rebuild or via Admin → Performance → Clear all caches.

Script loads in development but not in production

Ensure Drupal's aggregation settings are not stripping the script. Go to Admin → Performance and verify that JavaScript aggregation is not blocking external URLs.

Config form at Admin → Configuration → StreamCart is missing

Check that the module is fully enabled and that your user has the administer streamcart permission. Go to Admin → People → Permissions and grant it if missing.

Need help?

Our team can assist with Drupal module installation, cache configuration, and permissions setup.

Contact Support →

Ready to turn your videos
into revenue?

Start converting more with video commerce

Start Your Free Trial

7-day free trial · No credit card · Cancel anytime