Show AVDEB products on your Backdrop CMS site (a creator's shop, a category, a search or a single product) with your affiliate referral code on every link.
- In content: type
{avdeb-products https://avdeb.com/category/stickers/ layout="carousel"}in any body field. The AVDEB product tags filter is turned on in Filtered HTML and Full HTML when you enable the module. - As a block: add AVDEB Products to any layout region under Structure → Layouts.
- Four layouts: grid, carousel (scroll-snap with keyboard and arrow buttons), list ("shop the post") and spotlight. Single products render as a horizontal card, a hero or a compact card, with your own badge and note.
- Fits your theme: container queries let embeds adapt to the column they sit in. Choose inherit, light, dark or system theme, plus card style, accent colour, radius and image shape. Styles use
:where()(zero specificity), so your theme's CSS always wins, and--avdeb-*custom properties restyle everything. - Fast and resilient: product data is fetched on the server and cached (
cachebin,avdeb:prefix). If AVDEB can't be reached, the last good copy is served for a week. - Honest links: referral links get
rel="sponsored", and an optional affiliate disclosure appears under embeds that carry a code. - Private by default: no third-party scripts, cookies, iframes or tracking. The only JavaScript is a small behavior for the carousel arrows. The secret key stays on the server.
- Backdrop CMS 1.x
- PHP 8.1 or newer (
intlgives localised prices; without it prices use a simple format)
- Install this module using the official Backdrop CMS instructions: Functionality → Install new modules, search for AVDEB Products, or upload the release zip.
- Enable AVDEB Products under Functionality.
Configuration → Content authoring → AVDEB Products (/admin/config/content/avdeb, permission Administer AVDEB Products):
- Referral code: added as
?ref=to every AVDEB link. - Secret key (optional,
avdeb_sk_…): your code is added automatically and embeds can show up to 48 products (12 without a key). The key is never shown again after saving. - Display defaults: layout, columns, card style, colour theme, accent colour, corner radius, image shape, button text, prices, designer names, badges, new tab.
- Affiliate disclosure and caching (refresh interval, Refresh products now).
The status line at the top shows whether links are credited to you ("Connected as …", the code in use, request stats).
Free to join: 5% commission, 30-day cookie, monthly PayPal payouts in USD ($50 minimum), open worldwide. Apply at avdeb.com/affiliate/apply. After approval, copy your referral code (or create a secret key) in the partner dashboard and paste it on the settings page.
{avdeb-products https://avdeb.com/creators/cleo/ layout="carousel" limit="8" heading="From my shop"}
{avdeb-products https://avdeb.com/category/stickers/ layout="list" limit="3"}
{avdeb-products cat stickers columns="4"}
{avdeb-product https://avdeb.com/store/cat-sticker/ variant="hero" badge="Editor's pick" note="I use it every day."}
{avdeb-button href="/creators/cleo/" label="Visit my shop" variant="outline" align="center"}
The first value is a creator, category or product link (detected automatically) or search words. Options:
layout (grid, carousel, list, spotlight), limit, columns, heading, intro, card-style (elevated, outline, minimal),
theme (site, light, dark, auto), accent, radius, ratio (square, portrait, landscape), button-text, hide-price, hide-creator, view-all,
heading-level. For a single product: variant (horizontal, hero, card), badge, note.
A tag alone in a paragraph replaces the whole paragraph. Write {{avdeb-products}} to show a tag as text. To use tags in another text format, enable AVDEB product tags in that format (Configuration → Content authoring → Text editors and formats).
The filter renders embeds on every view (product data itself is cached), so text formats that use it are not stored in the filter cache.
Structure → Layouts → (layout) → Add block → AVDEB Products: link or search, layout, number of products, columns, heading, card style and theme. Click Save layout afterwards.
Every rule is :where()-wrapped, so theme CSS wins. Set tokens in your theme:
.avdeb {
--avdeb-accent: #7c3aed;
--avdeb-radius: 4px;
--avdeb-card-bg: #fff;
--avdeb-font-title: Georgia, serif;
}Tokens: --avdeb-accent, --avdeb-accent-contrast, --avdeb-surface, --avdeb-card-bg, --avdeb-card-pad, --avdeb-border, --avdeb-muted,
--avdeb-badge-bg, --avdeb-badge-text, --avdeb-shadow, --avdeb-shadow-hover, --avdeb-radius, --avdeb-ratio, --avdeb-gap, --avdeb-pad,
--avdeb-font-title, --avdeb-heading-size, --avdeb-title-size, --avdeb-price-size, --avdeb-btn-bg, --avdeb-btn-color, --avdeb-btn-shadow.
- Embeds call
https://api.avdeb.com/v1/catalog/productsfrom the server (backdrop_http_request()). With a secret key, requests sendAuthorization: Bearer avdeb_sk_…and the API returns links that already carry your code; without one,?ref=is added to every link. - Responses are cached per query. A failed request serves the last good result (up to a week old) and retries after 15 minutes; at most 30 API calls a minute are made. Saving settings and Refresh products now clear the page cache.
- All product data is validated before rendering: only
https://avdeb.comlinks andhttps://images get through, and every value is escaped.
php tests/run.php # unit tests for the catalog client, options and renderer (no Backdrop needed)
tests/dev-site.sh # throw-away Backdrop site in Docker (MariaDB) with the module enabled → http://localhost:8092Bugs and feature requests: https://github.com/Avdebcom/backdrop-avdeb/issues
This project is GPL v2 software. See the LICENSE.txt file in this directory for complete text.
