«

Jan 22

Magento Import Tracking Numbers Part 1

Hi Guys;
I want to tell about how to create tracking number import to Magento. In order to do it we will use Magento Product and Customer import service.

First step of development is creating new module under the local folder. I gave a name Girginsoft>Tracker. Under this module there is only two folder in it. First one is etc and the other one is Model.

└── Tracker
    ├── etc
    │   └── config.xml
    └── Model
        └── Import
            └── Entity
                └── Order.php

This is the structure of folders.

Lets look at config.xml, what we put into it.
First definition of module, and model class. Here is the trick

        <importexport module="tracker">
            <import_entities>
                <order translate="label">
                    <model_token>tracker/import_entity_order</model_token>
                    <label>Orders Tracks</label>
                </order>
            </import_entities>
        </importexport>

When we put this code block to etc file, magento displays out importer in import menu.
Here is the full config file.

<?xml version="1.0"?>
<config>
    <modules>
        <Girginsoft_Tracker>
            <version>0.1.0</version>
        </Girginsoft_Tracker>
    </modules>
    <global>
        <models>
            <tracker>
                <class>Girginsoft_Tracker_Model</class>
            </tracker>
        </models>
        <importexport module="tracker">
            <import_entities>
                <order translate="label">
                    <model_token>tracker/import_entity_order</model_token>
                    <label>Orders Tracks</label>
                </order>
            </import_entities>
        </importexport>
    </global>
</config>

Code is a little bit long. I will explain it on next blog post, I am sorry but it is too late to do it. I’am going to work early.
See you on next article.

1 comment

  1. Glenda Burton

    Hi, nice article. I really like it!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>