Skip to content

STRF-14251 Make cart preview work with multi-lang#2627

Merged
bc-max merged 2 commits intomasterfrom
STRF-14251-Make-cart-preview-work-with-multilang
Mar 26, 2026
Merged

STRF-14251 Make cart preview work with multi-lang#2627
bc-max merged 2 commits intomasterfrom
STRF-14251-Make-cart-preview-work-with-multilang

Conversation

@bc-max
Copy link
Copy Markdown
Contributor

@bc-max bc-max commented Mar 26, 2026

What?

We need to properly render cart and checkout urls for cartPreview.

Requirements

  • CHANGELOG.md entry added (required for code changes only)

Tickets / Documentation

https://bigcommercecloud.atlassian.net/browse/STRF-14251

Screenshots (if appropriate)

image image image

Attach images or add image links here.

Example Image

@bc-max bc-max requested a review from Copilot March 26, 2026 09:17
@bc-max bc-max marked this pull request as ready for review March 26, 2026 09:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Cornerstone’s cart-related Stencil Utils calls to include a baseUrl, so cart preview / cart refresh content is rendered with the correct cart + checkout URLs in multi-language storefronts.

Changes:

  • Pass baseUrl into utils.api.cart.getContent(...) calls for cart preview, PDP add-to-cart preview, and cart page refresh.
  • Add a Draft changelog entry documenting the multi-language cart preview fix.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
assets/js/theme/global/cart-preview.js Adds baseUrl: secureBaseUrl to cart preview getContent call to ensure rendered links use the correct localized base URL.
assets/js/theme/common/product-details.js Adds baseUrl: this.context.secureBaseUrl when fetching cart preview content after add-to-cart.
assets/js/theme/cart.js Adds baseUrl: this.context.secureBaseUrl when refreshing cart page partials via getContent.
CHANGELOG.md Adds Draft entry for STRF-14251 describing the fix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CHANGELOG.md
@bc-max bc-max merged commit 6d789bd into master Mar 26, 2026
5 checks passed
@bc-max bc-max deleted the STRF-14251-Make-cart-preview-work-with-multilang branch March 26, 2026 17:20
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.

4 participants