Jump to content

[Solved] Error: please choose a carrier


Recommended Posts

Hello, I have searched about this problem in the forums and forge.prestashop but I didn't find a solution.

 

The problem is in prestashop 1.5 with One Page Checkout selected, the payment options don't refresh automatically.

 

I create an account and a carrier method is selected by default, but the payment options shows "Error: please choose a carrier". If I select another carrier method or the same, I accept the checkbox of terms of sale or I refresh the page, the payment options show up.

 

I read in forge.prestashop it could be solved changing controllers/front/OrderOpcController.php and themes/default/js/order-opc.js but the links to the solution don't work.

 

Any ideas about this problem?.

 

Thanks.

Edited by FranciscoVillen (see edit history)
Link to comment
Share on other sites

Today, I have reached the solution:

 

An override of OrderOpcController.php is needed.

 

In the function _getPaymentMethods():

 

Before:

if (!$this->context->cart->getDeliveryOption(null, true) && !$this->context->cart->isVirtualCart())
		return '<p class="warning">'.Tools::displayError('Error: please choose a carrier').'</p>';

After:

if (!$this->context->cart->getDeliveryOption(null, false) && !$this->context->cart->isVirtualCart())
		return '<p class="warning">'.Tools::displayError('Error: please choose a carrier').'</p>';

 

I had to change the second parameter of getDeliveryOption from true to false.

Link to comment
Share on other sites

  • 3 months later...
×
×
  • Create New...