Skip to content

Add availableForSale to variant - #808

Closed
powerwlsl wants to merge 1 commit into
vercel:mainfrom
powerwlsl:MERC-8928
Closed

Add availableForSale to variant#808
powerwlsl wants to merge 1 commit into
vercel:mainfrom
powerwlsl:MERC-8928

Conversation

@powerwlsl

Copy link
Copy Markdown

Add to cart button should be disabled when there's no stock for each variant.

 <Button
aria-label="Add to Cart"
type="button"
className={s.button}
onClick={addToCart}
loading={loading}
disabled={variant?.availableForSale === false}
>
{variant?.availableForSale === false
? 'Not Available'
: 'Add To Cart'}
</Button>

image
image
image

@vercel

vercelBot commented Aug 9, 2022

Copy link
Copy Markdown
Contributor

@powerwlsl is attempting to deploy a commit to the Vercel Solutions Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercelBot commented Aug 9, 2022

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for Git ↗︎

NameStatusPreviewUpdated
commerce-bigcommerce❌ Failed (Inspect)Aug 16, 2022 at 5:53AM (UTC)
commerce-commerce❌ Failed (Inspect)Aug 16, 2022 at 5:53AM (UTC)
commerce-commercejs❌ Failed (Inspect)Aug 16, 2022 at 5:53AM (UTC)
commerce-kibocommerce❌ Failed (Inspect)Aug 16, 2022 at 5:53AM (UTC)
commerce-local❌ Failed (Inspect)Aug 16, 2022 at 5:53AM (UTC)
commerce-ordercloud❌ Failed (Inspect)Aug 16, 2022 at 5:53AM (UTC)
commerce-pbt01❌ Failed (Inspect)Aug 16, 2022 at 5:53AM (UTC)
commerce-saleor❌ Failed (Inspect)Aug 16, 2022 at 5:53AM (UTC)
commerce-sfcc❌ Failed (Inspect)Aug 16, 2022 at 5:53AM (UTC)
commerce-shopify❌ Failed (Inspect)Aug 16, 2022 at 5:53AM (UTC)
commerce-site❌ Failed (Inspect)Aug 16, 2022 at 5:53AM (UTC)
commerce-spree❌ Failed (Inspect)Aug 16, 2022 at 5:53AM (UTC)
commerce-swell✅ Ready (Inspect)Visit PreviewAug 16, 2022 at 5:53AM (UTC)
commerce-vendure❌ Failed (Inspect)Aug 16, 2022 at 5:53AM (UTC)

@manovotny

Copy link
Copy Markdown
Contributor

We appreciate the time you took to make this PR. We have decided to take Next.js Commerce in a new direction, but I am happy to say that this feature will be present in the upcoming release. Please see this PR for more details: #966

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@powerwlsl@manovotny@leerob