Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

[BOOM-3904] Module VATNUMBER - error in 1.7 with the VAT number check #17

Open
prestonBot opened this issue Aug 22, 2018 · 17 comments
Open

Comments

@prestonBot
Copy link

This issue has been migrated from the Forge. Read the original ticket here.

  • Reporter: vincentbz
  • Created at: Thu, 28 Sep 2017 11:15:07 +0200

Hi,

The VATNumber native module in 1.7 is not released because it doesn't work.

1. The VAT check is not done
When I install the module (from the github repo) and activate the check option in the module, if I enter a wrong VAT number during the order process, it's not checked.
The validation of the VAT number should be done ONLY if the field is not empty. If the field is empty then no need to check.
==> It should be like in 1.6, if the number is KO, the field is not validated.
==> the display of the error should be like when a format is not OK, see image

2. Error when i'm on debug mode
If the debug mode is activated, when I enter a VATnumber, there is an error, see image. It doesn't appear if i'm not in debug mode

2. The module is not available for 1.7
Once it's fixed, the module should be available for 1.7 versions

  • How to reproduce the issue ?

Install the module from the github repository


activate the check in the module


make an order with a VAT number : FR123456789 which doesn't exist


==> you shouldn't be able to order, see image from 1.6

@prestonBot
Copy link
Author

This comment has been migrated from the Forge. Read the original comment here.

  • Author: emmanuelf
  • Created at: Thu, 28 Sep 2017 11:37:57 +0200

Thomas Nabord pour toi mon ptit loup ?

@prestonBot
Copy link
Author

This comment has been migrated from the Forge. Read the original comment here.

  • Author: quetzacoalt
  • Created at: Thu, 28 Sep 2017 11:40:07 +0200

Mettez le dans le board ouais, je le ferai quand je m'en serai sorti avec PrestaTrust

@prestonBot
Copy link
Author

This comment has been migrated from the Forge. Read the original comment here.

  • Author: vincentbz
  • Created at: Thu, 28 Sep 2017 14:16:44 +0200

When there is an error for the VAT number, the error should be shown like on the screen for the phone format.

The text should be the existing string "VAT number not found" (seen in Crowdin)

User agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0

@prestonBot
Copy link
Author

This comment has been migrated from the Forge. Read the original comment here.

  • Author: vincentbz
  • Created at: Thu, 28 Sep 2017 14:26:00 +0200

Oh, merci Thomas !

Par contre ya quelques ptits soucis aussi en mode debug. Aucun changement de comportement au programme, on reste vraiment sur du basique de chez basique.

@prestonBot
Copy link
Author

prestonBot commented Aug 22, 2018

This comment has been migrated from the Forge. Read the original comment here.

  • Author: azmaer
  • Created at: Mon, 15 Jan 2018 14:00:50 +0100

1.7 got B2B turn on option.

Preferences -> Client -> B2B

and know in registration, there is field VAT / SIRET number. But this field is not required as default.

To make it required you can go to:

International -> Location -> Countries 

and you can choose if VAT number is required filed. BUT THERE IS A BUG AND IT"S NOT WORKING

@colinegin colinegin changed the title [BOOM-3904] Module VATNUMBER KO in 1.7 [BOOM-3904] Module VATNUMBER - error in 1.7 with the VAT number check Jan 14, 2019
@ckubitza
Copy link

I had problems here too while trying to implement some additional pattern validation for the vat number (without using the webservice). I found out that the vat validation result is not handled correctly.

The hookActionValidateCustomerAddressForm() returns a boolean and if this is false it will later be casted to an empty string. The validate() function in customerAddressForm then thinks there are no registered hooks.

I could fix this simply by returning an int of 0/1 in hookActionValidateCustomerAddressForm() instead of the boolean false/true.

@khouloudbelguith
Copy link

Hi @ckubitza,
Would you be willing to make a pull request on GitHub with your code suggestion?
https://github.com/PrestaShop/vatnumber
Thank you!

@ckubitza
Copy link

ckubitza commented Feb 15, 2019

@khouloudbelguith I can make a pull request but I have no time to really check the webservice functionality.

@ckubitza
Copy link

My problem was fixed with this commit (PrestaShop/PrestaShop@db171a5), so maybe the original bug is also already addressed, somebody has to check it.

@Gipielle
Copy link

Any news about this error ?

@khouloudbelguith
Copy link

Hi @Gipielle,

Sorry not yet.
Thanks for your understanding!

@zapto
Copy link

zapto commented Dec 11, 2019

So this module doesnt work with 1.7? Tried to install with no luck.

@khouloudbelguith
Copy link

Hi @zapto,

Here's the module cloned from GitHub: https://github.com/PrestaShop/vatnumber
vatnumber.zip

PS: this issue is not fixed yet.

Thanks!

@Johnwulp
Copy link

Is this going to be fixed in future versions?

@Gipielle
Copy link

Let's hope

@NKoonen
Copy link

NKoonen commented Sep 9, 2020

As an alternative, you might try my module Vat Checker

@hibatallahAouadni
Copy link

Ping @marionf I can see that you removed this issue from the Native Modules Integration, so where we should put it? 😅
Should we create a new EPIC for the VAT module?

@PierreRambaud PierreRambaud transferred this issue from PrestaShop/PrestaShop Feb 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants