Pricing Engine Module for OkayCMS
About the project: Development of a custom automated pricing module Okay\Modules\PimTeam\PriceHandler for the OkayCMS platform. The problem was the inability to flexibly manage prices for thousands of products from dozens of suppliers.
How the module functional works:
Rule System: The administrator creates cascading markup rules based on the brand, category, or specific supplier.
Recount Engine: The core of the module is the RecountPrice.php class. The algorithm collects all enabled rules, obtains the base product prices, applies mathematical sub-rules, and forms the final retail price.
Integration with Import Module: PriceHandler works perfectly in symbiosis with the PimTeam Import module. First, the import module loads "raw" purchase prices from suppliers. After the import is completed, a trigger runs runFullRecount(). As soon as a supplier's price list is updated, the storefront immediately receives mathematically verified retail prices.
Stack: PHP (OkayCMS), MySQL, CRON. #okaycms #pricing #module #automation
How the module functional works:
Rule System: The administrator creates cascading markup rules based on the brand, category, or specific supplier.
Recount Engine: The core of the module is the RecountPrice.php class. The algorithm collects all enabled rules, obtains the base product prices, applies mathematical sub-rules, and forms the final retail price.
Integration with Import Module: PriceHandler works perfectly in symbiosis with the PimTeam Import module. First, the import module loads "raw" purchase prices from suppliers. After the import is completed, a trigger runs runFullRecount(). As soon as a supplier's price list is updated, the storefront immediately receives mathematically verified retail prices.
Stack: PHP (OkayCMS), MySQL, CRON. #okaycms #pricing #module #automation