Page 1 of 1

BasketLimits - special limits (modulo)

Posted: 19 Aug 2016, 20:32
by andreas.allacher
Hi,

I have special limits to my basket that I can only order in increments of 6 (however, not per product but over all products).
From what I can see the default BasketLimits is not able to solve this.
However, am I correct that I only have to create a own Plugin like BasketLimits - probably easiest by copying BasketLimits - and modify it accordingly and then configure it in the backend according to my settings?

In that regard, my delivery costs also depend upon, how many items have been ordered, I guess there is a similar plugin I can create or use?
I guess it would be one similar to the "Free shipping above threshold" plugin?

Re: BasketLimits - special limits (modulo)

Posted: 20 Aug 2016, 15:34
by aimeos
Yes, basket plugins allow you to enforce every limitation you can implement or change the basket content to whatever you need.

You can extend the "Costs" service decorator and add the price per item as configuration:
https://github.com/aimeos/aimeos-core/b ... /Costs.php
If you are able to open a pull request for this change, we will happily merge it into the core :-)