hummingbird icon indicating copy to clipboard operation
hummingbird copied to clipboard

hookActionCheckoutRender cannot be used anymore to manage (add / remove) checkout steps

Open bibips opened this issue 6 months ago • 0 comments

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.

Image

The problem is that the default steps are hardcoded in checkout-navigation.tpl , rather than being based on the steps in CheckoutProcess class.

bibips avatar Jun 17 '25 14:06 bibips