Prestashop stuck in carrier page

On a developing stage prestashop installation running version 

When following the checkout proces and trying to continue to the payment section the page simply reloads with no visible changes or notices, no errors on log even with debug mode activated.

After changing the checkout system from 5 to 1 steps I received notice on the last section of checkout that "terms and conditions must be accepted". But the terms and condition checkbox was not rendered.

After checking /themes/CustomThemFolder/order-carrier.tpl I noticed line 354

{if $conditions && $cms_id && (isset($advanced_payment_api) && !$advanced_payment_api)}

Where for some reason $advanced_payment_api was not being defined.

Solution if you want to conserve terms and conditions is to modify the line to 

{if $conditions && $cms_id }

If you don't want to keep terms and conditions the easiest way is to navigate to 

Preferences->orders  and deactivate terms of service.

Hope it helped! it took me lots of sweat and tears to find out!