Composable UI is an open-source React storefront for Composable Commerce by Orium. The accelerator lets developers easily create dynamic storefronts with an open source Next.js framework, and leverage the power of React UI component libraries, for modern composable commerce websites.
To enhance the capabilities of the Composable UI storefront through Voucherify integration, a separate package with essential functions required for handling discounts was added. The new dependency follows a standard checkout integration approach. With each update to the shopping cart, the Voucherify functions perform validation (checking eligibility and calculating discounts) and qualification (requesting a list of applicable promotions) through the Voucherify REST API. The information gathered from these processes is then added to the cart data.