1. Monica7
  2. RO CSVI
  3. Saturday, 28 May 2016
  4.  Subscribe via email
Greetings,

My Virtuemart Order Export data file requires a mandatory 2nd header row (as attached).

The information in it is static - It doesn't change at output.

Is there a way to hard code this somewhere, create a "Column header 2" in Template Fields or can you suggest a better way?

Many thanks.
Accepted Answer Pending Moderation
Hello Monica,
Is there a way to hard code this somewhere, create a "Column header 2" in Template Fields or can you suggest a better way?

You can try doing the following
1. In your order export template, on files tab set 'filename for exported file' to force to download a csv file, say like orders.csv, set export type to XML, website to Custom.
2. On XML layout tab in the header field type your first column headers and second header in csv format. For example i have done for 3 fields like "Order Number";"Customer Number";"Order Total" "New Order Number";"New Customer Number";"New Order Total".
3. On the same tab in body field put the field name in csv format, so for the three fields above it would be "[order_number]";"[customer_number]";"[order_total]"
4. Save the template and try the export.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hi Tharuna,

Headers are great.

Almost there except mine is rendering the body fields as [address_1] [city] [zip] at export. They're not actually populated with data.

Any ideas?

Mon
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello Monica,
Can you post your template so i can test? To get the template, Go to CSVI maintenance menu, select CSVI Pro in the first option, Backup templates in the second option. Select your template and click on continue. Your template will be stored on your server in the form of an XML file. The path will be shown after backup is done. Download and post the XML file here.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation

