View Single Post
  #4  
Old 09-26-2008, 02:33 AM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default Re: Customizing orders export excel format

There is no template to do so.
You should edit include/import_orders.php

Extra data is a serialized representation of product options.

find following lines
PHP Code:
# Export extra fields
            
$ef func_query("SELECT khash, value FROM $sql_tbl[order_extras] WHERE orderid = '$id'");
            if (!empty(
$ef)) {
                foreach (
$ef as $v) {
                    
$row['extra_field'][] = $v['khash'];
                    
$row['extra_value'][] = $v['value'];
                }
            }
            unset(
$ef); 
and comment it like this
PHP Code:
# Export extra fields
/*            $ef = func_query("SELECT khash, value FROM $sql_tbl[order_extras] WHERE orderid = '$id'");
            if (!empty($ef)) {
                foreach ($ef as $v) {
                    $row['extra_field'][] = $v['khash'];
                    $row['extra_value'][] = $v['value'];
                }
            }
            unset($ef); */ 
to disable extra data export




To change extra data export format you need not to comment but modify the lines above. It can be done like this
PHP Code:
# Export extra fields
  
$ef func_query("SELECT khash, value FROM $sql_tbl[order_extras] WHERE orderid = '$id'");
            if (!empty(
$ef)) {
                foreach (
$ef as $v) {
                    
$row['extra_field'] .= $v['khash'].':'.$v['value'].' ';
}
            }
            unset(
$ef); 



But it is necessary to disable serialization of this array
change the lines above in the same file
PHP Code:
"extra_field"            => array(
                
"array"        => true), 
to
PHP Code:
"extra_field"            => array(  ), 
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote