Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Commerce Add To Cart Link

Security covered Under active development 2,469 sites

Part of the Commerce ecosystem · 487 projects

This module provides a simple "add to cart" link for products, ideal for use on product listing pages or blocks. It offers a streamlined way to add items to the cart without a full form and can also be used to add items to a wishlist.

The Commerce Add To Cart Link module extends Commerce product displays with an "add to cart" field as link instead of having an add to cart form.

Primary use case is to use this on listings such as overview pages or blocks displaying related products, bestsellers, etc. Currently, building product listing blocks is often accompanied with some headache due to existing Drupal Core limitations described below.

The links are secured with a CSRF token, so that users can't be tricked into clicking a link and adding products to cart they don't want. In order to have these tokens working accordingly, a session for anonymous user will be enforced, if there isn't one existing already.

The "Commerce Add To Wishlist Link" sub module offers the same functionality for adding items to wishlists (you will also need Commerce Wishlist module for that).

The link itself is rendered via Twig template to enable full customization possibilities for themers, enabling to change texts, add additional markup, etc.

Please see the README.md file for a more detailled explanation and configuration options.

The module is only available for Drupal 8.x and Commerce 2.x and won't be backported.

Credits

Commerce Product Review module was originally developed and is currently
maintained by Mag. Andreas Mayr.

All initial development was sponsored by agoraDesign KG.

Drupal 10–11

Ask your assistant about Commerce Add To Cart Link

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Aug 2023
Latest release
5 months ago
Releases (12 mo)
2 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.1.2 Stable 10–11 May 6, 2026
2.1.1 Stable 10–11 Nov 11, 2025
2.1.0 Stable 10–11 Feb 24, 2025
2.0.6 Stable 9–10 Aug 8, 2023