<?xml version="1.0"?>
<csvi>
<template>
<settings>
<action><![CDATA[export]]></action>
<component><![CDATA[com_virtuemart]]></component>
<operation><![CDATA[order]]></operation>
<exportto>
<option><![CDATA[todownload]]></option>
</exportto>
<localpath><![CDATA[/home/testserver/public_html]]></localpath>
<ftphost><![CDATA[]]></ftphost>
<ftpport><![CDATA[]]></ftpport>
<ftpusername><![CDATA[]]></ftpusername>
<ftppass><![CDATA[]]></ftppass>
<ftproot><![CDATA[]]></ftproot>
<ftpfile><![CDATA[]]></ftpfile>
<export_email_addresses><![CDATA[]]></export_email_addresses>
<export_email_addresses_cc><![CDATA[]]></export_email_addresses_cc>
<export_email_addresses_bcc><![CDATA[]]></export_email_addresses_bcc>
<export_email_subject><![CDATA[]]></export_email_subject>
<export_email_body><![CDATA[]]></export_email_body>
<export_filename><![CDATA[OrderExport[D][j][M][Y]-[G]-[i].csv]]></export_filename>
<export_file><![CDATA[xml]]></export_file>
<export_site><![CDATA[custom]]></export_site>
<field_delimiter><![CDATA[,]]></field_delimiter>
<text_enclosure><![CDATA[]]></text_enclosure>
<include_column_headers><![CDATA[yes]]></include_column_headers>
<signature><![CDATA[yes]]></signature>
<publish_state><![CDATA[]]></publish_state>
<recordstart><![CDATA[]]></recordstart>
<recordend><![CDATA[]]></recordend>
<export_date_format><![CDATA[d/m/Y H:i:s]]></export_date_format>
<export_price_format_decimal><![CDATA[2]]></export_price_format_decimal>
<export_price_format_decsep><![CDATA[.]]></export_price_format_decsep>
<export_price_format_thousep><![CDATA[]]></export_price_format_thousep>
<header><![CDATA[C_CHARGE_CODE,C_CONSIGNEE_NAME,C_CONSIGNEE_ADDRESS_1,C_CONSIGNEE_ADDRESS_2,C_CONSIGNEE_SUBURB,C_CONSIGNEE_STATE_CODE,C_CONSIGNEE_POSTCODE,C_CONSIGNEE_COUNTRY_CODE,C_CONSIGNEE_PHONE_NUMBER,C_DELIVERY_INSTRUCTION,C_REF,C_CONSIGNEE_EMAIL,A_ACTUAL_CUBIC_WEIGHT,A_LENGTH,A_WIDTH,A_HEIGHT
MANDATORY,MANDATORY/OPTIONAL REFER TO GUIDE,MANDATORY/OPTIONAL REFER TO GUIDE,OPTIONAL,MANDATORY/OPTIONAL REFER TO GUIDE,MANDATORY/OPTIONAL REFER TO GUIDE,MANDATORY/OPTIONAL REFER TO GUIDE,MANDATORY/OPTIONAL REFER TO GUIDE,MANDATORY/OPTIONAL REFER TO GUIDE,OPTIONAL,OPTIONAL,MANDATORY/OPTIONAL REFER TO GUIDE,MANDATORY,MANDATORY/OPTIONAL REFER TO GUIDE,MANDATORY/OPTIONAL REFER TO GUIDE,MANDATORY/OPTIONAL REFER TO GUIDE]]></header>
<body><![CDATA[[virtuemart_shipmentmethod_id],[full_name],[address_1],[address_2],[city],[state_name],[zip],[country_2_code],[phone_1],[customer_note],[order_number],[email],[order_weight],[product_length],[product_width],[product_height]]]></body>
<footer><![CDATA[]]></footer>
<language><![CDATA[en-AU]]></language>
<splitorderline><![CDATA[no]]></splitorderline>
<ordernostart><![CDATA[]]></ordernostart>
<ordernoend><![CDATA[]]></ordernoend>
<orderlist><![CDATA[]]></orderlist>
<orderdaterange><![CDATA[thisweek]]></orderdaterange>
<orderdatestart><![CDATA[]]></orderdatestart>
<orderdateend><![CDATA[]]></orderdateend>
<ordermdatestart><![CDATA[]]></ordermdatestart>
<ordermdateend><![CDATA[]]></ordermdateend>
<orderstatus>
<option><![CDATA[C]]></option>
</orderstatus>
<orderpayment>
<option><![CDATA[]]></option>
</orderpayment>
<order_address><![CDATA[]]></order_address>
<ordermanufacturer>
<option><![CDATA[none]]></option>
</ordermanufacturer>
<ordercurrency>
<option><![CDATA[]]></option>
</ordercurrency>
<orderpricestart><![CDATA[]]></orderpricestart>
<orderpriceend><![CDATA[]]></orderpriceend>
<orderuser>
<option><![CDATA[]]></option>
</orderuser>
<orderproduct>
<option><![CDATA[]]></option>
</orderproduct>
<groupbyfields><![CDATA[{"name":["order_number"]}]]></groupbyfields>
<sortfields><![CDATA[{"name":[]}]]></sortfields>
<use_system_limits><![CDATA[no]]></use_system_limits>
<max_execution_time><![CDATA[]]></max_execution_time>
<memory_limit><![CDATA[]]></memory_limit>
</settings>
<template_name><![CDATA[eParcel]]></template_name>
<advanced><![CDATA[0]]></advanced>
<action><![CDATA[export]]></action>
<frontend><![CDATA[1]]></frontend>
<secret><![CDATA[]]></secret>
<log><![CDATA[0]]></log>
<lastrun><![CDATA[2016-05-30 12:11:04]]></lastrun>
<enabled><![CDATA[1]]></enabled>
<ordering><![CDATA[0]]></ordering>
<fields>
<field>
<field_name><![CDATA[full_name]]></field_name>
<xml_node><![CDATA[]]></xml_node>
<column_header><![CDATA[C_CONSIGNEE_NAME]]></column_header>
<default_value><![CDATA[]]></default_value>
<enabled><![CDATA[1]]></enabled>
<sort><![CDATA[0]]></sort>
<cdata><![CDATA[0]]></cdata>
<ordering><![CDATA[2]]></ordering>
</field>
<field>
<field_name><![CDATA[address_2]]></field_name>
<xml_node><![CDATA[]]></xml_node>
<column_header><![CDATA[C_CONSIGNEE_ADDRESS_2]]></column_header>
<default_value><![CDATA[]]></default_value>
<enabled><![CDATA[1]]></enabled>
<sort><![CDATA[0]]></sort>
<cdata><![CDATA[0]]></cdata>
<ordering><![CDATA[4]]></ordering>
<fieldrules>
<rule>
<name>Comma blitz</name>
<action>export</action>
<ordering>0</ordering>
<plugin>csvireplace</plugin>
<plugin_params>
<findtext><![CDATA[,]]></findtext>
<replacetext><![CDATA[]]></replacetext>
<multivalue><![CDATA[0]]></multivalue>
<separator><![CDATA[|]]></separator>
<method><![CDATA[text]]></method>
</plugin_params>
</rule>
</fieldrules>
</field>
<field>
<field_name><![CDATA[address_1]]></field_name>
<xml_node><![CDATA[]]></xml_node>
<column_header><![CDATA[C_CONSIGNEE_ADDRESS_1]]></column_header>
<default_value><![CDATA[]]></default_value>
<enabled><![CDATA[1]]></enabled>
<sort><![CDATA[0]]></sort>
<cdata><![CDATA[0]]></cdata>
<ordering><![CDATA[3]]></ordering>
<fieldrules>
<rule>
<name>Comma blitz</name>
<action>export</action>
<ordering>0</ordering>
<plugin>csvireplace</plugin>
<plugin_params>
<findtext><![CDATA[,]]></findtext>
<replacetext><![CDATA[]]></replacetext>
<multivalue><![CDATA[0]]></multivalue>
<separator><![CDATA[|]]></separator>
<method><![CDATA[text]]></method>
</plugin_params>
</rule>
</fieldrules>
</field>
<field>
<field_name><![CDATA[virtuemart_shipmentmethod_id]]></field_name>
<xml_node><![CDATA[]]></xml_node>
<column_header><![CDATA[C_CHARGE_CODE]]></column_header>
<default_value><![CDATA[]]></default_value>
<enabled><![CDATA[1]]></enabled>
<sort><![CDATA[0]]></sort>
<cdata><![CDATA[0]]></cdata>
<ordering><![CDATA[1]]></ordering>
<fieldrules>
<rule>
<name>3 Normal</name>
<action>export</action>
<ordering>9</ordering>
<plugin>csvireplace</plugin>
<plugin_params>
<findtext><![CDATA[3]]></findtext>
<replacetext><![CDATA[7C55]]></replacetext>
<multivalue><![CDATA[0]]></multivalue>
<separator><![CDATA[|]]></separator>
<method><![CDATA[text]]></method>
</plugin_params>
</rule>
<rule>
<name>18 FREE Express!</name>
<action>export</action>
<ordering>5</ordering>
<plugin>csvireplace</plugin>
<plugin_params>
<findtext><![CDATA[18]]></findtext>
<replacetext><![CDATA[7I55]]></replacetext>
<multivalue><![CDATA[0]]></multivalue>
<separator><![CDATA[|]]></separator>
<method><![CDATA[text]]></method>
</plugin_params>
</rule>
<rule>
<name>19 FREE Express!</name>
<action>export</action>
<ordering>6</ordering>
<plugin>csvireplace</plugin>
<plugin_params>
<findtext><![CDATA[19]]></findtext>
<replacetext><![CDATA[7I55]]></replacetext>
<multivalue><![CDATA[0]]></multivalue>
<separator><![CDATA[|]]></separator>
<method><![CDATA[text]]></method>
</plugin_params>
</rule>
<rule>
<name>2 Express</name>
<action>export</action>
<ordering>8</ordering>
<plugin>csvireplace</plugin>
<plugin_params>
<findtext><![CDATA[2]]></findtext>
<replacetext><![CDATA[7I55]]></replacetext>
<multivalue><![CDATA[0]]></multivalue>
<separator><![CDATA[|]]></separator>
<method><![CDATA[text]]></method>
</plugin_params>
</rule>
<rule>
<name>17 Express</name>
<action>export</action>
<ordering>4</ordering>
<plugin>csvireplace</plugin>
<plugin_params>
<findtext><![CDATA[17]]></findtext>
<replacetext><![CDATA[7I55]]></replacetext>
<multivalue><![CDATA[0]]></multivalue>
<separator><![CDATA[|]]></separator>
<method><![CDATA[text]]></method>
</plugin_params>
</rule>
<rule>
<name>16 Express 3KG Wholesale</name>
<action>export</action>
<ordering>3</ordering>
<plugin>csvireplace</plugin>
<plugin_params>
<findtext><![CDATA[16]]></findtext>
<replacetext><![CDATA[7I55]]></replacetext>
<multivalue><![CDATA[0]]></multivalue>
<separator><![CDATA[|]]></separator>
<method><![CDATA[text]]></method>
</plugin_params>
</rule>
<rule>
<name>1 Express</name>
<action>export</action>
<ordering>7</ordering>
<plugin>csvireplace</plugin>
<plugin_params>
<findtext><![CDATA[1]]></findtext>
<replacetext><![CDATA[7I55]]></replacetext>
<multivalue><![CDATA[0]]></multivalue>
<separator><![CDATA[|]]></separator>
<method><![CDATA[text]]></method>
</plugin_params>
</rule>
<rule>
<name>4 Normal</name>
<action>export</action>
<ordering>10</ordering>
<plugin>csvireplace</plugin>
<plugin_params>
<findtext><![CDATA[4]]></findtext>
<replacetext><![CDATA[7C55]]></replacetext>
<multivalue><![CDATA[0]]></multivalue>
<separator><![CDATA[|]]></separator>
<method><![CDATA[text]]></method>
</plugin_params>
</rule>
<rule>
<name>14 International</name>
<action>export</action>
<ordering>1</ordering>
<plugin>csvireplace</plugin>
<plugin_params>
<findtext><![CDATA[14]]></findtext>
<replacetext><![CDATA[WARNING]]></replacetext>
<multivalue><![CDATA[0]]></multivalue>
<separator><![CDATA[|]]></separator>
<method><![CDATA[text]]></method>
</plugin_params>
</rule>
<rule>
<name>15 International</name>
<action>export</action>
<ordering>2</ordering>
<plugin>csvireplace</plugin>
<plugin_params>
<findtext><![CDATA[15]]></findtext>
<replacetext><![CDATA[WARNING]]></replacetext>
<multivalue><![CDATA[0]]></multivalue>
<separator><![CDATA[|]]></separator>
<method><![CDATA[text]]></method>
</plugin_params>
</rule>
</fieldrules>
</field>
<field>
<field_name><![CDATA[city]]></field_name>
<xml_node><![CDATA[]]></xml_node>
<column_header><![CDATA[C_CONSIGNEE_SUBURB]]></column_header>
<default_value><![CDATA[]]></default_value>
<enabled><![CDATA[1]]></enabled>
<sort><![CDATA[0]]></sort>
<cdata><![CDATA[0]]></cdata>
<ordering><![CDATA[5]]></ordering>
</field>
<field>
<field_name><![CDATA[state_name]]></field_name>
<xml_node><![CDATA[]]></xml_node>
<column_header><![CDATA[C_CONSIGNEE_STATE_CODE]]></column_header>
<default_value><![CDATA[]]></default_value>
<enabled><![CDATA[1]]></enabled>
<sort><![CDATA[0]]></sort>
<cdata><![CDATA[0]]></cdata>
<ordering><![CDATA[6]]></ordering>
</field>
<field>
<field_name><![CDATA[zip]]></field_name>
<xml_node><![CDATA[]]></xml_node>
<column_header><![CDATA[C_CONSIGNEE_POSTCODE]]></column_header>
<default_value><![CDATA[]]></default_value>
<enabled><![CDATA[1]]></enabled>
<sort><![CDATA[0]]></sort>
<cdata><![CDATA[0]]></cdata>
<ordering><![CDATA[7]]></ordering>
</field>
<field>
<field_name><![CDATA[country_2_code]]></field_name>
<xml_node><![CDATA[]]></xml_node>
<column_header><![CDATA[C_CONSIGNEE_COUNTRY_CODE]]></column_header>
<default_value><![CDATA[]]></default_value>
<enabled><![CDATA[1]]></enabled>
<sort><![CDATA[0]]></sort>
<cdata><![CDATA[0]]></cdata>
<ordering><![CDATA[8]]></ordering>
</field>
<field>
<field_name><![CDATA[phone_1]]></field_name>
<xml_node><![CDATA[]]></xml_node>
<column_header><![CDATA[C_CONSIGNEE_PHONE_NUMBER]]></column_header>
<default_value><![CDATA[]]></default_value>
<enabled><![CDATA[1]]></enabled>
<sort><![CDATA[0]]></sort>
<cdata><![CDATA[0]]></cdata>
<ordering><![CDATA[9]]></ordering>
</field>
<field>
<field_name><![CDATA[customer_note]]></field_name>
<xml_node><![CDATA[]]></xml_node>
<column_header><![CDATA[C_DELIVERY_INSTRUCTION]]></column_header>
<default_value><![CDATA[Please leave in safe place.]]></default_value>
<enabled><![CDATA[1]]></enabled>
<sort><![CDATA[0]]></sort>
<cdata><![CDATA[0]]></cdata>
<ordering><![CDATA[10]]></ordering>
<fieldrules>
<rule>
<name>Comma blitz</name>
<action>export</action>
<ordering>0</ordering>
<plugin>csvireplace</plugin>
<plugin_params>
<findtext><![CDATA[,]]></findtext>
<replacetext><![CDATA[]]></replacetext>
<multivalue><![CDATA[0]]></multivalue>
<separator><![CDATA[|]]></separator>
<method><![CDATA[text]]></method>
</plugin_params>
</rule>
</fieldrules>
</field>
<field>
<field_name><![CDATA[order_number]]></field_name>
<xml_node><![CDATA[]]></xml_node>
<column_header><![CDATA[C_REF]]></column_header>
<default_value><![CDATA[]]></default_value>
<enabled><![CDATA[1]]></enabled>
<sort><![CDATA[0]]></sort>
<cdata><![CDATA[0]]></cdata>
<ordering><![CDATA[11]]></ordering>
</field>
<field>
<field_name><![CDATA[email]]></field_name>
<xml_node><![CDATA[]]></xml_node>
<column_header><![CDATA[C_CONSIGNEE_EMAIL]]></column_header>
<default_value><![CDATA[]]></default_value>
<enabled><![CDATA[1]]></enabled>
<sort><![CDATA[0]]></sort>
<cdata><![CDATA[0]]></cdata>
<ordering><![CDATA[12]]></ordering>
</field>
<field>
<field_name><![CDATA[order_weight]]></field_name>
<xml_node><![CDATA[]]></xml_node>
<column_header><![CDATA[A_ACTUAL_CUBIC_WEIGHT]]></column_header>
<default_value><![CDATA[]]></default_value>
<enabled><![CDATA[1]]></enabled>
<sort><![CDATA[0]]></sort>
<cdata><![CDATA[0]]></cdata>
<ordering><![CDATA[13]]></ordering>
</field>
<field>
<field_name><![CDATA[product_length]]></field_name>
<xml_node><![CDATA[]]></xml_node>
<column_header><![CDATA[A_LENGTH]]></column_header>
<default_value><![CDATA[32]]></default_value>
<enabled><![CDATA[1]]></enabled>
<sort><![CDATA[0]]></sort>
<cdata><![CDATA[1]]></cdata>
<ordering><![CDATA[14]]></ordering>
</field>
<field>
<field_name><![CDATA[product_width]]></field_name>
<xml_node><![CDATA[]]></xml_node>
<column_header><![CDATA[A_WIDTH]]></column_header>
<default_value><![CDATA[25]]></default_value>
<enabled><![CDATA[1]]></enabled>
<sort><![CDATA[0]]></sort>
<cdata><![CDATA[0]]></cdata>
<ordering><![CDATA[15]]></ordering>
</field>
<field>
<field_name><![CDATA[product_height]]></field_name>
<xml_node><![CDATA[]]></xml_node>
<column_header><![CDATA[A_HEIGHT]]></column_header>
<default_value><![CDATA[7]]></default_value>
<enabled><![CDATA[1]]></enabled>
<sort><![CDATA[0]]></sort>
<cdata><![CDATA[0]]></cdata>
<ordering><![CDATA[16]]></ordering>
</field>
</fields>
</template>
</csvi>
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello Monica,
Your fields in body field in XML layout tab in template settings is in XML format and not in csv format, can you try putting it in "virtuemart_shipmentmethod_id";"full_name";"address_1";.... format and see if it works?
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hi again Tharuna,

This
"virtuemart_shipmentmethod_id";"full_name";"address_1";...
Becomes this...
virtuemart_shipmentmethod_id;"full_name";"address_1";...
At export.

Interesting that the first two " are not there...

Best,

Mon
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello Mon,

The issue is actually not the use of text enclosures but rather the field names that are being used I think. Since you have changed the field names in your template fields you need to use the new field names in the BODY as well.

As a simple test, if you replace the virtuemart_shipmentmethod_id with C_CHARGE_CODE does it produce the expected output?
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
You're a cleaver guy!

[C_CHARGE_CODE] = Bingo!

Thanks so much for your help.

Have a good one!

Mon
  1. more than a month ago
  2. RO CSVI
  3. # 8
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!