Answers.Body: <p>Worked it out!</p>
  <p>Putting this in a custom module should do the trick..., obviously changing the price modifier and option name to your needs.</p>
  <pre><code>        Event::on(
              LineItems::class,
              LineItems::EVENT_POPULATE_LINE_ITEM,
              function(LineItemEvent $event) {
                  // @var LineItem $lineItem
                  $lineItem = $event-&gt;lineItem;
                  // @var bool $isNew
                  $isNew = $event-&gt;isNew;
  
                  if (isset($lineItem-&gt;options['giftWrapped']) &amp;&amp; $lineItem-&gt;options['giftWrapped'] == 'yes') {
                      $lineItem-&gt;price += 20;
                  }
              }
          );
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-14T14:37:35.947Z
Answers.Text: Yeh that's the way I'd do it, too. Feel free to set this as the accepted answer if you'd like.
Answers.UserDisplayName: RitterKnight
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-03T19:55:11.637Z
Answers.Text: Hi @GlennJ; i tried your code, i need something similar. but in my cart it decreases the price with 20, but then makes a sale and reduces the price again with 20. So in the end the price stays the same. Did something change in between or do i have to add something special here? i use the template "giftWrapped" checkbox. thanks for your help!
Answers.UserDisplayName: Henrik
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-14T14:25:34.537Z
Answers.LastActivityDate: 2020-08-14T14:25:34.537Z
Answers.UserDisplayName: GlennJ
Body: <p>My client wishes to sell artwork online. They're all one-off pieces and once one is sold, it should not be available to purchase thereafter.</p>
  <p>However, the artwork needs to have an option to be framed which would increase the price.</p>
  <p>I can't see how this can be achieved with Variants as each variant has their own stock level.</p>
  
Tags: <craft3><plugin-craftcommerce3>
Title: Craft Commerce Product Options that increase price, but do NOT affect stock
ThreadText: # Craft Commerce Product Options that increase price, but do NOT affect stock
  
  (Asked by: username_0 on 2020-08-14)
  
  My client wishes to sell artwork online. They're all one-off pieces and once one is sold, it should not be available to purchase thereafter.
  
  However, the artwork needs to have an option to be framed which would increase the price.
  
  I can't see how this can be achieved with Variants as each variant has their own stock level.
  
  **Tags:** craft3, plugin-craftcommerce3
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-08-14. Score: 2 | Accepted answer
  
  Worked it out!
  
  Putting this in a custom module should do the trick..., obviously changing the price modifier and option name to your needs.
  
  ```
          Event::on(
              LineItems::class,
              LineItems::EVENT_POPULATE_LINE_ITEM,
              function(LineItemEvent $event) {
                  // @var LineItem $lineItem
                  $lineItem = $event->lineItem;
                  // @var bool $isNew
                  $isNew = $event->isNew;
  
                  if (isset($lineItem->options['giftWrapped']) && $lineItem->options['giftWrapped'] == 'yes') {
                      $lineItem->price += 20;
                  }
              }
          );
  
  ```
  
  > **Comments:**
  > **username_1**: Yeh that's the way I'd do it, too. Feel free to set this as the accepted answer if you'd like.  
  > **username_2**: Hi @username_0; i tried your code, i need something similar. but in my cart it decreases the price with 20, but then makes a sale and reduces the price again with 20. So in the end the price stays the same. Did something change in between or do i have to add something special here? i use the template "giftWrapped" checkbox. thanks for your help!  
  
  ---
  
  