Jump to content

PrestaShopException('The order address country is not active.')


ragnabt

Recommended Posts

Hi

 

I´m using prestashop 1.6.0.14, epay and onepagecheckout by zelarg

 

Everything is fine and works as expected when my shop is in developing mode (deactive) but when I activate my shop, then an exception occurs in the paymentmodule

 

this is in the log file

*ERROR* 2015/09/13 - 11:42:09: The order address country is not active. at line 383 in file classes/PaymentModule.php
 
 
The address are registred fine and the payment is fine, the order is in the backend. the only thing is that the order doesnt get a new status and therefore no orderconfirmation is sent to the customer. 
 
Please can anybody help?
 
 
Link to comment
Share on other sites

Hi 

 

It seems the problem is solved. 

 

My presta is in multistore mode and in the configuration file there are 3 rows with ps_geolocation_enabled. one with null null in id_shop and id_shop_group and enabled =0 and one with 1 in id_shop_group and null in id_shop and enabled=0 and then there was enabled =1 for id_shop_group 1 and id_shop (which is my running shop)

 

That must explain why it worked when the shop was deactivated.

 

I hope someone can use this if the same problem occurs, and note to self: Test payment on testshop in active mode :)

 

 

Link to comment
Share on other sites

  • 1 year later...
  • 5 months later...
  • 4 weeks later...

I get the following errors and greatly appreciate some assistance (I'm a novice). The only country that is set up is Canada, which is what I want, but I also have the problem of the shop reverting back to US on its own every so often and I haven't figured out why it's doing that. It also switches back to defaults for other settings as well such as deactivating a language.

 

Here are the errors I receive when entering an order. Please help! And thank you in advance!

 

[PrestaShopException]

The order address country is not active.
at line 391 in file classes/PaymentModule.php

386.                 $this->context->country = $context_country;

387.             }

388.

389.             if (!$this->context->country->active) {

390.                 PrestaShopLogger::addLog('PaymentModule::validateOrder - Country is not active', 3, null, 'Cart', (int)$id_cart, true);

391.                 throw new PrestaShopException('The order address country is not active.');

392.             }

393.

394.             if (self::DEBUG_MODE) {

395.                 PrestaShopLogger::addLog('PaymentModule::validateOrder - Payment is about to be added', 1, null, 'Cart', (int)$id_cart, true);

396.             }

  • PaymentModuleCore->validateOrder - [line 1160 - controllers/admin/AdminOrdersController.php] - [9 Arguments]

·         1155.                     $employee = new Employee((int)Context::getContext()->cookie->id_employee);

·         1156.                     $payment_module->validateOrder(

·         1157.                         (int)$cart->id, (int)$id_order_state,

·         1158.                         $cart->getOrderTotal(true, Cart::BOTH), $payment_module->displayName, $this->l('Manual order -- Employee:').' '.

·         1159.                         substr($employee->firstname, 0, 1).'. '.$employee->lastname, array(), null, false, $cart->secure_key

·         1160.                     );

·         1161.                     if ($payment_module->currentOrder) {

·         1162.                         Tools::redirectAdmin(self::$currentIndex.'&id_order='.$payment_module->currentOrder.'&vieworder'.'&token='.$this->token);

·         1163.                     }

·         1164.                 }

·         1165.             } else {

·         Argument [0]

·         844

·         Argument [1]

·         2

·         Argument [2]

·         10

·         Argument [3]

·         PayPal USA, Canada

·         Argument [4]

·         Manual order -- Employee J. M.

·         Argument [5]

·         Array

·         (

·         )

·        

·         Argument [6]

·        

·         Argument [7]

·        

·         Argument [8]

·         46cd6a1471971b076c76acxxxxxxx

  • AdminOrdersControllerCore->postProcess - [line 178 - classes/controller/Controller.php]

·         173.             if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {

·         174.                 $this->setMedia();

·         175.             }

·         176.

·         177.             // postProcess handles ajaxProcess

·         178.             $this->postProcess();

·         179.

·         180.             if (!empty($this->redirect_after)) {

·         181.                 $this->redirect();

·         182.             }

·         183.

  • ControllerCore->run - [line 367 - classes/Dispatcher.php]

·         362.             if (isset($params_hook_action_dispatcher)) {

·         363.                 Hook::exec('actionDispatcher', $params_hook_action_dispatcher);

·         364.             }

·         365.

·         366.             // Running controller

·         367.             $controller->run();

·         368.         } catch (PrestaShopException $e) {

·         369.             $e->displayMessage();

·         370.         }

·         371.     }

·         372.

  • DispatcherCore->dispatch - [line 58 - admin/index.php]

·         53. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) {

·         54.     $_REQUEST['controller'] = strtolower($_REQUEST['tab']);

·         55. }

·         56.

·         57. // Prepare and trigger admin dispatcher

·         58. Dispatcher::getInstance()->dispatch();

Link to comment
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
×
×
  • Create New...