Creating a Custom PrestaShop Module for B2B Pricing

How I built a custom module to handle complex B2B pricing tiers with customer group discounts.

A client running a wholesale fishing tackle business needed tiered pricing for their B2B customers. Here is how I approached it.

Requirements

Different price breaks based on customer group, quantity discounts, and the ability for sales staff to override prices on specific orders.

The Approach

I created a custom PrestaShop module that hooks into the cart calculation process. Prices are stored in a separate table linked to customer groups.

Key Code

The module uses the actionProductPriceCalculation hook to apply the correct pricing tier before the cart totals are calculated.

Lessons Learned

PrestaShop’s hook system is powerful but documentation can be sparse. Always test with various cart configurations.

Have a similar project?

Let's discuss how I can help.

Get in Touch

Leave a Comment

Your email address will not be published. Required fields are marked *