Skip to content

Comments

Changes to allow for Showing Customer Segment Pricing in Browse#474

Open
kibo-thomasphipps wants to merge 3 commits intodevelopfrom
customerSegmentPricing
Open

Changes to allow for Showing Customer Segment Pricing in Browse#474
kibo-thomasphipps wants to merge 3 commits intodevelopfrom
customerSegmentPricing

Conversation

@kibo-thomasphipps
Copy link
Contributor

@kibo-thomasphipps kibo-thomasphipps commented Apr 15, 2025

Display Customer Segment Pricing on Category Browse Pages

Overview

This PR introduces changes to the Kibo Storefront Theme to allow customer segment-based pricing to be displayed during product browsing. Previously, such pricing was only visible in the cart and checkout flows. This enhancement ensures a more consistent pricing experience for customers throughout the shopping journey.

Changes

  1. Theme Setting Addition
    // theme.json
    A new theme setting customerSegmentSpecificPricing has been added to enable or disable this feature:

    "customerSegmentSpecificPricing": true
  2. Enhanced Partial Caching Key
    Updated the partial cache key in category-interior.hypr to include customer segments, ensuring pricing is cached appropriately per customer segment:

    {% partial_cache model.categoryId pageContext.Sorting pageContext.Pagination pageContext.query.sortBy pageContext.user.segments %}
    
  3. Updated Include Products Call
    The include_products call now passes the customer's segments to support correct pricing retrieval:

    {% include_products "modules/product/faceted-products" 
      with includeFacets=themeSettings.showCategoryFacets 
      and pageWithUrl=true 
      and sortWithUrl=true 
      and pageSize=themeSettings.defaultPageSize 
      and customerSegments=pageContext.user.segments as_parameter %}
    

Result

With these updates:

  • Customers will now see accurate pricing reflective of their assigned segment during browse.
  • Caching is properly scoped per segment, avoiding pricing leakage or inconsistencies.

kibo-thomasphipps and others added 2 commits April 15, 2025 13:16
Fix for product model when quantity changes to update the price.
Update product collection page to pass customer segments.
Add customerSegments to collection members page.
Add customer segments to product page and pass to api call for configure
Update configure calls in models-product.js to support customer segments
@waynehearn waynehearn force-pushed the customerSegmentPricing branch from f114657 to 099a89a Compare May 13, 2025 15:09
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.

2 participants