Automatic combo sales

Is it possible to create an algorithm so that we create an automatic combo sale for customers as follows:- 

If x buy 1 pastry P + 1 product X  he pays specific product Z at special price instead of normal price? Like when we buy a meal from MCDo



Hello. At this time Loyverse doesn't have that feature, but it's planned to realization in the future.