@shacker Hello dear,
Can you a little explain me what conditions for CheckoutPersonalInformationStep.?
I have payment module on PS 8.1.6 with trouble. Every time after transaction, module erase customer passwd.
// walk through each step, and submit same data from previous cart private function skipCheckoutFormSteps() { $customer = new Customer($this->context->cookie->id_customer); foreach ($this->checkoutProcess->getSteps() as $step) { if ($step instanceof CheckoutPersonalInformationStepCore && !$step->isComplete()) { $request = array( 'id_gender' => $customer->id_gender, 'firstname' => $customer->firstname, 'lastname' => $customer->lastname, 'email' => $customer->email, 'password' => '', 'birthday' => ($customer->birthday !== '0000-00-00') ? $customer->birthday : '', 'customer_privacy' => 1, 'psgdpr' => 1, 'submitCreate' => 1, 'continue' => 1 ); //$step->handleRequest($request); //$this->saveDataToPersist($this->checkoutProcess); //$this->checkoutProcess // ->setNextStepReachable() // ->markCurrentStep(); }
As you can see I commented part of output and no problem with passwords. But steps not skipped.
This module problem from hardcoded 'submitCreate' => 1, conditions. Every time module works with customer as new customer.
public function handleRequest(array $requestParameters = [])
function have 'submitCreate', 'submitLogin' and array_key_exists('login', $requestParameters) conditions
Please tel me how is different need work with guest, customer-loggedIn, customer-loggedOut ... ?
[SOLVED]
$request = array( 'id_gender' => $customer->id_gender, 'firstname' => $customer->firstname, 'lastname' => $customer->lastname, 'email' => $customer->email, 'birthday' => ($customer->birthday !== '0000-00-00') ? $customer->birthday : '', 'customer_privacy' => 1, 'psgdpr' => 1, 'continue' => 1 ); if ($customer->is_guest) { $request['submitCreate'] = 1; } else { $request['submitLogin'] = 1; }