Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing WEIGHT data type


jacksbarrow

Recommended Posts

Dear all,

I need to change the field WEIGHT from decimal datatype to varchar, so I changed it on mysql database.

My problem is: when I create a new products, in WEIGHT field I can input character but when I come back to see it I get only a "0" value.

Is there something else to change to get alphanumeric values on WEIGHT field?

 

thank you

Link to comment
Share on other sites

The weight field is used for mathematical calculations throughout the website. It is inherently coded to accept a numerical value only. Although you have changed the database field type to accept VARCHAR, you would also have to change every page that handles the value to remove the calculations.

 

 

If you are looking to add another field to your product details, you should consider Extra Product Fields

 

 

 

 

Chris

Link to comment
Share on other sites

Many thanks for your answer Chris

 

The weight field is used for mathematical calculations throughout the website. It is inherently coded to accept a numerical value only. Although you have changed the database field type to accept VARCHAR, you would also have to change every page that handles the value to remove the calculations.

 

 

If you are looking to add another field to your product details, you should consider Extra Product Fields

 

 

 

 

Chris

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...