Skip to main content

Vendor VAT N° no online check?

More
7 years 7 months ago #304252 by pprle
-- HikaShop version -- : 4.0.2
-- HikaMarket version -- : 3.0.1

Hello,

I know there is a VAT number check option in Hikashop
In Hikamarket when a vendor enters a wrong VAT number (his own VAT number) it simply saves like there is no online check
Is that related to hikashop or hikamarket?
I would prefer that there is a warning /notification when entering a wrong number

Do you think it would be possible to enhance the system with an option to force entering a (correct) VAT number and this only for EU vendors, or maybe is it already possible?

Please Log in or Create an account to join the conversation.

More
7 years 7 months ago #304257 by Jerome
Hello,

I prepared some code for the next HikaMarket release.
For the current version, you would need to modify the HikaMarket core or to use a plugin trigger (onBeforeVendorCreate / onBeforeVendorUpdate).
The idea is to read the vendor_address_data and check it with the HikaShop vat helper.
Code:
if(!empty($vendor->vendor_address_vat) && (empty($vendor->old) || $vendor->old->vendor_address_vat != $vendor->vendor_address_vat)) { $vatHelper = hikamarket::get('shop.helper.vat'); if(!$vatHelper->isValid($vendor->vendor_address_vat)) { // Display the error message with $vatHelper->message; $do = false; } }

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.148 seconds
Powered by Kunena Forum