Jump to content

Letters in EAN13


Cosmi
 Share

Recommended Posts

Hello,

I'm developing a Prestashop website and my customer wants to show letters in EAN13 (which is product code).

So, the EAN13 might look like this: SDR2398J.

I tried to look in the database and to change the structure, but it seems to be something from the script.

Are there any chances to solve this issue?

Thank you!

Share this post


Link to post
Share on other sites

The EAN13 is a 13-digit barcode. You shouldn't use it for reference numbers like that. You should use the Reference field for that. If you require two reference numbers, you will need to change line 157 of classes/Product.php (in PrestaShop v1.3.2) from:

protected $fieldsSize = array('reference' => 32, 'supplier_reference' => 32, 'location' => 64, 'ean13' => 13);



to:

protected $fieldsSize = array('reference' => 32, 'supplier_reference' => 32, 'location' => 64, /*'ean13' => 13*/);



and line 183 from:

'ean13' => 'isEan13'



to:

'ean13' => 'isReference'

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More