Disable add to cart link when variation is unpublished

Created on 6 October 2024, 6 months ago

Problem/Motivation

Hi,

At the moment, the add to cart link is displayed when product variations are un-published when its added on the "manage display" tab (there is a general Commerce bug with views, where the filter on published/unpublished doesn't work so there is no work-around available by using a viewsfield in the manage display tab).

This leads to an "access denied" page when the user clicks on it, and it also prevents implementing "out of stock" scenarios for site builders.

It would be great if the link either hides, or allows for a custom text ("out of stock") in these situations.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇹🇭Thailand AlfTheCat

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

Comments & Activities

Production build 0.71.5 2024