FranciscoVillen Posted June 26, 2013 Share Posted June 26, 2013 (edited) 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 July 1, 2013 by FranciscoVillen (see edit history) Link to comment Share on other sites More sharing options...
FranciscoVillen Posted June 28, 2013 Author Share Posted June 28, 2013 Nobody had this problem? Link to comment Share on other sites More sharing options...
FranciscoVillen Posted July 1, 2013 Author Share Posted July 1, 2013 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 More sharing options...
brudracz Posted October 23, 2013 Share Posted October 23, 2013 perfect, thank you!!! Link to comment Share on other sites More sharing options...
Recommended Posts