XML Feed. Column Numbers

    Since it is not always possible to open a price list in XML or YML format with arbitrary tags with Excel to see the column numbers, a special function has been added to the plugin:

    In the separator field, enter the tag with which the product starts, save the supplier form, and process the price list.

    In some cases, you have to fill in not only the product start tag but also the end tag:

    The plugin will check up to 10,000 products and list the column numbers in the file admin/uploads/columns.tmp

    The content of the columns.tmp file is something like this:

    Attention

    If you select only a few products from the price list into a separate file, then the column numbers may turn out to be other, since some columns may appear in the products later. For example, the <vendor> column only appears in the fourth product:

    if you select the first 3 products in a separate price list, the plugin will not see the <vendor> column. What would never happen in the case of XML Spreadsheet 2003-2004 format price list:

    Here column #3 always exists, even if it is empty.

    User Schema.

    The supplier can for some reason remove the <vendor> tag from the price list, then the columns will shift, the column numbers will change and the supplier form settings will be incorrect. Also, he can swap tags and add new ones.

    In order not to set the supplier form every time it changes (especially since it is impossible to do this when processing the file via Cron), it is better to create your own column order and, thus, fix their numbers, as in a tabular price list.

    To do this, you need to create a file in any text editor containing the column names in the order that suits you. The file should be named user_schemaN.csv (where N is the supplier form number):

    and keep it in the admin/uploads folder:

    The column names should be copied from the columns.tmp file:

    For example, to update prices and quantities, it is enough for us to have a price list with only three columns: SKU, price, and quantity. Then the contents of the file user_schema14.csv will be as follows:

    (разделитель - запятая, пробелы не допускаются).

    In the supplier form settings, it will be enough to fill in:

    • column #1 - SKU
    • column #2 - price
    • column #3 - quantity

    and set the action to "Update only".

    Usergio Copyright © 2022