Answers.Body: <p>Indeed, the way to go is setting up a module or plugin for this sort of thing. While I did get that working in practice, I still have questions regarding how one can loop through and compare using the Craft CMS 3 Commerce 2 APIs to actually apply the discount based on custom fields on the variants. That will be a separate question entirely.</p>
  
  <p>If you stumble upon this issue, the starting point I used was this;
  <a href="https://github.com/oof-bar/commerce-example-adjuster" rel="nofollow noreferrer">https://github.com/oof-bar/commerce-example-adjuster</a></p>
  
  <p><a href="https://craftcms.stackexchange.com/questions/29732/looping-over-categories-product-variants-and-subsequently-applying-adjusters">Here's a link to the new question</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-06T00:27:01.490Z
Answers.LastActivityDate: 2019-03-06T04:08:27.520Z
Answers.LastEditDate: 2019-03-06T04:08:27.520Z
Answers.UserDisplayName: Anders
Body: <p>Is there a way to set a discount in Commerce 2 that applies when, for example, three various products are in the cart? </p>
  
  <p>Use case;
  Say you have a blue shirt, a black pant and a red cardigan, in the cart, and you wish to treat those as a kit. When all three are in the cart (either specific color variant, or simply a product), subtract $20 (or a percentage) from the total.</p>
  
  <p>Edit;
  It would seem that adjusters is the way to go. Can someone shed some light on where those go, and how one would go about it when checking for multiple products against each other? Is the best way to create a module? Is there no admin UI whatsoever for adjustments? Is there a way to build adjustments with twig? Sorry, that's a lot of questions in one topic.</p>
  
Tags: <craft3><plugin-craftcommerce2>
Title: Product Combination Discount in Commerce 2?
ThreadText: # Product Combination Discount in Commerce 2?
  
  (Asked by: username_0 on 2019-03-01)
  
  Is there a way to set a discount in Commerce 2 that applies when, for example, three various products are in the cart?
  
  Use case;
  Say you have a blue shirt, a black pant and a red cardigan, in the cart, and you wish to treat those as a kit. When all three are in the cart (either specific color variant, or simply a product), subtract $20 (or a percentage) from the total.
  
  Edit;
  It would seem that adjusters is the way to go. Can someone shed some light on where those go, and how one would go about it when checking for multiple products against each other? Is the best way to create a module? Is there no admin UI whatsoever for adjustments? Is there a way to build adjustments with twig? Sorry, that's a lot of questions in one topic.
  
  **Tags:** craft3, plugin-craftcommerce2
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-03-06. Score: 1
  
  Indeed, the way to go is setting up a module or plugin for this sort of thing. While I did get that working in practice, I still have questions regarding how one can loop through and compare using the Craft CMS 3 Commerce 2 APIs to actually apply the discount based on custom fields on the variants. That will be a separate question entirely.
  
  If you stumble upon this issue, the starting point I used was this;
  <https://github.com/oof-bar/commerce-example-adjuster>
  
  [Here's a link to the new question](https://craftcms.stackexchange.com/questions/29732/looping-over-categories-product-variants-and-subsequently-applying-adjusters)
  
  
  ---
  
  