Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Commerce Customer Reviews

The Commerce Customer Reviews block lets signed-in shoppers find their approved product reviews in My Account. Use the full view for review history and an optional compact view for recent reviews on the account landing page.

This block uses the User Account drop-in’s ProductReviews container. It works without the Ratings and Reviews drop-in. To display public reviews or a submission form on product pages, use the separate Product Reviews block.

  • Enable reviews: Product reviews must be enabled for the store. The block reads the Account getStoreConfig result, productReviewsEnabled.
  • Check backend support: The Commerce endpoint must support customer.reviews(filter: { status: [APPROVED] }). The filter excludes pending and rejected reviews before pagination.
  • Use an account session: Guests are redirected to the localized customer login page. The block uses the existing Account initializer and customer session.

Create the dedicated page first so that the sidebar and optional summary have a destination.

  1. Create a customer page at /customer/reviews using your existing account page layout.

  2. Add a Commerce Customer Reviews block with these rows:

    Commerce Customer Reviews
    Page size10
    Minified viewfalse
    Reviews page/customer/reviews
  3. Set the page title to My Product Reviews in the page metadata.

  4. Add a My Product Reviews entry linked to /customer/reviews in /customer/sidebar-fragment. Follow the existing account sidebar structure.

  5. Merge the Account product review labels into the existing Account placeholders sheet. Keep the other Account labels.

  6. Preview the page while signed in as a shopper with approved reviews.

The full view shows review dates, product names, ratings, and review summaries. See Details opens a read-only review on the same page. Back to My Product Reviews returns to the list and restores focus to the selected review’s action. No separate details page is needed.

Add a second Commerce Customer Reviews block to the account landing page:

Commerce Customer Reviews
Minified viewtrue
Page size3
Reviews page/customer/reviews

The summary shows recent approved reviews with product names, ratings, summaries, and dates. View all reviews opens the full history page. The summary has no page controls or See Details actions. It is not inserted automatically: author this second block where you want it to appear.

RowDefaultDescription
Page size10 in full view; 3 in minified viewInitial number of reviews to load. Enter a whole number from 1 to 50. An invalid value prevents the block from loading.
Minified viewfalseSet to true for the recent reviews summary. Only the value true enables this mode.
Reviews page/customer/reviewsDestination for View all reviews in the summary. Root-relative paths use the storefront’s localized root. Absolute HTTP or HTTPS URLs are used unchanged.

These rows become the block keys page-size, minified-view, and reviews-page. They configure the existing block; no additional drop-in installation is required.

In full view, shoppers can choose a page size of 10, 20, 50, or the configured initial size. Changing the page size returns to page 1. Page navigation appears when there is more than one page. If a previously selected page becomes empty, Return to the first page provides a way back.

  • Reviews disabled: The block shows the translated unavailable message without loading review history. The account sidebar hides an authored entry whose link ends in /customer/reviews, with an optional trailing slash. Other sidebar entries remain visible.
  • Authored navigation: The block does not create the reviews page or insert its sidebar entry. If you choose a different page path, update the summary destination and sidebar link. Automatic sidebar hiding matches the default /customer/reviews path only.
  • Sign-out or account changes: The block updates the container’s authentication context, clears the previous shopper’s review data and selected details, and redirects signed-out shoppers to login.
  • Missing product: The review remains visible when its product is unavailable. Product names link to the product page only when the block can build a product URL.
  • Loading errors: The view shows an error with Try again, not a successful empty history. No pending or rejected reviews are used as a fallback.
  • Confirm that approved reviews appear and pending or rejected reviews do not.
  • Open a review, return to the list, and try the full view’s page controls.
  • Confirm that View all reviews opens the intended localized history page from the summary.
  • Test an account without approved reviews and a signed-out visit.
  • Disable product reviews and confirm that the view is unavailable and the default reviews sidebar entry is hidden.