1

I have a site where a client wishes to sell products that have a lot of different variations (ie size, colour, length etc), but each of these will make a slight change to the price. I know about the ability to make variations of products so that the price changes when you pick different items in the drop downs, but these have to be manually entered. For my client, each time the variations are open to the end user, the price increase will always be the same.

Both have the size option available to user -the price will increase on top of the base price by the same increment based on the selection.

eg: Small = no change Medium = +£5 Large = +£10

Product A, starting price: £10 Product B, starting price: £20

So Product A with medium will be £15, Product B with large would be £30

I realise in this example it would be simple to add this in manually, but if she has 3 (or more) different options open to the end user, with upto 10 options within, multiplied by her entire product range, it would take forever to do.

What I had thought is if it was possible to add a price addition field to the product category listing, and then use a (rule/module?) to automate this price being added on. Is there anything already out there that does anything like this, or if not, how could I go about creating it.

Many thanks

2
  • Can't you manage this by help of keeping the variation as attributes of the product which would be some taxonomy term & at the product display showing only related product which has different attributes ?
    – RajeevK
    Apr 20, 2013 at 5:39
  • I think you may have misunderstood the scenario. I am looking to create an automatic link between price increments and their variations, rather than needing to manually enter every size/colour variation combination manually Apr 20, 2013 at 10:21

4 Answers 4

1
+100

How about the Commerce Customizable Products Module. I just saw this video today, maybe it will help.

Drupal Commerce allows you to sell customizable products that require customer input when added to the cart. Use cases for this functionality include:

  • Business cards that require contact information and a logo upload.
  • Event registrations that require attendee information.
  • Donations the allow the customer to specify a donation amount.

The core Line Item module accommodates these scenarios by letting you add any number of fields to the Product line item type and expose them to the Add to Cart form. However, sites that sell multiple types of customizable products or a mixture of customizable and non-customizable products need to define multiple line item types to handle the different configurations of fields. That's where this Customizable Products module comes in!

It gives you the ability to define new line item types on the fly at Administration > Store > Configuration > Line item types. This is functionally equivalent to defining the new line item type in code, which is still recommended if you are able.

1
  • After having had a quick look at this, this seems like the best method I can use to get what I am looking for, the only downside is that it doesn't appear to visually change the price for you when you change anything, so I may have to write some script to do that Apr 30, 2013 at 8:15
1

You can handle price using commerce Rules integration.

I can suggest you store your product attributes(size, color, lenght and etc) in taxonomy vocabularies.

Add custom field to your size, color, lenght and etc. vocabulary and name it for example price_increment.

Step1: Set price increment price step per each term.

E.g. Small = empty, Medium = 5, Large = 10.

Step2: Go to priring rules and create new one.

Set the price value using rules:

  1. Get referenced term of product(e.g. color)
  2. Check if term's field price_increment is not empty
  3. Set product price to price + price_increment

P.S. You can create rule for each product attribute(like color, size etc). Or you can create Rule set.

3
  • I think this was my original idea to try to use this method, but I can't find a way of doing it via Rules, I couldn't find a way of making it so that it would check if you had a specific taxonomy (ie colour) and then use the value of the selector to increase the price associated with that taxonomy term. Apr 30, 2013 at 8:14
  • you can do almost everything with Rules. Learn and use this module. It's very powerfull. You can get value from taxonomy field and increment price. I described it shortly in my answer. Also you can handle prices programmatically. Each price in DC has discount characteristic
    – milkovsky
    Apr 30, 2013 at 13:33
  • This is the correct answer looking at the requirements. And if one does not like to set up custom rules for the products, I happened to write a module which does exactly what this answer describes, but without rules. The only thing to do to get it working is to add a price field to the taxonomy vocabulary. drupal.org/sandbox/gbyte.co/2565693
    – gbyte
    Sep 9, 2015 at 21:59
1

theres commerce_pricing_attributes now, sounds like the module you want:

This module provides some enhancements to the Commerce Product Option and Commerce Product Attributes handling by applying pricing rules to custom product attributes. So, you can add attributes to products that affect the final product price.

0

Based on the explanation above, I feel you need to have a module like 'product attributes' which is available for Ubercart. Using attributes you can have different level of pricing and once the customer selects one of the level that particular price will be added to cart.

Here the base price of a product will always be normal eg: $100. If you make one of the attribute as $50 the total cost of the product for that level will become $150.

similarly you can configure for other levels too.

For every attribute you can set a default value on the settings page.

While publishing the product client can select the corresponding attributes for every product.

1
  • Sorry, I probably should have made it more notable that I was already invested in using Drupal Commerce over ubercart. However, if all else fails I will look into this answer. Thanks Apr 30, 2013 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.