Jump to content

WebService: Avoiding Ean13 validation on Products and Combinations


visualps

Recommended Posts

Hi all,

I've come to some kind of a dead end here.

We have an external software that uses the Prestashop WebService (API) to import products on our store. We needed to be able to avoid the Ean13 validation, so we could insert alphanumeric values on the Ean13 field (both on products and variations).

I've successfully made the necessary edits, so I can input alphanumeric values from the BackOffice, but the WebService still isn't able to insert them. Does the WebService use a different validation system, which I can't seem to find?

This is what I've edited, in order to insert alphanumeric values on the Ean13 field from the BackOffice:

/classes/Product.php

/classes/Combination.php

On these two files above, I've removed the validation from the $definition array.

/src/PrestaShopBundle/Form/Admin/Product -> ProductOptions.php

/src/PrestaShopBundle/Form/Admin/Product -> ProductCombination.php

On these two files above, I've commented out the "constraints".

But the WebService seems to be using some other form of field validation somewhere else.

Anybody has any idea where that could be?

Thanks a lot in advance!

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