Jump to content

Create customer/cart/order programatically - Create checkout module


KoreLewi

Recommended Posts

Hi!

I want to create a "quick checkout" functionality for my 1.7.7 Prestashop.
I have added a button to the product page which, which opens a popup where I enter some information to place my order.

The problem I ran into was that nowhere do I find what steps I should follow.

As I think:

  1. Add product to cart on button click
  2. Open popup: enter customer data -> create customer (i have call an ajax frontcontroller)
    1. how can i add the new customer to context and context->cart?
    2. how do i link the cart to the customer? is enough this line: $this->context->cart->id_customer = $customer->id?
  3. Same for the address. What should the new address be connected with? And how? Is it enough to add to the address the $address->id_customer?

Not to mention the delivery methods and the shipping methods .. 

Based on my memories, there was a module called ps_checkout in an older version where they were in one place. But now I can't find it anywhere.

I hope someone can help, even someone who has already created a checkout module on the order in which the steps should be performed.

Thank you!

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...