cancel
Showing results for 
Search instead for 
Did you mean: 

Observer for custom CMS block in sidebar checkout page

Observer for custom CMS block in sidebar checkout page

I have a custom CMS block in the sidebar of checkout page with a checkbox selection where you can choose one of a few options. I would like the chosen option to be visible in the admin panel sales/order info after order is placed.

 

How can I make an Observer/Event to read the selection and maybe add the selection in text to Status History Comment?

 

6 REPLIES

Re: Observer for custom CMS block in sidebar checkout page

Hi @m_w1,


How you will handle actions from the CMS block?

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: Observer for custom CMS block in sidebar checkout page

Hello @Damian Culotta

 

Thank you for your reply! What do you mean, can you be more specific please?

 

It has no action at the moment, it is a simple CMS block using Modal widget to popup on click with multiple selections with check boxes or possibly a dropdown with options where one is chosen during order placement that is then visible in admin panel Order details

Re: Observer for custom CMS block in sidebar checkout page

No it doesn't do that, but that's what I want it to do

Re: Observer for custom CMS block in sidebar checkout page

Kindly refer below links to save your extra value in database from checkout,

https://magento.stackexchange.com/questions/126036/how-to-add-custom-checkout-fields-and-save-them-i...

First step is Save Your extra value in database.

After save field into database you can show your value in Sales order page.

If Issue Solved, Click Kudos/Accept As solutions.

Re: Observer for custom CMS block in sidebar checkout page

@Rakesh Jesadiya

 

Thank you for your help so far. This link only explains how to put it in the checkout_index_index.xml which is the shipping address form. I would like it seperated from that is why I have it in the sidebar.html under Order Summary, is there a way to keep it like that?

Re: Observer for custom CMS block in sidebar checkout page

You can take help from here how to save additional form field value in database and display in Sales order page.

https://github.com/sbodak/magento2-checkout-custom-form

 

You need to take reference from here. Its separate form and save value in database and display value in admin panel order info page.

If Issue Solved, Click Kudos/Accept As solutions.