cancel
Showing results for 
Search instead for 
Did you mean: 

manage order attributes from admin side in magento 2

manage order attributes from admin side in magento 2

how i handle the multiple order attributes & all functionality of order attributes from admin side? 

7 REPLIES 7

Re: manage order attributes from admin side in magento 2

Hi @ruchitanat3fed 

 

It's not clear what you want to ask can you be more specific so that we will understand your requirement.

 

Thanks

Re: manage order attributes from admin side in magento 2

Hello @ruchitanat3fed ,

 

You can not handle the order attributes from admin directly in Magento 2.

 

You have to do it by code or directly from the database.

 

You can also create a setup script in a custom module to handle it.

 

If it helps Click on Kudos and Accept as Solution.

 

Thank you

Hiren Patel

Re: manage order attributes from admin side in magento 2

hii @shubham_khandelwal1  i want to add order attributes on the checkout page which are handle by admin page.

Re: manage order attributes from admin side in magento 2

@Hiren_K_Patel yes,thank you but can you suggest me any reference link to do that..?

Re: manage order attributes from admin side in magento 2

Hello @ruchitanat3fed , 

 

What changes do you need in order to attribute ?

 

If it helps click on Kudos and Accept as Solution.

 

Thank you

Hiren Patel

Re: manage order attributes from admin side in magento 2

hii @Hiren_K_Patel i want to add functionality like if i want to add order attribute of datetime type from admin side only then it will display on checkout page otherwise not.

Re: manage order attributes from admin side in magento 2

Hello @ruchitanat3fed ,

 

I think you need configuration in admin to manage the visibility of custom attribute in checkout page.

 

For this first, you have to create a custom admin configuration.

 

You can create a new admin configuration using your custom module and the following link help you in this.

 

https://devdocs.magento.com/guides/v2.3/ext-best-practices/tutorials/dynamic-row-system-config.html 

 

After that, you must create a helper or model to detect (get) this config value.

 

The following link will help you to put the new custom field in checkout page.

https://devdocs.magento.com/guides/v2.3/howdoi/checkout/checkout_custom_checkbox.html

 

There you can set the condition as per config value for visibility.

 

For example. you created one config under the Sales tab with the name : Enable date field in checkout and config field type is enable/disable.

 

In step1 of custom field declaration, you can set condition if the config field is enabled then do further code and implementation or return.

 

 

If this helps you click on Kudos and Accept as Solution.

 

Thank you

Hiren Patel