7 replies [Last post]
Francois's picture
Offline
Joined: 08/19/2008
Juice: 387
Was this information Helpful?

How difficult will it be to add "quantity" to attributes?

This is the scenario:

We're offering books in different sizes with a variable amount of pages. This can vary anything from 1 to 200 pages.

- The easy way but most laborious solution is to create 5 products (for each size) with a pages attribute at increments of 10 which will give you 20 options when selecting.

This would result in the customer choosing the book, from a selection of 5 of the same style. Once the product is open the customer can then select the amount of pages, but only in increments of 10.
Issues I have with this solution: (1) Will take very long to setup each product. (2) Will confuse the customer on the catalog page with 5 of the same product.

- The hard way but most practical is to have 1 product with an attribute of size an a dependent attribute of cost per page to which the customer can add amount of pages.

Reason I like the second solution. Even though the initial setup will require more brainpower the product setup will be easy as pie and the customer will have very little thinking to do as they are given 1 product at verious sizes with any quantity of pages.

For obvious reason I'm interested in going to second route.

I'm not too familiar with PHP, although I can follow instructions. Am I dreaming or can this be done?

Any ideas?
Francois.

--------
'Twas the end of the world, and you didn't even know it.

Francois's picture
Offline
Joined: 08/19/2008
Juice: 387
Seeing Double...

Having combed the interwebs for an answer I've found many answers to some of my older questions, but this one still has me stumped.

I've found no contributed modules for this either here or on Drupal.org.
I've found many people asking for this kind of functionality.

  • If this is an obvious solution I'd appreciate help.
  • If this is a more complicated matter I'd appreciate a quote.
    • Francois.

--------
'Twas the end of the world, and you didn't even know it.

Uberchic's picture
Offline
Administrator
Joined: 08/29/2008
Juice: 754
Re: Seeing Double...

Have you looked at uc_dependant_attributes? http://drupal.org/project/uc_dependent_attributes

Francois's picture
Offline
Joined: 08/19/2008
Juice: 387
Re: Re: Seeing Double...

Unfortunately I have tried this... I ended up with over a 1000 possible combinations, and that's before I completed adding the required attributes. This is how it plays out:

  1. Book Size
    1. Size 1
    2. Size 2
    3. Size 3
    4. Size 4
    5. Size 5
    6. Size 6
  2. Page Amount + Cost
    1. Size 1 Cost 1
      1. 5 Pages
      2. 10 Pages
      3. 15 Pages
      4. etc. to 100 pages - total 20 options.
    2. Size 2 Cost 2
      1. 5 Pages
      2. 10 Pages
      3. 15 Pages
      4. etc. to 100 pages - total 20 options.
    3. Etc. to 6 sizes + costs
      1. 5 Pages
      2. 10 Pages
      3. 15 Pages
      4. etc. to 100 pages - total 20 options.
  3. Paper Edge
    1. Edge Type 1
    2. Edge Type 2 
  4. Paper Type
    1. Paper Type 1
    2. Paper Type 2
    3. etc. to 6 Types 

The way dependent modules work you'll have to select and deselect options that works as follows:

  1. Paper Size 1 + Paper Edge 1 + Paper Type 1
  2. Paper Size 1 + Paper Edge 1 + Paper Type 2
  3. Paper Size 1 + Paper Edge 1 + Paper Type 3
  4. Paper Size 1 + Paper Edge 1 + Paper Type 4
  5. etc.

If my calculations are correct this ends up at something like: 8640 possible combinations of which some are not allowed combinations (as dependent attributes.) If all these are listed with checkboxes they fill 432 pages of options per product. 8(With Attributes and Quantities you have the following setup:

  1. Book Size
    1. Size 1
    2. Size 2
    3. etc to 6
  2. Pages
    1. Size 1 (quantity)
    2. Size 2 (quantity)
    3. etc to 6
  3. Paper Edge
    1. Edge Type 1
    2. Edge Type 2
  4. Paper Type
    1. Paper Type 1
    2. Paper Type 2
    3. etc. to 6

With the ability to add Quantity to an attribute you reduce the amount of setup work and options dramatically as well as increasing customization for the customer because you can actually offer 1 page, 7 pages or 53 pages, not just 5, 10 and 15. Not to mention you only have to setup 20 options as opposed to 8640.
This implementation also has other possibilities.

  1. Selling tickets and adding adults, children and pensioners.
  2. Selling cakes and adding any number of candles.
  3. Adding a single setup fee with 20 prints of 1 size, and 20 of another.
  4. Selling insurance with options for 1, 2 or 3 cars, 6 baseball bats etc.

Basically a more customizable product that's not complex enough to require a product kit.

I hope that makes sense.

--------
'Twas the end of the world, and you didn't even know it.

Uberchic's picture
Offline
Administrator
Joined: 08/29/2008
Juice: 754
Re: Re: Re: Seeing Double...

I see the scope of the problem. Just curious though (and this is not at all a solution), what is the store owner's cost / page? Are these blank pages (like a journal)?

Francois's picture
Offline
Joined: 08/19/2008
Juice: 387
Page Cost

These are actually pages printed in full colour, like a coffee table photo book. The sell price is between $7 and $10 per page.

--------
'Twas the end of the world, and you didn't even know it.

Uberchic's picture
Offline
Administrator
Joined: 08/29/2008
Juice: 754
Re: Page Cost

Hmm, I was hoping it was small $ so as not to affect bottom line....

Which of the options affect price, all of them?

luketarplin's picture
Offline
Joined: 04/26/2010
Juice: 187
Re: Attribute Quantities

UC Attribute Quantities Module now available here: http://www.ubercart.org/project/uc_attribute_quantity