Jump to content

how override CheckoutPersonalInformationStep


corsik

Recommended Posts

Tell me how to override CheckoutPersonalInformationStep, constructor produces an error?

Type error: Argument 3 passed to CheckoutPersonalInformationStepCore::__construct() must be an instance of CustomerLoginForm, none given, called in 

Link to comment
Share on other sites

Hi,

It's suggested to share your PrestaShop version for technical queries.  I have checked the CheckoutPersonalInformationStepCore class & it requires 4 parameters & all of them are mandatory. 

Kindly provide the following parameters.

$this->context, $this->translator, $this->makeLoginForm(), $this->makeCustomerForm()

I hope it will help.

 

Link to comment
Share on other sites

  • 4 years later...

It seems  the __construct can not be overriden, because even if you could do it by calling the Abstractclass constructor straight insterad of the parents constructor (which needs those params), that class has a lot of private properties and it crashes because they can not be declared in the extended class. It happened to me trying to set the default property show_form to true, it can not be done by chaning the property value nor setting it in the constructor, it had to be changed in the template by assignign the value in smarty :S

If the class would have protected properties then it could be done though

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...