8 replies [Last post]
Sixcolored's picture
Offline
Joined: 01/08/2008
Juice: 17
Was this information Helpful?

Hi all,

I'd like to use Ubercart for a online bookstore.
In the world of books (in Europe) millimeters are used instead of centimeters.

Is it possible to add another dimension?

Kind regards,

Baris

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Add another dimension value (mm)

Yeah, that's a good idea. I think I'll also add feet as a length unit as well.

Sixcolored's picture
Offline
Joined: 01/08/2008
Juice: 17
Great, thanks

But do I have to wait until the next update? Or can I add it manually meanwhile?

Thanks!

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Great, thanks

There's several different places that need updating, but they're all in the uc_store.module file. The easiest thing to do is to go to http://bazaar.ubercart.org/ and browse the repository for that file. They are updated soon after each commit, so it should have the changes by now. Since the beta release was so recent, you shouldn't have any problems, but getting all of the modules in the tarball would be safer.

Mirjam's picture
Offline
Joined: 11/26/2007
Juice: 15
can't select millimeters in edit products dimensions

In the store settings you can select millimeters in the Default unit of measurement now, that's great!

But when i edit a product; "Physical dimensions of the packaged product" under "Product information"
Units of measurement; I only can select Centimeters or Inches.

But i want to select millimeters, what do i have to do?
seems like the !value mm doesn't come up.

using Ubercart 5.x-1.0-beta4 Drupal 5.6

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: can't select millimeters in edit products dimensions

Small oversight on my part. I had only updated the store module and not any of the other places that let you choose the length units.

If you don't want to wait for the next release, search uc_product.module, uc_shipping.module, and uc_ups.module for the string "Inches". Add in Feet and Millimeters to those arrays (with keys 'ft' and 'mm') and you can choose those options in those forms.

Mirjam's picture
Offline
Joined: 11/26/2007
Juice: 15
Re: Re: can't select millimeters in edit products dimensions

Thanks! it works!!

wickertu's picture
Offline
Joined: 05/05/2008
Juice: 2
Other units of measure

I don't mean to hijack this thread...but it does seem like a place to continue this concept a little...and I'm starting to potentially see a configuration problem with needing to add too many measurements.

For example, people selling fabric need to specify things in yards. What about square inches, square feet, and square yards (tiles, roofing material, and fabrics), or units of volume (perfumes, medicines, etc)?

Not having looked at the code yet, it seems like it might be useful to convert the hardcode to databases...? As you all know the code better than I do at this point, how much work would this involve? (I'm trying to determine if I would be able to contribute an update)

baalsgate's picture
Offline
Joined: 09/12/2007
Juice: 46
on the subject of Dimensions defaults

I have found that even setting "cm" as default when I look at the product listings they are all still "in" ( inches ) ?
While true new products being added yes are defaulting to cm great !

It would also be good to have Dimensions not display in the product info when having a zero value set instead of showing which in all cases is wrong.
Dimensions: 0 in × 0 in × 0 in