Answers.Body: <p>1oz = $1 ∴ 10oz = $10</p>
  
  <p>Sell in units of weight as the quantity of the item.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-30T09:44:25.040Z
Answers.Text: Hi Steve, thanks. That seems to be a way to go about it, i'm going to check it out.
Answers.UserDisplayName: Bob Donderwinkel
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-24T16:07:54.460Z
Answers.LastActivityDate: 2016-05-24T16:07:54.460Z
Answers.UserDisplayName: Steve Adams
Answers.Body: <p><strong>UPDATE</strong>: A new <a href="https://craftcommerce.com/docs/events-reference#commerce_lineitems.onpopulatelineitem" rel="nofollow">onPopulateLineItem event</a> was added to Craft Commerce to enable this exact use case of modifying an items price when added to a users basket. You could use it to get the items weight and multiply it by a value.</p>
  
  <hr>
  
  <p>I'm not sure what kind of product model you have to want to do this but a possible solution you might want to look at is charging shipping rates based on a products weight. </p>
  
  <p>You can set up a Shipping Method with a rule that uses the weight of an item multiplied by a <a href="https://craftcommerce.com/docs/shipping-methods#getweightrate" rel="nofollow">Weight Rate</a>. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-30T09:40:24.020Z
Answers.Text: Hi Luke, thanks. I checked out the getWeightRate(),am i right that this is only available through a cart and not through a product model (or as individual 'shipping' model). I need to be able to use it in a product page to show the buyer a eventual price before actually ordering it..
Answers.UserDisplayName: Bob Donderwinkel
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-13T16:06:19.720Z
Answers.Text: Updated original answer to include information about a new event that could help you.
Answers.UserDisplayName: Luke Pearce
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-24T16:17:04.940Z
Answers.LastActivityDate: 2016-06-13T16:05:07.417Z
Answers.LastEditDate: 2016-06-13T16:05:07.417Z
Answers.UserDisplayName: Luke Pearce
Body: <p>I'm trying out the Craft Commerce plugin, and i'd like be able to let users order products with a custom price based on a choosen weight.</p>
  
  <p>The price is now fixed to what you choose in the control panel, and there seems to be no easy way around that, but perhaps i'm wrong.</p>
  
  <p>Is this possible? It's pretty crucial feature i need, so any help is appreciated :)</p>
  
  <p>Cheers, Bob</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-24T22:55:23.380Z
Comments.Text: Can you flesh the question out a little more Bob - is the price a fixed cost per weight unit (in which case Steve's solution below should work well)?  Or is it more complex than that?  A simple plugin could do more complex thing by listening to https://craftcommerce.com/docs/events-reference#commerce_lineitems.oncreatelineitem  for example..
Comments.UserDisplayName: Jeremy Daalder
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-30T09:37:08.793Z
Comments.Text: Hi Jeremy, thanks. The price is a fixed cost per weight, but as far as i can check that info, getWeightRate(), is only available in a cart and not through a product model? But perhaps i'm wrong there.
Comments.UserDisplayName: Bob Donderwinkel
Tags: <ecommerce>
Title: Craft Commerce, variable product prices based on weight. Is this possible?
ThreadText: # Craft Commerce, variable product prices based on weight. Is this possible?
  
  (Asked by: username_0 on 2016-05-24)
  
  I'm trying out the Craft Commerce plugin, and i'd like be able to let users order products with a custom price based on a choosen weight.
  
  The price is now fixed to what you choose in the control panel, and there seems to be no easy way around that, but perhaps i'm wrong.
  
  Is this possible? It's pretty crucial feature i need, so any help is appreciated :)
  
  Cheers, Bob
  
  **Tags:** ecommerce
  
  > **Comments:**
  > **username_1**: Can you flesh the question out a little more Bob - is the price a fixed cost per weight unit (in which case username_2's solution below should work well)?  Or is it more complex than that?  A simple plugin could do more complex thing by listening to https://craftcommerce.com/docs/events-reference#commerce_lineitems.oncreatelineitem  for example..  
  > **username_0**: Hi username_1, thanks. The price is a fixed cost per weight, but as far as i can check that info, getWeightRate(), is only available in a cart and not through a product model? But perhaps i'm wrong there.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2016-05-24. Score: 2
  
  1oz = $1 ∴ 10oz = $10
  
  Sell in units of weight as the quantity of the item.
  
  > **Comments:**
  > **username_0**: Hi username_2, thanks. That seems to be a way to go about it, i'm going to check it out.  
  
  ---
  
  ### Answer by username_3 on 2016-05-24. Score: 1
  
  **UPDATE**: A new [onPopulateLineItem event](https://craftcommerce.com/docs/events-reference#commerce_lineitems.onpopulatelineitem) was added to Craft Commerce to enable this exact use case of modifying an items price when added to a users basket. You could use it to get the items weight and multiply it by a value.
  
  ---
  
  I'm not sure what kind of product model you have to want to do this but a possible solution you might want to look at is charging shipping rates based on a products weight.
  
  You can set up a Shipping Method with a rule that uses the weight of an item multiplied by a [Weight Rate](https://craftcommerce.com/docs/shipping-methods#getweightrate).
  
  > **Comments:**
  > **username_0**: Hi username_3, thanks. I checked out the getWeightRate(),am i right that this is only available through a cart and not through a product model (or as individual 'shipping' model). I need to be able to use it in a product page to show the buyer a eventual price before actually ordering it..  
  > **username_3**: Updated original answer to include information about a new event that could help you.  
  
  ---
  
  