QuestionQ8

Design and implement optimal solutions for Adobe Commerce to meet business needs

A merchant uses a unified website that supports native Adobe Commerce B2B and B2C through one store view.

The merchant wants B2B account features, such as negotiable quotes and credit limits, displayed in the site header on every page for logged-in users who belong to a B2B company account.

Each B2B company has its own shared catalog and customer group, while many customer groups for non-B2B customers change. The merchant requires that this association not be tied to customer groups.

Which two solutions should the Architect recommend for consideration, accounting for public data and caching?

Choose two
  • A Create a Virtual Type that switches the theme when a user is part of a B2B company so the output can be modified accordingly in the alternate theme.
  • B Create a new HTTP Context variable to allow for separate public content to be cached for users in B2B companies where the output can be modified accordingly.
  • C Set whether the current user is part of a B2B company in the customer session and use that data directly to modify the output accordingly.
  • D Create a new custom condition for customer segments that allow for choosing whether a user is part of a B2B company and then use this segment to modify the output accordingly.
  • E Check if the current user is part of a B2B company within a block class and modify the output accordingly.
Explanation

A custom HTTP context variable lets Adobe Commerce maintain distinct full-page-cache variants for B2B-company users and other users when the URL is the same. The header block can use company membership to render the applicable B2B account features. This preserves cacheability while preventing B2B-specific header output from being shared with non-B2B users. Adobe Commerce specifically recommends declaring a custom context variable when different public content must be shown for the same URL.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!