[Skip to main content](#vessel-content)

#   How to export custom (user) field?

##

- **[Hikarioo](/forum/user/56346-hikarioo "View Hikarioo's Profile")**
- [![Hikarioo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/56346-hikarioo "View Hikarioo's Profile") Topic Author
- [ Offline](/forum/user/56346-hikarioo)

Less More

- Posts: 50
- Thank you received: 1
-
-

8 years 7 months ago -  8 years 7 months ago [\#290899](#290899) by [Hikarioo](/forum/user/56346-hikarioo "View Hikarioo's Profile")  *[How to export custom (user) field?](/forum/35-orders-management/894367-how-to-export-custom-user-field#290899 "-- HikaShop version -- : 3.4.0  Checkout is set up in guest mode. The customer name field comes from the custom field of the table &quot;user&quot;. When I export a sales report the name is not listed.  1. How can I export the custom field? 2. Is there a way to export only certain fields or customize the export to have only the custom user&#95;name field and user&#95;email, order&#95;status, order&#95;number, order&#95;full&#95;price, item1&#95;order&#95;product&#95;quantity, item1&#95;order&#95;product&#95;code The default export template is fantastic, it has all the information I would want but for the report, I was asked to export only 8 fields. It would speed things up a lot for me if I didn't have to edit the export every single time. 3. How can I add a column in order / listing.php that would list item name and custom field called &quot;name&quot; for a guest checkout user? I can see hikashop&#95;user is in the name column and hikashop&#95;order&#95;product has the info I need in order&#95;product&#95;quantity, order&#95;product&#95;name  I tried adding order&#95;product&#95;quantity; ?&gt; and order&#95;product; ?&gt; but nothing displays.  How would I add that to this page?  I know this is very basic stuff for you. I'm sorry to ask but any pointers or help would be great!")* was created by *[Hikarioo](/forum/user/56346-hikarioo "View Hikarioo's Profile")*

-- HikaShop version -- : 3.4.0

Checkout is set up in guest mode. The customer name field comes from the custom field of the table "user". When I export a sales report the name is not listed.

1. How can I export the custom field?
2. Is there a way to export only certain fields or customize the export to have only the custom user_name field and
user_email, order_status, order_number, order_full_price, item1_order_product_quantity, item1_order_product_code
The default export template is fantastic, it has all the information I would want but for the report, I was asked to export only 8 fields. It would speed things up a lot for me if I didn't have to edit the export every single time.
3. How can I add a column in order / listing.php that would list item name and custom field called "name" for a guest checkout user?
I can see **hikashop\_user** is in the **name** column and **hikashop\_order\_product** has the info I need in **order\_product\_quantity, order\_product\_name**  I tried adding &lt;?php echo $row-&gt;order_product_quantity; ?&gt; and &lt;?php echo $row-&gt;order_product; ?&gt; but nothing displays.

How would I add that to this page?

I know this is very basic stuff for you. I'm sorry to ask but any pointers or help would be great!
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 3.4.0 * @author hikashop.com * @copyright (C) 2010-2018 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;div class="iframedoc" id="iframedoc"&gt;&lt;/div&gt; &lt;form action="&lt;?php echo hikashop_completeLink('order'); ?&gt;" method="post" name="adminForm" id="adminForm"&gt; &lt;?php if(HIKASHOP_BACK_RESPONSIVE) { ?&gt; &lt;div class="row-fluid"&gt; &lt;div class="span4"&gt; &lt;div class="input-prepend input-append"&gt; &lt;span class="add-on"&gt;&lt;i class="icon-filter"&gt;&lt;/i&gt;&lt;/span&gt; &lt;input type="text" name="search" id="search" value="&lt;?php echo $this-&gt;escape($this-&gt;pageInfo-&gt;search);?&gt;" class="text_area" /&gt; &lt;button class="btn" onclick="document.adminForm.limitstart.value=0;this.form.submit();"&gt;&lt;i class="icon-search"&gt;&lt;/i&gt;&lt;/button&gt; &lt;button class="btn" onclick="document.adminForm.limitstart.value=0;document.getElementById('search').value='';this.form.submit();"&gt;&lt;i class="icon-remove"&gt;&lt;/i&gt;&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="span8"&gt; &lt;?php } else { ?&gt; &lt;table&gt; &lt;tr&gt; &lt;td width="100%"&gt; &lt;?php echo JText::_('FILTER'); ?&gt;: &lt;input type="text" name="search" id="search" value="&lt;?php echo $this-&gt;escape($this-&gt;pageInfo-&gt;search);?&gt;" class="text_area" /&gt; &lt;button class="btn" onclick="document.adminForm.limitstart.value=0;this.form.submit();"&gt;&lt;?php echo JText::_( 'GO' ); ?&gt;&lt;/button&gt; &lt;button class="btn" onclick="document.adminForm.limitstart.value=0;document.getElementById('search').value='';this.form.submit();"&gt;&lt;?php echo JText::_( 'RESET' ); ?&gt;&lt;/button&gt; &lt;/td&gt; &lt;td nowrap="nowrap"&gt; &lt;?php } foreach($this-&gt;extrafilters as $name =&gt; $filterObj) { echo $filterObj-&gt;displayFilter($name, $this-&gt;pageInfo-&gt;filter); } if(!is_numeric($this-&gt;pageInfo-&gt;filter-&gt;filter_start) &amp;&amp; !empty($this-&gt;pageInfo-&gt;filter-&gt;filter_start)) $this-&gt;pageInfo-&gt;filter-&gt;filter_start = strtotime($this-&gt;pageInfo-&gt;filter-&gt;filter_start); if(!is_numeric($this-&gt;pageInfo-&gt;filter-&gt;filter_end) &amp;&amp; !empty($this-&gt;pageInfo-&gt;filter-&gt;filter_end)) $this-&gt;pageInfo-&gt;filter-&gt;filter_end = strtotime($this-&gt;pageInfo-&gt;filter-&gt;filter_end); echo JText::_('FROM').' '; echo JHTML::_('calendar', hikashop_getDate((@$this-&gt;pageInfo-&gt;filter-&gt;filter_start?@$this-&gt;pageInfo-&gt;filter-&gt;filter_start:''),'%Y-%m-%d'), 'filter_start','period_start','%Y-%m-%d',array('size'=&gt;'10','onchange'=&gt;'document.adminForm.submit();')); echo ' '.JText::_('TO').' '; echo JHTML::_('calendar', hikashop_getDate((@$this-&gt;pageInfo-&gt;filter-&gt;filter_end?@$this-&gt;pageInfo-&gt;filter-&gt;filter_end:''),'%Y-%m-%d'), 'filter_end','period_end','%Y-%m-%d',array('size'=&gt;'10','onchange'=&gt;'document.adminForm.submit();')); echo $this-&gt;payment-&gt;display("filter_payment",$this-&gt;pageInfo-&gt;filter-&gt;filter_payment,false); $this-&gt;category-&gt;multiple = true; echo $this-&gt;category-&gt;display("filter_status",$this-&gt;pageInfo-&gt;filter-&gt;filter_status,false); $this-&gt;category-&gt;multiple = false; if(HIKASHOP_BACK_RESPONSIVE) { ?&gt; &lt;/div&gt; &lt;/div&gt; &lt;?php } else { ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;?php } ?&gt; &lt;table id="hikashop_order_listing" class="adminlist table table-striped table-hover" cellpadding="1"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th class="hikashop_order_num_title title titlenum"&gt; &lt;?php echo JText::_( 'HIKA_NUM' );?&gt; &lt;/th&gt; &lt;th class="hikashop_order_select_title title titlebox"&gt; &lt;input type="checkbox" name="toggle" value="" onclick="hikashop.checkAll(this);" /&gt; &lt;/th&gt; &lt;th class="hikashop_order_number_title title"&gt; &lt;?php echo JHTML::_('grid.sort', JText::_('ORDER_NUMBER'), 'b.order_number', $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir,$this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value ); ?&gt; &lt;/th&gt; &lt;th class="hikashop_order_customer_title title"&gt; &lt;?php echo JHTML::_('grid.sort', JText::_('CUSTOMER'), 'c.name', $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir,$this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value ); ?&gt; &lt;/th&gt; &lt;th class="hikashop_order_payment_title title"&gt; &lt;?php echo JHTML::_('grid.sort', JText::_('PAYMENT_METHOD'), 'b.order_payment_method', $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir,$this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value ); ?&gt; &lt;/th&gt; &lt;th class="hikashop_order_date_title title"&gt; &lt;?php echo JHTML::_('grid.sort', JText::_('DATE'), 'b.order_created', $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir,$this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value ); ?&gt; &lt;/th&gt; &lt;th class="hikashop_order_modified_title title"&gt; &lt;?php echo JHTML::_('grid.sort', JText::_('HIKA_LAST_MODIFIED'), 'b.order_modified', $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir,$this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value ); ?&gt; &lt;/th&gt; &lt;th class="hikashop_order_status_title title"&gt; &lt;?php echo JHTML::_('grid.sort', JText::_('ORDER_STATUS'), 'b.order_status', $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir, $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value ); ?&gt; &lt;/th&gt; &lt;th class="hikashop_order_total_title title"&gt; &lt;?php echo JHTML::_('grid.sort', JText::_('HIKASHOP_TOTAL'), 'b.order_full_price', $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir, $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value ); ?&gt; &lt;/th&gt; &lt;?php $count_fields=0; if(hikashop_level(2) &amp;&amp; !empty($this-&gt;fields)){ foreach($this-&gt;fields as $field){ $count_fields++; echo '&lt;th class="hikashop_order_'.$field-&gt;field_namekey.'_title title"&gt;'.JHTML::_('grid.sort', $this-&gt;fieldsClass-&gt;trans($field-&gt;field_realname), 'b.'.$field-&gt;field_namekey, $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir,$this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value ).'&lt;/th&gt;'; } } $count_extrafields = 0; if(!empty($this-&gt;extrafields)) { foreach($this-&gt;extrafields as $namekey =&gt; $extrafield) { echo '&lt;th class="hikashop_order_'.$namekey.'_title title"&gt;'.$extrafield-&gt;name.'&lt;/th&gt;'."\r\n"; } $count_extrafields = count($this-&gt;extrafields); }?&gt; &lt;th class="hikashop_order_id_title title"&gt; &lt;?php echo JHTML::_('grid.sort', JText::_( 'ID' ), 'b.order_id', $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir, $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value ); ?&gt; &lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tfoot&gt; &lt;tr&gt; &lt;td colspan="&lt;?php echo 10 + $count_fields + $count_extrafields; ?&gt;"&gt; &lt;?php echo $this-&gt;pagination-&gt;getListFooter(); ?&gt; &lt;?php echo $this-&gt;pagination-&gt;getResultsCounter(); ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tfoot&gt; &lt;tbody&gt; &lt;?php $target = ''; if($this-&gt;popup) $target = '" target="_top'; $k = 0; for($i = 0,$a = count($this-&gt;rows);$i&lt;$a;$i++){ $row =&amp; $this-&gt;rows[$i]; ?&gt; &lt;tr class="row&lt;?php echo $k; ?&gt;"&gt; &lt;td class="hikashop_order_num_value"&gt; &lt;?php echo $this-&gt;pagination-&gt;getRowOffset($i); ?&gt; &lt;/td&gt; &lt;td class="hikashop_order_select_value"&gt; &lt;?php echo JHTML::_('grid.id', $i, $row-&gt;order_id ); ?&gt; &lt;/td&gt; &lt;td class="hikashop_order_number_value"&gt; &lt;?php if($this-&gt;manage){ ?&gt; &lt;a href="&lt;?php echo hikashop_completeLink('order&amp;task=edit&amp;cid[]='.$row-&gt;order_id.'&amp;cancel_redirect='.urlencode(base64_encode(hikashop_completeLink('order')))).$target; ?&gt;"&gt; &lt;?php } ?&gt; &lt;?php echo $row-&gt;order_number; ?&gt; &lt;?php if($this-&gt;manage){ ?&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;/td&gt; &lt;td class="hikashop_order_customer_value"&gt; &lt;?php if(empty($row-&gt;address_firstname) &amp;&amp; empty($row-&gt;address_lastname)){ echo $row-&gt;name; }else{ echo $row-&gt;address_firstname.' '.$row-&gt;address_middle_name.' '.$row-&gt;address_lastname; } if(!empty($row-&gt;username)){ echo ' ( '.$row-&gt;username.' )'; } echo '&lt;br/&gt;'; if(!empty($row-&gt;user_id)){ $url = hikashop_completeLink('user&amp;task=edit&amp;cid[]='.$row-&gt;user_id); $config =&amp; hikashop_config(); if(hikashop_isAllowed($config-&gt;get('acl_user_manage','all'))) echo $row-&gt;user_email.'&lt;a href="'.$url.$target.'"&gt;&lt;img src="'.HIKASHOP_IMAGES.'edit.png" alt="edit"/&gt;&lt;/a&gt;'; }elseif(!empty($row-&gt;user_email)){ echo $row-&gt;user_email; } ?&gt; &lt;/td&gt; &lt;td class="hikashop_order_payment_value"&gt; &lt;?php if(!empty($row-&gt;order_payment_method)){ if(!empty($this-&gt;payments[$row-&gt;order_payment_id])){ echo $this-&gt;payments[$row-&gt;order_payment_id]-&gt;payment_name; }elseif(!empty($this-&gt;payments[$row-&gt;order_payment_method])){ echo $this-&gt;payments[$row-&gt;order_payment_method]-&gt;payment_name; }else{ echo $row-&gt;order_payment_method; } } ?&gt; &lt;/td&gt; &lt;td class="hikashop_order_date_value"&gt; &lt;?php echo hikashop_getDate($row-&gt;order_created,'%d %B %Y %H:%M');?&gt; &lt;/td&gt; &lt;td class="hikashop_order_modified_value"&gt; &lt;?php echo hikashop_getDate($row-&gt;order_modified,'%d %B %Y %H:%M');?&gt; &lt;/td&gt; &lt;td class="hikashop_order_status_value"&gt; &lt;?php if($this-&gt;manage &amp;&amp; !$this-&gt;popup){ $doc = JFactory::getDocument(); $doc-&gt;addScriptDeclaration(' var '."default_filter_status_".$row-&gt;order_id.'=\''.$row-&gt;order_status.'\'; '); echo $this-&gt;category-&gt;display("filter_status_".$row-&gt;order_id,$row-&gt;order_status,'onchange="if(this.value==default_filter_status_'.$row-&gt;order_id.'){return;} hikashop.openBox(\'status_change_link\',\''.hikashop_completeLink('order&amp;task=changestatus&amp;order_id='.$row-&gt;order_id,true).'&amp;status=\'+this.value);this.value=default_filter_status_'.$row-&gt;order_id.';if(typeof(jQuery)!=\'undefined\'){jQuery(this).trigger(\'liszt:updated\');}"'); } else { echo $row-&gt;order_status; } ?&gt; &lt;/td&gt; &lt;td class="hikashop_order_total_value"&gt; &lt;?php echo $this-&gt;currencyHelper-&gt;format($row-&gt;order_full_price,$row-&gt;order_currency_id);?&gt; &lt;/td&gt; &lt;?php if(hikashop_level(2) &amp;&amp; !empty($this-&gt;fields)){ foreach($this-&gt;fields as $field){ $namekey = $field-&gt;field_namekey; echo '&lt;td class="hikashop_order_'.$namekey.'_value"&gt;'; if(!empty($row-&gt;$namekey)) echo $this-&gt;fieldsClass-&gt;show($field,$row-&gt;$namekey); echo '&lt;/td&gt;'; } } if(!empty($this-&gt;extrafields)) { foreach($this-&gt;extrafields as $namekey =&gt; $extrafield) { $value = ''; if(!empty($extrafield-&gt;value)) { $n = $extrafield-&gt;value; $value = $row-&gt;$n; } else if(!empty($extrafield-&gt;obj)) { $n = $extrafield-&gt;obj; $value = $n-&gt;showfield($this, $namekey, $row); } echo '&lt;td class="hikashop_order_'.$namekey.'_value"&gt;'.$value.'&lt;/td&gt;'; } } ?&gt; &lt;td class="hikashop_order_id_value"&gt; &lt;?php echo $row-&gt;order_id; ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php $k = 1-$k; } ?&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;?php if($this-&gt;manage &amp;&amp; !$this-&gt;popup){ echo $this-&gt;popupHelper-&gt;display( JText::_('ORDER_STATUS'), 'ORDER_STATUS', '/', 'status_change_link', 760, 480, 'style="display:none;"', '', 'link' ); } ?&gt; &lt;input type="hidden" name="option" value="&lt;?php echo HIKASHOP_COMPONENT; ?&gt;" /&gt; &lt;input type="hidden" name="task" value="" /&gt; &lt;input type="hidden" name="ctrl" value="&lt;?php echo hikaInput::get()-&gt;getCmd('ctrl'); ?&gt;" /&gt; &lt;input type="hidden" name="boxchecked" value="0" /&gt; &lt;input type="hidden" name="filter_product" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;filter_product; ?&gt;"/&gt; &lt;input type="hidden" name="filter_order" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value; ?&gt;" /&gt; &lt;input type="hidden" name="filter_order_Dir" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir; ?&gt;" /&gt; &lt;?php echo JHTML::_( 'form.token' ); ?&gt; &lt;/form&gt;

Last edit: 8 years 7 months ago by [Hikarioo](/forum/user/56346-hikarioo "View Hikarioo's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5NDM2Ny1ob3ctdG8tZXhwb3J0LWN1c3RvbS11c2VyLWZpZWxkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

8 years 7 months ago [\#290902](#290902) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to export custom (user) field?](/forum/35-orders-management/894367-how-to-export-custom-user-field#290902 "-- HikaShop version -- : 3.4.0  Checkout is set up in guest mode. The customer name field comes from the custom field of the table &quot;user&quot;. When I export a sales report the name is not listed.  1. How can I export the custom field? 2. Is there a way to export only certain fields or customize the export to have only the custom user&#95;name field and user&#95;email, order&#95;status, order&#95;number, order&#95;full&#95;price, item1&#95;order&#95;product&#95;quantity, item1&#95;order&#95;product&#95;code The default export template is fantastic, it has all the information I would want but for the report, I was asked to export only 8 fields. It would speed things up a lot for me if I didn't have to edit the export every single time. 3. How can I add a column in order / listing.php that would list item name and custom field called &quot;name&quot; for a guest checkout user? I can see hikashop&#95;user is in the name column and hikashop&#95;order&#95;product has the info I need in order&#95;product&#95;quantity, order&#95;product&#95;name  I tried adding order&#95;product&#95;quantity; ?&gt; and order&#95;product; ?&gt; but nothing displays.  How would I add that to this page?  I know this is very basic stuff for you. I'm sorry to ask but any pointers or help would be great!")*

Hi,

You can use the mass action system to perform exports:
[ www.hikashop.com/support/documentation/167-massaction-form.html](https://www.hikashop.com/support/documentation/167-massaction-form.html)
Wheny ou configure the export action in your mass action, you can select the columns that you want exported.
So you'll be able to do it with that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5NDM2Ny1ob3ctdG8tZXhwb3J0LWN1c3RvbS11c2VyLWZpZWxkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Hikarioo](/forum/user/56346-hikarioo "View Hikarioo's Profile")**
- [![Hikarioo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/56346-hikarioo "View Hikarioo's Profile") Topic Author
- [ Offline](/forum/user/56346-hikarioo)

Less More

- Posts: 50
- Thank you received: 1
-
-

8 years 7 months ago [\#290983](#290983) by [Hikarioo](/forum/user/56346-hikarioo "View Hikarioo's Profile")  Replied by *[Hikarioo](/forum/user/56346-hikarioo "View Hikarioo's Profile")* on topic *[How to export custom (user) field?](/forum/35-orders-management/894367-how-to-export-custom-user-field#290983 "-- HikaShop version -- : 3.4.0  Checkout is set up in guest mode. The customer name field comes from the custom field of the table &quot;user&quot;. When I export a sales report the name is not listed.  1. How can I export the custom field? 2. Is there a way to export only certain fields or customize the export to have only the custom user&#95;name field and user&#95;email, order&#95;status, order&#95;number, order&#95;full&#95;price, item1&#95;order&#95;product&#95;quantity, item1&#95;order&#95;product&#95;code The default export template is fantastic, it has all the information I would want but for the report, I was asked to export only 8 fields. It would speed things up a lot for me if I didn't have to edit the export every single time. 3. How can I add a column in order / listing.php that would list item name and custom field called &quot;name&quot; for a guest checkout user? I can see hikashop&#95;user is in the name column and hikashop&#95;order&#95;product has the info I need in order&#95;product&#95;quantity, order&#95;product&#95;name  I tried adding order&#95;product&#95;quantity; ?&gt; and order&#95;product; ?&gt; but nothing displays.  How would I add that to this page?  I know this is very basic stuff for you. I'm sorry to ask but any pointers or help would be great!")*

Thanks. Any ideas why &lt;?php echo $row-&gt;order_product_quantity; ?&gt; and &lt;?php echo $row-&gt;order_product; ?&gt; doesn't display anything on order / listing.php?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5NDM2Ny1ob3ctdG8tZXhwb3J0LWN1c3RvbS11c2VyLWZpZWxkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

8 years 7 months ago [\#290985](#290985) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to export custom (user) field?](/forum/35-orders-management/894367-how-to-export-custom-user-field#290985 "-- HikaShop version -- : 3.4.0  Checkout is set up in guest mode. The customer name field comes from the custom field of the table &quot;user&quot;. When I export a sales report the name is not listed.  1. How can I export the custom field? 2. Is there a way to export only certain fields or customize the export to have only the custom user&#95;name field and user&#95;email, order&#95;status, order&#95;number, order&#95;full&#95;price, item1&#95;order&#95;product&#95;quantity, item1&#95;order&#95;product&#95;code The default export template is fantastic, it has all the information I would want but for the report, I was asked to export only 8 fields. It would speed things up a lot for me if I didn't have to edit the export every single time. 3. How can I add a column in order / listing.php that would list item name and custom field called &quot;name&quot; for a guest checkout user? I can see hikashop&#95;user is in the name column and hikashop&#95;order&#95;product has the info I need in order&#95;product&#95;quantity, order&#95;product&#95;name  I tried adding order&#95;product&#95;quantity; ?&gt; and order&#95;product; ?&gt; but nothing displays.  How would I add that to this page?  I know this is very basic stuff for you. I'm sorry to ask but any pointers or help would be great!")*

Hi,

$row is an object with the data of the order in order / listing.php
order_product_quantity is an attribute of a product of an order and not of an order.
And order_product doesn't exist at all in $row.
$row doesn't contain any information on the products.
If you want to get the information on the products of an order, you would have to run a MySQL query on the hikashop_order_product table with a condition where the order_id would be equal to $row-&gt;order_id
That would give you a list of all the products and you could then sum their order_product_quantity or display information of each product of the orders, etc.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5NDM2Ny1ob3ctdG8tZXhwb3J0LWN1c3RvbS11c2VyLWZpZWxkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.056 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
