Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

making products_model longer in the database


longhorn1999

Recommended Posts

Hi,

 

I have a pretty basic question about phpMyAdmin and the products_model field.

 

How exactly do I modify this to make it longer? Standard osC sets it at 11 or 12 characters or so. I see it when you click on products in phpMyAdmin, but I'm not sure what to do next.

 

Also, how long could I make this field theoretically? 30, 40 characters? I suppose the real limit might depend on how your product pages are laid out.

 

And if I change this, are there any hidden side effects that anyone knows of? Might this cause some random add-on to start acting strangely?

 

Thanks

Link to comment
Share on other sites

Hi Nick.

 

To change product code length to 30

 

Two database tables need to be modified when changing the length of the product model field: osc_products, and osc_orders_products.

 

ALTER TABLE `products` CHANGE `products_model` `products_model` VARCHAR( 30 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL

 

ALTER TABLE `orders_products` CHANGE `products_model` `products_model` VARCHAR( 30 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL

 

 

Regards

 

Ken

Link to comment
Share on other sites

Thanks Ken.

 

I forgot to mention that I'm using osc v2.2. This should be the same though, right?

 

Also, is there any functional limit to how long I could make this? I'm guessing that there are not potential side effects of enlarging this field...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...