No shipping available when state field disabled

  • Posts: 23
  • Thank you received: 0
13 years 11 months ago #2715

Hi,

I have set up a shipping method for Sweden but when I disable the state field Hikashop sais that there is no shipping method available to my address. It works fine with the state field activated.

Nils


Hikashop Essential 1.4.0

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
13 years 11 months ago #2720

Hi,
That should only be the case if you already had the address already in the system If you create a new address and use it, you should get the shipping methods.

If you use the latest version 1.3.9 or above, you need to change the code

if(!empty($order->shipping_address) && !empty($order->shipping_address->address_state)){
			$field='address_state';
		}
to
$fieldClass = hikashop::get('class.field');
		$fields = $fieldClass->getData('frontcomp','address');
		if(in_array('address_state',array_keys($fields)) && !empty($order->shipping_address) && !empty($order->shipping_address->address_state)){
			$field='address_state';
		}
in the file administrator/components/com_hikahsop/classes/zone.php near line 70 and that should fix the problem.
For previous versions you need to edit the file plugins/hikashopshipping/manual.php and do the same change.

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

  • Posts: 23
  • Thank you received: 0
13 years 11 months ago #2759

It seems to work in 1.3.9 when I re-save the address.


Hikashop Essential 1.4.0

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

Time to create page: 0.054 seconds
Powered by Kunena Forum