Page tree
Skip to end of metadata
Go to start of metadata

Description

Import or Export data from or to JomDirectory extension.

Please use with extreme caution. When importing all data will be overwritten!
Settings and images are not being exported/imported, please backup them first.

Exporting Data

Export is quite easy. Click on XML link to download the file to your computer.

Import

Before Import the file, xml should be validated for errors. It can be done e.g. in Firefox browser, the errors will be highlighted.

XML feed starts with <tables></tables> block. All text fields needs to be places in <![CDATA[Automotive]]> tag

There are couple of blocks  that needs to be filled in before importing:

XML BlockXML Block Description
<categories></categories>Block for importing Categories
<addresses></addresses>Block for importing Address
<fields></fields>Block for importing Custom FIelds
<content></content>Block for importing listings

Each Block needs to have <row></row> structure e.g.

<tables>

    <categories>

       <row>

          .........

       </row>

   </categories>

</tables>

Row is used to multiple items.

Example XML feed:

<tables>
    <categories>
        <row>
            <id>1</id>
            <order>1</order>
            <title><![CDATA[Automotive]]></title>
            <description><![CDATA[<p>Automotive</p>]]></description>
        </row>
    </categories>
    <addresses>
        <row>
            <id>1</id>
            <title><![CDATA[Europe]]></title>
        </row>
        <row>
            <id>2</id>
            <parent_id>1</parent_id>
            <title><![CDATA[United Kingdom]]></title>
        </row>
        <row>
            <id>3</id>
            <parent_id>2</parent_id>
            <title><![CDATA[London]]></title>
        </row>
        <row>
            <id>4</id>
            <parent_id>2</parent_id>
            <title><![CDATA[Luton]]></title>
        </row>
    </addresses>
    <fields>
        <row>
            <id>1</id>
            <type>input</type>
            <type_value>string</type_value>
            <group>items</group>
            <category>1</category>
            <name><![CDATA[Company Website]]></name>
            <template>horizontal_float</template>
        </row>
        <row>
            <id>2</id>
            <type>select</type>
            <type_value>int</type_value>
            <group>item</group>
            <category>1</category>
            <name><![CDATA[Company Size]]></name>
            <select><![CDATA[{"value":["Corporate","Big","Small"],"order":["1","2","3","4"]}]]></select>
            <template>vertical</template>
        </row>
    </fields>
    <content>
        <row>
            <category>1</category>
            <address>4</address>
            <title>Apple Store</title>
            <introtext><![CDATA[<p>Apple Inc., formerly Apple Computer, Inc., is an American multinational corporation headquartered in Cupertino, California that designs, develops, and sells consumer electronics, computer software and personal computers. Its best-known hardware products.</p>]]></introtext>
            <field>
                <row>
                    <id>1</id>
                    <value>apple.com</value>
                </row>
                <row>
                    <id>2</id>
                    <value>Corporate</value>
                </row>
            </field>
            <images>
                <row>
                    <group>intro</group>
                    <download>http://localhost/comdev/image1.jpg</download>
                </row>
                <row>
                    <group>gallery</group>
                    <download>http://localhost/comdev/images2.jpg</download>
                </row>
            </images>
            <file>
                <row>
                    <title>Apple Specs</title>
                    <download>http://localhost/comdev/apple_specs.zip</download>
                </row>
            </file>
        </row>
    </content>
</tables>


Custom Fields types, type_values, groups

FiledsXML tagPossible Values

<type>select</type>

select

input

checkbox

radio

textarea

input-link

checkbox-group

input-email

radio-group

select-multi


<type_value>string</type_value>
            

string

int

decimal


<group>items</group>

first (items)

second (item)





  • No labels