Site maintenance: Tuesday 17 Nov, from 10:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / General Questions / Increase the length of the product model field

Increase the length of the product model field

Started by new2u on 15 Sep 2010, 5:23 AM · Views: 1,233

Results 1 to 6 of 6
15 Sep 2010, 5:23 AM
#1
new2u avatar

new2u

Zen Follower

Join Date:
Sep 2009
Posts:
186
Plugin Contributions:
0

Increase the length of the product model field

I have tried to increase the length of the product model field but am unable to.
I have changed the table under zen_orders_products to the following:

products_model varchar(64) utf8_unicode_ci Yes NULL

The default is 32. However even after changing it to 64, it is still stuck at 32. What am I doing wrong?

15 Sep 2010, 5:33 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Increase the length of the product model field

Why orders?

That is not where one enters the model initially

There is also that one to display/save it in the orders and there might be a couple others

Have a look at products

Zen-Venom Get Bitten

15 Sep 2010, 3:39 PM
#3
new2u avatar

new2u

Zen Follower

Join Date:
Sep 2009
Posts:
186
Plugin Contributions:
0

Re: Increase the length of the product model field

I didn't see model in any others...

16 Sep 2010, 6:36 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Increase the length of the product model field

I didn't see model in any others...
Look at products

CREATE TABLE products (
  products_id int(11) NOT NULL auto_increment,
  products_type int(11) NOT NULL default '1',
  products_quantity float NOT NULL default '0',
  products_model varchar(32) default NULL,
  products_image varchar(64) default NULL,
  products_price decimal(15,4) NOT NULL default '0.0000',
  products_virtual tinyint(1) NOT NULL default '0',
  products_date_added datetime NOT NULL default '0001-01-01 00:00:00',
  products_last_modified datetime default NULL,
  products_date_available datetime default NULL,
  products_weight float NOT NULL default '0',
  products_status tinyint(1) NOT NULL default '0',
  products_tax_class_id int(11) NOT NULL default '0',
  manufacturers_id int(11) default NULL,
  products_ordered float NOT NULL default '0',
  products_quantity_order_min float NOT NULL default '1',
  products_quantity_order_units float NOT NULL default '1',
  products_priced_by_attribute tinyint(1) NOT NULL default '0',
  product_is_free tinyint(1) NOT NULL default '0',
  product_is_call tinyint(1) NOT NULL default '0',
  products_quantity_mixed tinyint(1) NOT NULL default '0',
  product_is_always_free_shipping tinyint(1) NOT NULL default '0',
  products_qty_box_status tinyint(1) NOT NULL default '1',
  products_quantity_order_max float NOT NULL default '0',
  products_sort_order int(11) NOT NULL default '0',
  products_discount_type tinyint(1) NOT NULL default '0',
  products_discount_type_from tinyint(1) NOT NULL default '0',
  products_price_sorter decimal(15,4) NOT NULL default '0.0000',
  master_categories_id int(11) NOT NULL default '0',
  products_mixed_discount_quantity tinyint(1) NOT NULL default '1',
  metatags_title_status tinyint(1) NOT NULL default '0',
  metatags_products_name_status tinyint(1) NOT NULL default '0',
  metatags_model_status tinyint(1) NOT NULL default '0',
  metatags_price_status tinyint(1) NOT NULL default '0',
  metatags_title_tagline_status tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (products_id),
  KEY idx_products_date_added_zen (products_date_added),
  KEY idx_products_status_zen (products_status),
  KEY idx_products_date_available_zen (products_date_available),
  KEY idx_products_ordered_zen (products_ordered),
  KEY idx_products_model_zen (products_model),
  KEY idx_products_price_sorter_zen (products_price_sorter),
  KEY idx_master_categories_id_zen (master_categories_id),
  KEY idx_products_sort_order_zen (products_sort_order),
  KEY idx_manufacturers_id_zen (manufacturers_id)
) TYPE=MyISAM;

Zen-Venom Get Bitten

19 Sep 2010, 3:59 AM
#5
new2u avatar

new2u

Zen Follower

Join Date:
Sep 2009
Posts:
186
Plugin Contributions:
0

Re: Increase the length of the product model field

Got it! Thanks for your patience. I got it to work on old and new ones

13 May 2011, 3:04 PM
#6
wizer avatar

wizer

Zen Follower

Join Date:
Jul 2010
Location:
London, UK
Posts:
135
Plugin Contributions:
0

Re: Increase the length of the product model field

Sorry to drag up an old thread, but I am trying to do exactly this, but still can not add longer model numbers.

Can someone explain clearly how I edit the database for this? I've gone into 'zen_products' and then clicked 'Change' on 'products_model'. Then edited the 'Length/Values1' field to '64' Saved it, but it still rejects model numbers over 32 characters? What am I doing wrong?