Developer forum

Forum » Ecommerce - Standard features » What is the best approach for custom Discount logic?

What is the best approach for custom Discount logic?

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Guys,

I have a project where my customer asked us to recreate some discount logic they currently have on their Magento webshop.

The logic is not supported by the Discount providers we currently have and I am aware it's gonna require custom development. I am just not sure what is the best and future proof path for developing these discounts.

To put it in context, here are the scenarios:

1. x% discount for the cheapest second product. Should support a list of products included in this discount

2. x% discount for the cheapest product from the list. Should support a list of products included in this discount

3. Buy 2 get 1 free. Should support a list of products. The free product can be from the list or indicated specifically

4. 2 free products when buying a specific product

 

I know the old SalesDiscount logic is phased out and I am supposed to use the new one with a Discount Extender but I am not sure if this discount extender would support the above scenarios. If it does not support them, I am wondering what alternatives do I have.

Thank you,


Adrian

 

 


Replies

 
Nicolai Pedersen
Reply

I am sure you can do that with discount extenders. The extenders will return true or false for orders or products and inside that you can do all kinds of checks to make the decission.

I would love to see the Magento docs explaining these discount types - then I might better be able to give you pointers.

Finally - I would love to see these discounts explained to customers wink

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai.

Thank you for the suggestion.

I believe the discounts might be part of some Magento Plugins. I don't think they are part of the standard setup.
As for communicating them to the customer, I agree that they seem pretty hard to grasp. It took me a while to understand what they are asking me for and even now I am not sure if I got it right.

Thank you for confirming the extenders approach. Will try it out and we'll see how far we get.

Thank you,
Adrian

 
Nicolai Pedersen
Reply

Well, that plugin must also have some documentation. Ask the customer so we can have a look...

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Ok. I will.

Thank you,
Adrian

 

You must be logged in to post in the forum