Vendor VAT N° no online check?

  • Posts: 156
  • Thank you received: 8
  • Hikamarket Multivendor Hikashop Business
4 months 2 weeks ago #304252

-- 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.

  • Posts: 23530
  • Thank you received: 3653
  • MODERATOR
4 months 2 weeks ago #304257

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.

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

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