Hi,
I'm trying to build an online store for a delicatessen. Some of the products (prepackaged and canned foods) are fixed weight. Therefore using quantity field is okey for them.
But other items (cheeses and meat products) are priced by the weight (per 100g). So how can I add a "Weight" field for some of the product types in a way that would also calculate the price? For example if the customer wishes to purchase 400g of ham?

Thanks

Comments

rszrama’s picture

Status: Active » Fixed

Using the Physical Fields module you can add a weight field to your weighted product line item and expose it to the Add to Cart form. You'll need to use a different product line item type / product display node type for the weight based products. See http://drupal.org/project/commerce_custom_product.

drupalina’s picture

Thanks rszrama, I'll give Physical Fields a try. But your reply wasn't clear: should I use one of the two? or should I use a combination of Physical Fields and "Commerce Custom Product" modules?

Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

stijnstroobants’s picture

I have a similar question.
I have one product type 'commerce_product'.
On that product type I would like to add a dropdown field with values 'piece' and 'kilogram'.
Depending on that extra field the the price will be calculated.
If i select kilogram, the client will have to fill in the quantity-field in grams.

stijnstroobants’s picture

I just decided to let the visitors type in the weight (kg) in decimals.
So 500 gram = 0.5kg.

This can simply be done with the Commerce decimal quantities module (https://drupal.org/project/commerce_decimal_quantities)