---
title: 'Add to Cart Description'
url: 'https://info.srv.kowal.co/docs/magento/modules/kowal-addtocart-description'
markdown: 'https://info.srv.kowal.co/docs/magento/modules/kowal-addtocart-description.md'
lang: en
date: '2026-11-30'
description: 'Display a product attribute below the Add to Cart button. Choose the attribute and enter a different sales message for each product that needs one.'
taxonomy:
  category:
    - docs
    - Magento
    - Modules
  tag:
    - magento2
    - catalog
    - frontend
    - addtocart
---

# Add to Cart Description

Composer package **`kowal/module-addtocartdescription`** · repository version **1.0.12**

## Product page

[Add to Cart Description — kowal.co](https://kowal.co/magento-2-module-description-under-add-to-cart-button)

## Description

This Magento 2 module adds the ability to display a short message under the **“Add to Cart”** button on the product page. The value comes from a selected product attribute (by default `addtocart_description`).

The module adds the product attribute `addtocart_description` via a data patch and provides a configuration option where you can select another attribute to display. The attribute list in configuration is limited to the types `text`, `textarea`, and `select`. For `select` attributes, the option label is displayed; for text-based attributes, the raw field value is shown.

The output works on product pages for: **simple**, **configurable**, and **bundle** products. The block is placed around the **Add to Cart** section and can be enabled per store view.

## For whom

- Magento 2 stores that want to add a short message/promotion next to the purchase button.
- Implementation teams that need a simple field for a sales message on the product page.

## Features

- Adds the product attribute `addtocart_description` (data patch).
- Lets you choose any product attribute to display (`text`, `textarea`, `select`).
- Renders the message under the “Add to Cart” button.
- Supports simple, configurable, and bundle products.
- Ability to enable/disable the module per store view.
- Uses `addtocart_description` by default if no other attribute is selected.

## Installation

\* = in production, use the `--keep-generated` option

1. **Add the repository to Composer configuration:**```bash
    composer config repositories.module.addtocart.description vcs https://github.com/kowalco/addtocart-description
    ```
2. **Add an access token for private GitHub:**```bash
    composer config --global --auth github-oauth.github.com <YOUR_TOKEN>
    ```
3. **Install the module via Composer:**```bash
    composer require kowal/module-addtocartdescription
    ```
4. **Enable the module:**```bash
    php bin/magento module:enable Kowal_AddtocartDescription
    ```
5. **Apply database updates:**```bash
    php bin/magento setup:upgrade
    ```
6. **Flush cache:**```bash
    php bin/magento cache:flush
    ```

## Configuration

- Path: `Stores -> Configuration -> kowal -> Add to Cart Description -> Settings`
- `Enable module` (enables/disables the display)
- `Product Attribute to Display` (select the attribute to show)

## Requirements / notes

- Required base module: `kowal/base`.
- Depends on `Magento_Catalog`.
- The default `addtocart_description` attribute is created by a data patch during `setup:upgrade`.

### Deployment and operations

- Configuration changes are per store view (Store View scope). Make sure values are set at the correct level.
- After installing the module, the `addtocart_description` attribute appears in the product EAV. If the attribute is not visible in the product edit form, check the attribute set and the `General` group.
- The attribute is of type `select`. If you want to store free text, choose another attribute of type `text` or `textarea` in configuration.
- The module uses layouts for product pages: `catalog_product_view`, `catalog_product_view_type_configurable`, `catalog_product_view_type_bundle`.
- The value is rendered in `Kowal_AddtocartDescription::addtocart-description.phtml` and the HTML is escaped.
- After changing layouts or templates, run `bin/magento cache:flush`. For static changes in production, also run `bin/magento setup:static-content:deploy` according to your deployment policy.
- No additional indexes or cron jobs are required for the module.
- Admin configuration menu: `Stores -> Configuration -> kowal -> Add to Cart Description`. Access is controlled by ACL `Kowal_AddtocartDescription::config_kowal_addtocartdescription`.
- Default configuration values after installation: `Enable` = `1`, `attribute_code` = `addtocart_description` (from `etc/config.xml`).
- The module does not modify the database beyond adding the product EAV attribute; no new tables and no additional log tables.

### Deployment checklist

- Upload the module (Composer or ZIP) and make sure autoloading works.
- Run `bin/magento module:enable Kowal_AddtocartDescription`.
- Run `bin/magento setup:upgrade` (creates the `addtocart_description` attribute).
- Make sure the attribute is included in the correct attribute set and has values on products.
- Configure the attribute to display per store view.
- Run `bin/magento cache:flush`.
- If required in production: `bin/magento setup:static-content:deploy`.

### CI/CD and environments

- In your pipeline, include `setup:upgrade` and cache cleaning after deploying the module.
- No data migrations are required beyond the EAV attribute; rollback is simply disabling the module and optionally removing the attribute.
- Multistore environments: set configuration in the correct scope (Default/Website/Store View) according to the store policy.

### Rollback

- Disable the module: `bin/magento module:disable Kowal_AddtocartDescription`.
- Optionally remove the `addtocart_description` attribute (manually or via a patch revert in a controlled process).
- Flush cache after rollback.

### Compatibility

- Magento 2.x (module based on standard EAV and catalog layouts).
- PHP versions compatible with the Magento version used in the project.
- Requires the `Magento_Catalog` and `kowal/base` modules to be present.

## FAQ

Q: The description doesn’t show on the product — what should I check?
A: Check that the module is enabled, the attribute has a value on the product, the configuration is set for the correct store view, and the cache has been cleared.

Q: Can I use my own attribute?
A: Yes—select it in configuration. The list shows only attributes of type `text`, `textarea`, and `select`.

## Verify the installation

```sh
bin/magento module:status Kowal_AddtocartDescription
```

Set the selected attribute on a test product. Open the product in the same store view and check the text beneath the purchase button.

If the source is a select attribute, compare the displayed text with the option label for that store view.

## Components included in Add to Cart Description

 [ **Add to Cart Description Hyvä** Display a product-specific message near the purchase controls on a Hyvä product page. Editors maintain the message in the product attribute selected in the base module. ](https://info.srv.kowal.co/docs/magento/modules/kowal-addtocart-description/addtocart-description-hyva)

---

## Navigation

- Parent: [Magento 2 Extensions](https://info.srv.kowal.co/docs/magento/modules.md)
- Previous: [WFirma – Magento 2 integration](https://info.srv.kowal.co/docs/magento/modules/kowal-wfirma.md)
- Next: [Admin Payment](https://info.srv.kowal.co/docs/magento/modules/kowal-adminpayment.md)
- Children:
  - [Add to Cart Description Hyvä](https://info.srv.kowal.co/docs/magento/modules/kowal-addtocart-description/addtocart-description-hyva.md)
