bradsearch/magento-verkter-price-adapter

Verkter-specific bridge: maps BradSearch PriceCalculatorInterface to Magenmagic ProductPrices helper so indexed prices match the storefront productPrice GraphQL query.

Maintainers

Package info

github.com/Invertus/brad-magento2-verkter-price-adapter

Type:magento2-module

pkg:composer/bradsearch/magento-verkter-price-adapter

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-04-24 11:22 UTC

This package is not auto-updated.

Last update: 2026-04-25 10:21:02 UTC


README

Verkter-specific bridge between bradsearch/magento-extension and Magenmagic_ProductPrices.

Registers the Magento module Magenmagic_BradSearchPrice, which provides a single <preference> overriding BradSearch\SearchGraphQl\Api\PriceCalculatorInterface with an implementation that delegates to Magenmagic\ProductPrices\Helper\Price.

This guarantees that the calculated_price BradSearch indexes is the same value the storefront returns from the productPrice GraphQL query — including country scope, currency, special prices, and tax handling.

Why this exists as its own package

The bridge is client-specific (it depends on Verkter's Magenmagic_ProductPrices), but it is extracted into its own composer package so that when Verkter engineers refactor Magenmagic\ProductPrices\Helper\Price, the consumer shows up in vendor/ search and does not silently rot. The alternative — keeping the bridge inside app/code/Magenmagic/ — hides this coupling from IDE refactor tools.

Installation

Add the private composer registry to the consumer composer.json (already configured in Verkter) and require the package:

composer require bradsearch/magento-verkter-price-adapter
bin/magento setup:upgrade
bin/magento setup:di:compile

Development

composer install              # installs captainhook hooks automatically
composer phpcbf               # auto-fix Magento2 coding standard
composer phpcs                # Magento2 coding standard check
composer phpstan              # static analysis at level 6
composer psalm                # static analysis at error level 4
composer test                 # phpunit unit tests
composer check                # all of the above

Pre-commit hooks run phpcbf + phpcs + phpstan on staged PHP files. Pre-push runs psalm + full test suite.

Module dependency sequence

Magenmagic_BradSearchPrice sequences after:

  • BradSearch_SearchGraphQl — provides PriceCalculatorInterface and CalculatedPrice / PriceTuple / Money value objects.
  • Magenmagic_ProductPrices — provides the Price helper this bridge wraps.

Verification after install

  1. bin/magento module:status Magenmagic_BradSearchPriceenabled
  2. Run a BradSearch-routed products(search: "…") GraphQL query and compare the price_range.minimum_price.final_price against the storefront productPrice response for the same product + store view. They must match to the cent.