Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding 1 gram product weights


suli

Recommended Posts

Hello (6 months and still no reply, guru's where are you ?)

 

Our online shop sells forest seed in large (1kg or 1.0) and small packets (1gm or 0.001).

 

My problem is when I enter .001 (1gm) in the weight box for product attributes it defaults back to 0.00.

 

I think this is a "number of decimal places" configuration somewhere in the code.

 

Can someone please help me locate which php file needs to be modified.

 

regards John Sulikowski ( [email protected] )

Link to comment
Share on other sites

ok, i was originally on the right track.

it is a DB issue.

in the "products" table you need to change the decimal place from 2 to 3 for the feild "products_weight" normally it is "decimal(5,2)" change it to decimal(5,3)

 

that should fix your problem...

Link to comment
Share on other sites

  • 5 months later...

This is great, just what I have been looking for.

it is a DB issue.

in the "products" table you need to change the decimal place from 2 to 3 for the feild "products_weight" normally it is "decimal(5,2)" change it to decimal(5,3)

 

But, how and what do I need to change to enable this to work ?

Link to comment
Share on other sites

Thanks, that would work, but if anyone could let me know how to change

it is a DB issue.

in the "products" table you need to change the decimal place from 2 to 3 for the feild "products_weight" normally it is "decimal(5,2)" change it to decimal(5,3)

I would be grateful

Link to comment
Share on other sites

I may be a lazy bones , but i would just come up with a shipping method that is best using the order total or quantity total, and not show weight.

 

ok so thats what i do, anyway - all my products have a 1 for weight because i dont use it.:lol: good luck!

Link to comment
Share on other sites

  • 4 months later...
:huh:  OK one last try brfore I change all of my weights to gramms. Can anyone guide me on how to change the decimal place ?

Hi Mark.

 

You still need this answer?

You need to change this on the DataBase structure. On phpMyAdmin, for example.

 

It may work if you run this query:

ALTER TABLE `products` CHANGE `products_weight` `products_weight` DECIMAL( 5, 0 ) DEFAULT '0.00' NOT NULL

on your DataBase.

 

But to use this you will need access to some DataBase interface also. Or, you could make a php page that runs this query.

 

SGershon

If at first you don't succeed, you must be a programmer.

 

Tip Posted: Languageless Reviews

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...