Skip to main content
All Case Studies
Magento 1 B2B Tax Logic Performance Caching

Configurator Price Bug + Performance: B2B Tax Logic

Challenge

B2B customers in EU customer groups were seeing gross prices (including 19% VAT) in the product configurator instead of correct net prices. The same customer groups displayed correct net prices on standard product pages, making this a configurator-specific bug in the price mapping layer.

What Was Built

The configurator's price mapping model was resolving prices against the wrong customer group context, bypassing Magento's standard tax exclusion logic for B2B/EU groups. The mapping was corrected to pass the correct customer group through the price calculation chain. Performance bonus: during the investigation, the price mapping was found to be querying the database once per configurator instance rendered per page. Three fixes applied: request-scoped model instance cache (one DB query per page load), shared resource singleton to prevent repeated model instantiation, and Magento block cache integration for the mapping result keyed by product ID and group parameters.

Outcome

Correct net pricing for all B2B EU customer groups in the configurator. Measurable page speed improvement as a side effect of the caching work.

"I've run my own tests and can confirm the bug is fixed - and thank you for the performance improvement too. I'm documenting the Core Web Vitals improvement now."

Client

Have a similar challenge?

Get in touch - no sales pitch, just a straightforward conversation.

Contact me