Jump to content

Checkout: Processing delivery message in payment step


c0rw

Recommended Posts

Hello, 

I made workaround, that delivery message is sent when submiting (finishing) checkout. However I don't know now what comes after checkout, where should I add (and how) processing of this message.

I know, that by default delivery message is processed between delivery and payment step using setMessage() method using getCheckoutSession() (ref. to https://github.com/PrestaShop/PrestaShop/pull/7833/files). However looks like after after selecting payment and firing submit(), checkout steps are not processed anymore.

Please, can you guide me where should I focus to add delivery message processing (so it's saved with newly created order)?

Thank you,

Radek

Edited by c0rw (see edit history)
Link to comment
Share on other sites

I will give more details, to make my question more clear:

Delivery message is by default processed in classes/checkout/CheckoutDeliveryStep.php - here is code:

if (isset($requestParams['delivery_message'])) {
    $this->getCheckoutSession()->setMessage($requestParams['delivery_message']);
}

This is proessed everytime when checkout page is loaded (I use one page checkout). 

But it looks like when submiting last step (payment), checkout class is not called anymore and other process is taken. So I can not use solution above for saving message.

What I would need to know, where the process continues? Is a new order created and saved in OrderCore? Should I define there delivery message? Or is it part of Cart object?

Please any help would be very appriciated.

 

Link to comment
Share on other sites

  • 3 weeks later...

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