commerce_add_to_cart_link
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.