Jump to content

How add more than 13 digits in EAN13 - PS 1.6.1.13


seog

Recommended Posts

Hello 

 

Due I need use other field how third reference I tried many options unsucesfully to can add more than 13 words in ean13 backoffice product tab, options such as:

 

classes/Product.php

'ean13' =>                 array('type' => self::TYPE_STRING, 'validate' => 'isReference', 'size' => 64),

and:

Phpmyadmin

Changing in Mysql Database EAN13 VARCHAR Length to 64 in ps_product, ps_product_attribute and ps_stock

and:

classes/Validate.php

public static function isEan13($ean13)
    {
        return !$ean13 || preg_match('/^[0-9]{0,64}$/', $ean13);
    }

or:

classes/Validate.php

public static function isEan13($ean13)
    {
        return preg_match(Tools::cleanNonUnicodeSupport('/^[^<>;={}]*$/u'), $ean13);
    }

Any suggestion??

Link to comment
Share on other sites

  • 2 weeks later...

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
×
×
  • Create New...