Skip to content

fix(core): update gift certificate amount handler to include amount_display#2901

Merged
jordanarldt merged 1 commit intocanaryfrom
fix/gift-cert-purchase
Feb 25, 2026
Merged

fix(core): update gift certificate amount handler to include amount_display#2901
jordanarldt merged 1 commit intocanaryfrom
fix/gift-cert-purchase

Conversation

@jordanarldt
Copy link
Copy Markdown
Contributor

@jordanarldt jordanarldt commented Feb 25, 2026

What/Why?

The GiftCertificateCard preview component was not updating when selecting a predefined amount from the dropdown on the gift certificate purchase form.

The handleFormChange handler only checked for inputs with name === 'amount', but the select element for predefined gift certificate amounts uses the name amount_display. This meant selecting a new amount from the dropdown was silently ignored, and the card preview never reflected the selected value.

The fix adds amount_display to the name check so both the custom amount input and the predefined amount select trigger the card preview update.

Rollout/Rollback

No special rollout needed. Simple code change with no migrations or feature flags. Rollback is a standard revert.

Testing

  1. Navigate to the gift certificate purchase page
  2. Select a predefined amount from the dropdown — verify the GiftCertificateCard preview updates to show the formatted amount
  3. Enter a custom amount — verify the preview still updates correctly
  4. Clear the amount — verify the preview resets

Before fix

image

After fix

image

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
catalyst Ready Ready Preview, Comment Feb 25, 2026 10:22pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 25, 2026

🦋 Changeset detected

Latest commit: 495e827

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jordanarldt jordanarldt changed the base branch from main to canary February 25, 2026 22:16
@jordanarldt jordanarldt marked this pull request as ready for review February 25, 2026 22:16
@jordanarldt jordanarldt requested a review from a team February 25, 2026 22:16
@jordanarldt jordanarldt force-pushed the fix/gift-cert-purchase branch from 1a26671 to 32b1ede Compare February 25, 2026 22:16
@jordanarldt jordanarldt force-pushed the fix/gift-cert-purchase branch from 32b1ede to c4d8f75 Compare February 25, 2026 22:17
@github-actions
Copy link
Copy Markdown
Contributor

Bundle Size Report

Comparing against baseline from 8cb17e0 (2026-02-25).

No bundle size changes detected.

…amount_display

The form change handler only checked for inputs named 'amount', but the
select element for predefined gift certificate amounts uses the name
'amount_display'. This caused the GiftCertificateCard preview to not
update when selecting a new amount from the dropdown.
@jordanarldt jordanarldt force-pushed the fix/gift-cert-purchase branch from c4d8f75 to 495e827 Compare February 25, 2026 22:19
@jordanarldt jordanarldt added this pull request to the merge queue Feb 25, 2026
Merged via the queue into canary with commit 8b5fee6 Feb 25, 2026
15 of 17 checks passed
@jordanarldt jordanarldt deleted the fix/gift-cert-purchase branch February 25, 2026 22:50
Sign up for free to 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