Developer forum

Forum » Ecommerce - Standard features » Limit product discount to max nr of products

Limit product discount to max nr of products

Aki Ruuskanen
Aki Ruuskanen
Reply

Hi,

I have a customer who wants to create a product discount where a use of a vouchercode gives the visitor free products in a given product group once. And that works fine. But they need to limit that discount to 5 products. 

I cannot see that this is possible or am I missing something. Its possible to limit the discount by amount but not by nr of products.  

(Its aDW9 solution.) 

Regard / Aki


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Aki,

 

Unfortunately (in DW9 at least) you are limited to only apply the discount once or as many times as possible

 

You'd have to develop a Discount Extender to try and apply such logic. There are some examples in the documentation

 

Best Regards,

Nuno Aguiar

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Aki

No, we do not have that feature. If you set the discount to 100% for products in that group, you can limit the amount given - e.g. 5x the average product price. But that is not very precise unless all the products costs the same.

You can either make a customization in the templates - where the add to cart button is and/or in the cart and checkout templates.

You might be able to create a DiscountExtenderBase addin that is able to return false on DiscountValidForProduct when you have 5 in the cart... But I am not sure if that will hit those products in cart as well. I think it will.

BR Nicolai

 
Aki Ruuskanen
Aki Ruuskanen
Reply

OK, thanks Nuno and Nicolai for your inputs. I'll take a look at it. 

Regards / Aki

 

You must be logged in to post in the forum