osCommerce 4 osCommerce 4 App Shop Support Services App Shop Us
• Checkout
• Get in touch

osCommerce

The e-commerce.

# oscommerce bs weight price

## Recommended Posts

how do i use the weight , price in the shipping module
i used the next info for the weight and prices.

20:0.83,50:1.66,100:2,49,350:3.32,2000:4.15

so 20 gram = 0,83 euro
2000 gram (2kilo) = 4.15

but if i fill in the weight on the objects, i get the weirdes values.
i some times get some thing like 81 euro?
also i do not get if i fill in a weight. its always with a dec 2
if i fill in 2 it becomes 2.00
i have set the module to weight not prices.

How do i fill in 20grams or 100 grams or 1kilo on a object?

##### Share on other sites

You can setup your table rates by using 0.02 for 20 gr.

0.02 = 20gr

0.2 = 200gr

etc...

As you have it now it would be 20kg -> 0.83 Euro, from 20 to 50kg -> 1.66 Euro

I remember for one of my older shops I modified the products_weight field in the database to use 20 = 20gr or 200 = 200gr.

I don't know the change out of my head now but I can check later after work what the setup was if 0.02 doesn't work for you.

##### Share on other sites

indeed chancing the code would be indeed nicer.

i first check your solution if i get it correct.

thank you.

##### Share on other sites

and still if i use the tought of the shop and i change this to what you say.

now i have a product that is 0.01 gram so that would be 10gram

the shipping price is 0,65 euro cent? how is that possible.

i do not have that price anyware set.

i also have a fee of 30 cent. that means he calculated 35 cent for 10 gramm. where

is he getting that amount from?

##### Share on other sites

Did you check the Configuration settings in the admin area, Shipping/Packaging ?
Set package tare weight to 0 and Larger packages - percentage increase to 0
Also adjust the Max Package weight setting.

Original Database shows

products_weight     decimal(5,2)

My change was

products_weight     int(6)

You might have to change also

options_values_weight     decimal(5,2)

to

options_values_weight     int(6)

If you'd like to use the 0.02 or even 0.020 weight style you should adjust the database to the following otherwise you won't be able to go over 10kg weight.

products_weight     decimal(10,3)

and

options_values_weight     decimal(10,3)

##### Share on other sites

the last part you see, that would be the sql i assume?

i changed the values and check what that does for me.

the best way to use would be

1= 1 gram

but if i fill that in to the object.

it will be 1.00 but thats okey.

i prefer then.

1.00 = 1 gramm
20.00 = 20 gramm
100.00 = 100 gramm
1000.00 = 1 kilo

but that is because oscommerce adds the .00 itself.

i hope i get this to work, because the oscommerce bootstrap till now is nice to work with.

##### Share on other sites

If you want to use

1 = 1gram

20  = 20gram

etc...

Then  you have to change the database fields for products_weight and  options_values_weight to int(6)

To change the fields access your database via phpMyAdmin or similar software and go to the products table and the other must be somewhere inside one of the attributes or options table. Once you found that row click on Edit and change the field accordingly. There are ways to do it via script but I am no sql query crack so no clue how to do that. I usually do the changes manually.

The two zeros after the decimal is added because you use decimal(5,2)

Here an example

decimal(5,2) = 12345.00

decimal(10,3) = 1234567891.000

int(6) = 123456

##### Share on other sites

i gonna re read this and check thank you. i will let you know.

thank you.