I´m developing an open source plugin for Algolia and Shopware (https://github.com/synonymous1984/SwAlgolia).
My problem now is, that we have the following Scenario:
Product prices are calculated based on different parameters like combinations of customer ID, customer group, article group, manufacturer etc. So this means that (in theory) each customer can have his own, unique price for every product.
Especially the plugin structure of Shopware allows developers to decorate the default price calculation in any way they prefer - so the calculation can be differ in each installation in theory.
- Customer A belongs to group B and the discount for product C is -10% if the customer belongs to customer group B
- Customer D get´s a special price for product E (€ 5,00 instead of € 10,00)
- All products in product group F have base price - 15% as default price
As you can see there are many different parameters which affect the real price. The finest granularity is product ID + Customer ID = Price X.
As it´s impossible to get all prices pre-calculated to an Algolia index (or many indices) the way I plan to go is to only send product data to Algolia and do the price calculation as server-side Ajax request as soon as the search-result returns from Algolia.
I´m not really happy with this solution but I haven´t found another way to go at the moment.
Maybe someone of you have a better or another idea how to solve this problem??
Thanks for the email @Raymond - I´ve moved my question from Stackoverflow here (http://stackoverflow.com/questions/41298931/customer-specific-prices-with-algolia).
Thanks in advance, best, Synonymous