Skip to content

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

@bibips

Description

@bibips

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ImprovementEnhances existing features or code.
    No fields configured for Opportunity.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions