2
Answers
Vote up!
1
Vote down!

Product Options that Change the price

Hi There,
I'm just looking for a way to integrate options into my products that would change the price of the item. For example. We're selling custom built computers, I want them to be able to choose different hardware and software options and that would change the price of the item. Anyone have any ideas on the best way to set that up?
Thanks so much!
Candace

Asked by: Girly Geek
on August 8, 2012

2 Answers

Vote up!
0
Vote down!

Candace,

This is exactly what the products in Drupal Commerce are designed to do. Each "Attribute" that can change the price equals an entirely new product.

Product A = Computer with 256 MB of RAM, 10GB HD, Standard Software Bundle, Printer

Product B = Computer with 512 MB of RAM, 10GB HD, Standard Software Bundle, Printer

Product C = Computer with 256 MB of RAM, 20GB HD, Standard Software Bundle, Printer

Each attribute should be a taxonomy term. The product display will take care of dicing up the available options into drop-downs that will make it look like you are "configuring" your computer product.

Josh

Josh Miller
Answer by: Josh Miller
Posted: Sep 6, 2012

Comments

Note that each "type" of attribute should probably be it's own vocabulary. So using the above example, you would have a vocabulary for "RAM," "Hard Drives," "Software Bundles," etc. If you pre-fill all of the vocabulary terms, you can use http://drupal.org/project/commerce_bpc to generate all of the product variations.

- Josh Miller on September 6, 2012
Vote up!
0
Vote down!

The first step is creating unique product types, yes. But in this case the question is a bit more involved. The real solution is commonly called a Product Display.

  • Go to the regular Drupal content types admin screen.
  • Create a new content type (the usual suggestion is to call it Product Display but I prefer Store item)
  • Add the existing field_product entityreference field.
    • Check both of these fields: Required field and Render fields from the referenced products when viewing this entity
    • For Product types that can be referenced - unless you have a very complex set of Products, it's best to leave all of them unchecked.
    • Inline Entity Form has some powerful options for managing your products so choose the ones that are best for your situation. I recommend checking Refer to the referenced products as "variations"
    • Set the Number of values to Unlimited. This will allow you the greatest flexibility as you manage your Store Items in the future.
  • Select the Inline Entity Form widget in the Manage Display tab for this field. It will allow a much smoother editing experience in the next step.
  • With your new Store item content type, go to /node/add/store-item
  • Give it a generic title, like Shirts instead of Red XL Shirt. The variations will be entered on this form.
  • Now find an area called Variations where you can create and manage the Products that belong to this Store Item.
  • As you select or create new Variations, you will have to give each one unique options, a price, and a SKU so that the store knows how much to charge as the visitors select different options.
  • Save your Store item and when you view this node it will automatically have the options and dynamic price listed.
Answer by: Anonymous (not verified)
Posted: Nov 14, 2012