the easy way is just to use a seperate product id for the package, but then the customer would need to specifically add the package to get the price. they couldnt select the products seperately and get the discount. i doubt thats what you want.
ive never done it, but ive got a project where i may need to do it but havent put much thought into it yet. but i would think
just have a table of avaiable packages and what products they involve w/ the package price
check each product in the users shopping cart to see if its part of a package, if you find any matches, see if the required products exist to complete the package.
but youll need to be carefull:
dont let 1 qty of a single product satisfy more than 1 package.
but if they have say 2 of the same product, allow each of them to possibly satisy a specific package.
if the possibility exists that the items in the shopping cart could be used to complete packages in different ways, you would prob want to ensure they get the best deal or youll upset/frustrate customers. maybe calculate savings when trying to decide which way to package price things.
me thinks it can get pretty complicated
🆒