Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi..
Actually i have a store which sells the servers with multiple configuration. In this , Servers has hard drive attribute multiple times (same attributes).
Example:
server name : server1
attributes:
Hard Drive (1)
Hard Drive (2)
Hard Drive (3)
Hard Drive (4)
Hard Drive (5)
Hard Drive (6)
I have so tried with uc attribute module but i unable to do this.
Is there any way to do this??
thanks
Comments
Comment #2
iyyappan.govindComment #3
iyyappan.govindComment #4
TR CreditAttribution: TR commentedAttributes are not designed to be used for add-on products. What you're trying to do is what I refer to as the "pizza" model, where you sell a "pizza" with an arbitrary number of add-on "toppings" which can be many things. If you have 20 different toppings and you allow 5 different toppings on the pizza, that's over 3 million possible combinations with 3 million different SKUs if you're using attributes. That should be an indication that there's a better architecture to use ...
It seems to me you're doing the same thing, selling a server with up to 6 hard drives which may each be a different size or brand - you're going to have the same combinatoric issue.
One way to do what you want might be product kits. The user buys a kit that consists of a server and 6 hard drives, so the user can select the quantity and size/brand for each hard drive. (the quantity will be available on the kit, the size/brand will be an attribute on the hard drive product. Or you can do it the way you're doing it now but with 6 identical attributes called hard drive 1, hard drive 2, etc. Or you can use some JavaScript or a form-based wizard to walk your customer through the hard drive selection. One way I like to use is to define just one textfield attribute then alter the add-to-cart form to hide the textfield and collect the user input and to fill in the value of the textfield. With pizza, this might be via a JavaScript powered drag and drop image where I "build" my pizza, then use the JavaScript to assemble a string value for the textfield. This way, you only have one attribute and the contents of that textfield are validated on the client side to be a comma-separated list of toppings. You could also use a non-product page, for example a Webform, which upon submission redirects to an Ubercart Cart Link with the correct attribute/options specified. This way your Webform could accept input in any manner you like.
There are many other ways, but this should give you some ideas to work with.