hummingbird
hummingbird copied to clipboard
hookActionCheckoutRender cannot be used anymore to manage (add / remove) checkout steps
The hook actionCheckoutRender cannot be used to add a new checkout step. This is a regression from the classic theme because this following code is not enough anymore to add a step :
public function hookActionCheckoutRender($hookParams)
{
$checkoutTestStep = new CheckoutTestStep();
$checkoutProcess = $hookParams['checkoutProcess'];
$steps = $checkoutProcess->getSteps();
$checkoutTestStep->setCheckoutProcess($checkoutProcess);
$newSteps = [
$steps[0],
$checkoutTestStep,
$steps[1],
$steps[2],
$steps[3],
];
$checkoutProcess->setSteps($newSteps);
}
Regarding the hummingbird theme, when we changed the checkout steps, the navigation menu was not updated, meaning customers could not access the additional steps.
The problem is that the default steps are hardcoded in checkout-navigation.tpl , rather than being based on the steps in CheckoutProcess class.