3 replies [Last post]
TapocoL@drupal.org's picture
Offline
Joined: 02/20/2008
Juice: 11
Was this information Helpful?

The more I use Ubercart, the more I find what a great job you guys are doing. I got a suggestion, though. Currently, I have products with two main attributes. Both attributes increase from the base at varying amounts. And the problem is that when you select different options for each attribute, the price actually increases by more (or less) than the fixed amount from the base. For example,

Product 1 with Attr. A option 1 (base) and Attr. B option 1 (base) starts at $20
Attr. A option 2 (upgrade) will increase the base by $5
Attr. B option 2 (upgrade) will increase the base by $10
However, when both are combined the company charges $12
So, Ubercart will charge $35 for Product 1 with Attr. A option 2 and Attr. B option 2
But, the company only wants to charge $32 since they are combining.

My idea is to create a matrix-like table with one axis being Attribute A's options and the other axis being Attribute B's options.

+---------Attr A---------+
|   |Opts| 1 | 2 | 3 | 4 |
| A |  1 |+0 |+3 |+5 |+10|
| t |
| t |  2 |+2 |+4 |+6 |+11|
| r |
|   |  3 |+5 |+7 |+8 |+13|
| B |
+------------------------+

Hope the above makes sense, in that the initial increase for Attr A from option 1 to option 2 is $3 and Attr B from opt 1 to opt 2 is $2. But, if they choose both it will only be $4. Let me know, if I am just missing this feature in Ubercart.

Thanks

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Attributes Price Matrix

It's a great idea, but only if you have exactly two attributes on a product. Any more or fewer, and you can't really display all of the option combinations as a matrix.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Attributes Price Matrix

This could be a handy contrib module for folks in your shoes, though. I'm not sure what your coding skills are like, as this would take a bit of work to do. People could just install and use it on the assumption that they can only use it on products w/ 2 attributes.

cYu
cYu's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 11/19/2007
Juice: 850
Re: Attributes Price Matrix

This sort of functionality can be achieved combining 2 contrib modules as described at http://www.ubercart.org/contrib/2381 . That isn't a very nice way to handle it, but in a pinch can give you what you need.