Not Displaying Add-to-Cart link/button added to View Mode

Created on 31 October 2024, 5 months ago

Problem/Motivation

When add-to-cart link ot button is added to the View Mode, it is not displayed on the view mode page.

Steps to reproduce

On a Drupal Commerce 3 installation, do the following:

  1. Create an Entity Comparison entity (i.e. structure > entity_comparison)
  2. Select the bundle as either Product or Product Variation and submit
  3. Submitting creates a couple of blocks and a corresponding view_mode is added to the manage_display tabs of the Product or Product variation types
  4. Add and enable the add-to-cart link or commerce variation add-to-cart form contrib modules. This adds dsiabled add-to-cart link or form elements to the view_mode created in bullet three.
  5. Enable (i.e. drag to the field list) the add-to-cart link or form and save the view_mode
  6. On a Views list of products or variations, add the respective "Add to comparison list" link and save the view.
  7. Visit views page and add items to the comparison list
  8. Visit the comparison-list page. The products or variations are added without the Add-to-Cart link or form added in bullet 5 above.

Proposed resolution

All enabled fields listed on the created View Mode should be displayed as part of the items on the Comparison List.

🐛 Bug report
Status

Active

Version

4.0

Component

User interface

Created by

🇳🇬Nigeria ojchris

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024