Add extra custom field to backend order page?

  • Posts: 151
  • Thank you received: 9
12 years 2 months ago #61962

Hi,

This may be a strange question but I still want to ask it. ;)

I have added a custom field that users need to fill out when they register themselves to order a product. (in fact it's a dropdown with 20 options to choose from). This custom field is asked only once while registering.

How can I show this extra custom field as a column on the orders overview page?
And secondly, how do I add a filter dropdown on that page that contains all the custom field items to select from?

Thank you,
Maurice

Last edit: 12 years 2 months ago by Maurice.

Please Log in or Create an account to join the conversation.

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 2 months ago #62050

Hi,

If you want to show a custom field value of a user (user table) on the orders details page of the backend, you can edit the file "form" of the view "order" for your back end template and add such code:
<?php $echo $this->order->customer->CUSTOM_FIELD; ?>

where CUSTOM_FIELD should be replaced by the custom field column name.

You can't add a filter like that. The filters on products listings of the front end are really complex. You can't plug them with one or two lines of code to a listing which is not meant for that.

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum