Forum

Thread tagged as: Question, Shop

Perch shop checkout no password, no payment

Is it possible to use one form to simultaneously create a user account (I understand this is required for any order) while also processing an order? Something like the combination of customer_create_passwordless.html and /checkout/confirm.html (without the need to accept T&C's).

My understanding is that the customer_create_passwordless form registers the customer and then the checkout/confirm form confirms the order, however I'd like to do this in one step. Is that possible?

My client sells fabrics and would like website visitors to be able to order free samples from the site by simply providing their name, email and address details.

Hamish Irving

Hamish Irving 1 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, it's possible.

and then the checkout/confirm form confirms the order

Not really - the perch_shop_checkout() function places the order. What happens after that depends on your gateway.

Hi Drew, thanks for the response.

I'll be using the manual gateway with perch_shop_checkout() but I guess what I can't figure out is what triggers that function (my guess is that it was the form id="confirm" on checkout/confirm.html template?

Could I use the customer_create_passwordless form to register the customer and then change that register form action to a new page with the perch_shop_checkout() function? Would that work, is there a better way?

I've been trying to follow along the example on the Nest site you have up on github

Drew McLellan

Drew McLellan 2638 points
Perch Support

You trigger the function - place it in your code at the point you want to perform the checkout.

Could I use the customer_create_passwordless form to register the customer and then change that register form action to a new page with the perch_shop_checkout() function?

You'd be better to use the next attribute on the form, so that the user is moved forward in the process once registration is complete. Otherwise you'd have no way to deal with validation errors because you'd be on a different page.

You'd be better to use the next attribute on the form,

Is that the same as a PerchSystem::redirect? Is there documentation on the next attribute?

Drew McLellan

Drew McLellan 2638 points
Perch Support

On your form tag:

<perch:form next="/next/page/">

Thanks Drew