Page 1 of 1
Maximum characters for UPC field etc.
Posted: 28 Jun 2017, 00:37
by JustinForga
In the product the SKU, UPC, EAN etc. have a max character size. I would like to be able to use these fields for custom information about the product. Since I can't find a custom field option. How can I make the field to have more characters? I found the XML file for the productitem and edited the size="40". But this will probably be changed again with an update. Also this only changed the SKU and MPN field, not the rest like UPC, EAN, JAN and ISBN. So how to change this and do this permanently? Thanks for any help!
Re: Maximum characters for UPC field etc.
Posted: 28 Jun 2017, 13:43
by Jan
Hi, the length is limited by database columns length limit:
Code: Select all
`sku` varchar(255) NOT NULL DEFAULT '',
`upc` varchar(15) NOT NULL DEFAULT '',
`ean` varchar(15) NOT NULL DEFAULT '',
`jan` varchar(15) NOT NULL DEFAULT '',
`isbn` varchar(15) NOT NULL DEFAULT '',
`mpn` varchar(255) NOT NULL DEFAULT '',
`serial_number` varchar(255) NOT NULL DEFAULT '',
`registration_key` varchar(255) NOT NULL DEFAULT '',
For example, if EAN has max 13 characters, the 15 is the limit, but yes, the limits in XML are wrong, so what about this change:
Code: Select all
<field name="sku" type="text" class="inputbox" size="255" label="COM_PHOCACART_FIELD_SKU_LABEL" description="COM_PHOCACART_FIELD_SKU_DESC" />
<field name="upc" type="text" class="inputbox" size="15" label="COM_PHOCACART_FIELD_UPC_LABEL" description="COM_PHOCACART_FIELD_UPC_DESC" />
<field name="ean" type="text" class="inputbox" size="15" label="COM_PHOCACART_FIELD_EAN_LABEL" description="COM_PHOCACART_FIELD_EAN_DESC" />
<field name="jan" type="text" class="inputbox" size="15" label="COM_PHOCACART_FIELD_JAN_LABEL" description="COM_PHOCACART_FIELD_JAN_DESC" />
<field name="isbn" type="text" class="inputbox" size="15" label="COM_PHOCACART_FIELD_ISBN_LABEL" description="COM_PHOCACART_FIELD_ISBN_DESC" />
<field name="mpn" type="text" class="inputbox" size="255" label="COM_PHOCACART_FIELD_MPN_LABEL" description="COM_PHOCACART_FIELD_MPN_DESC" />
<field name="serial_number" type="text" class="inputbox" size="255" label="COM_PHOCACART_FIELD_SERIAL_NUMBER_LABEL" description="COM_PHOCACART_FIELD_SERIAL_NUMBER_DESC" />
<field name="registration_key" type="text" class="inputbox" size="255" label="COM_PHOCACART_FIELD_REGISTRATION_KEY_LABEL" description="COM_PHOCACART_FIELD_REGISTRATION_KEY_DESC" />
I will edit it in next version.
Jan
Re: Maximum characters for UPC field etc.
Posted: 02 Jul 2017, 00:45
by JustinForga
Jan, you are my hero!
Thanks.
Justin