2

The source website is in ExpressionEngine and I know how to get data out, but I don't know how to structure it and succesfully import entries into Craft where assets and categories also imported. I have tried the plugin FeedMe (XML) and I also tried the plugin Import (SVG).

How to work with categories and sub categories an how to use multiple assets with import? Thanks in advance!

<?xml version="1.0" encoding="UTF-8"?>
    <products>
        <entry>
            <title>My product title</title>
            <slug>my-product-title</slug>
            <body><![CDATA[<p>My body text</p>]]></body>
            <assets>
                <![CDATA[
                    http://www.mywebsite.nl/root/path/image1.png,
                    http://www.mywebsite.nl/root/path/image2.png
                ]]>
            </assets>
            <category>
                <![CDATA[
                   Lightning,
                   Cities,
                   Standard,
                   Special
                ]]>
            </category>
        </entry>
    </products>
2

I used FeedMe successfully and this is what I used. The images have to be already present as assets in Craft(ftp and then update asset indexes). Having the full url in the images part stumped me too. In this example I pulled the images twice because in my EE build I was using the first image of many to create a preview image and in craft I actually created a preview image field.

<entry>
    <entry_date>{entry_date format="{DATE_ATOM}"}</entry_date>
    <title>{title}</title>
    <slug>{url_title}</slug>
    <price>{product_price}</price>
    <dimensions>{product_dimensions}</dimensions>
    <description>{product_description}</description>
    <notes>{private_notes}</notes>
    <location>{product_location:title}</location>
    <number>{product_number}</number>
    <message><![CDATA[{product_message}{option}, {/product_message}]]></message>
    <status>{status}</status>
    <category><![CDATA[{categories}{category_name}, {/categories}]]></category>

    <images><![CDATA[ 
    {finalproductimages}
        {filename}.{extension},
    {/finalproductimages}]]></images>

    <preview><![CDATA[ 
    {finalproductimages limit="1"}
        {filename}.{extension},
    {/finalproductimages}]]></preview>



</entry>
  • Hi @AbbeyDesign, Thanks for your reply. I'm gonna test FeedMe with your export script. – Martijn La Feber Jun 29 '16 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.