Jump to content

VAT Management module (Prestashop official) bug ?


laurent54
 Share

Recommended Posts

Hello,

 

This module assign a var to smarty to check  if VAT is enable or not, but seems only implemented in AdressController in this private method, so if i use one step authentication, the code below is not called and vatManagement.js does not work because missing variable, someone else got this bug in 1.6 ?

		if (typeof vatnumber_ajax_call !== 'undefined' && vatnumber_ajax_call)
	protected function assignVatNumber()
	{
		$vat_number_exists = file_exists(_PS_MODULE_DIR_.'vatnumber/vatnumber.php');
		$vat_number_management = Configuration::get('VATNUMBER_MANAGEMENT');
		if ($vat_number_management && $vat_number_exists)
			include_once(_PS_MODULE_DIR_.'vatnumber/vatnumber.php');

		if ($vat_number_management && $vat_number_exists && VatNumber::isApplicable((int)Tools::getCountry()))
			$vat_display = 2;
		elseif ($vat_number_management)
			$vat_display = 1;
		else
			$vat_display = 0;

		$this->context->smarty->assign(array(
			'vatnumber_ajax_call' => file_exists(_PS_MODULE_DIR_.'vatnumber/ajax.php'),
			'vat_display' => $vat_display,
		));
	}

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More