- Posts: 54
- Thank you received: 0
Show & be able to edit custom fields on order page
- eileensemporium
-
Topic Author
- Offline
Less
More
10 years 4 months ago #240615
by eileensemporium
-- HikaShop version -- : HikaShop Business 2.6.3 [1605112330]
-- Joomla version -- : Joomla! 3.4.8 Stable [ Ember ] 24-December-2015 19:30 GMT
-- PHP version -- : 5.4
Please could you tell me how to add custom fields that I have created in the user table in the Customer area of the orders page and ideally be able to edit them there
-- Joomla version -- : Joomla! 3.4.8 Stable [ Ember ] 24-December-2015 19:30 GMT
-- PHP version -- : 5.4
Please could you tell me how to add custom fields that I have created in the user table in the Customer area of the orders page and ideally be able to edit them there
Please Log in or Create an account to join the conversation.
10 years 4 months ago #240617
by nicolas
Replied by nicolas on topic Show & be able to edit custom fields on order page
Hi,
For the display of the values, you'll have to edit the file "show" of the view "order" via the menu Display>Views and you can add such code at the beginning:
Of course, you need to replace column_name_field_1 and column_name_field_2 by the actually column names of your custom fields.
For the edition it's more complex as there is no system in place to handle that at all. You would have to hire a developer to work on that for you.
For the display of the values, you'll have to edit the file "show" of the view "order" via the menu Display>Views and you can add such code at the beginning:
Code:
<?php
if(empty($this->extra_data))
$this->extra_data = array();
if(empty($this->extra_data['user']))
$this->extra_data['user'] = array();
$this->extra_data['user']['column_name_field_1'] = array('title' => 'Title for field 1', 'content' => $this->order->customer->column_name_field_1);
$this->extra_data['user']['column_name_field_2'] = array('title' => 'Title for field 2', 'content' => $this->order->customer->column_name_field_2);
?>
For the edition it's more complex as there is no system in place to handle that at all. You would have to hire a developer to work on that for you.
Please Log in or Create an account to join the conversation.
- eileensemporium
-
Topic Author
- Offline
Less
More
- Posts: 54
- Thank you received: 0
10 years 4 months ago #241243
by eileensemporium
Replied by eileensemporium on topic Show & be able to edit custom fields on order page
Thanks that worked perfectly once I remembered to edit the correct template version of the file!
Please Log in or Create an account to join the conversation.
Time to create page: 0.182 seconds