[wordpress插件] Automotive Feed Importer汽车饲料进口商

wordpress 插件 文章 2020-02-25 19:20 455 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Plugin runs every 10 minutes and import XML feed data into database.

插件每10分钟运行一次,并将XML提要数据导入数据库。

When importing data from feed, it searches if stock number (from feed) is associated with any listing (post).

从提要中导入数据时,它将搜索库存编号(从提要中)是否与任何清单(帖子)相关联。

If not, it will create a new listing and associate the data from feed with listing by mapping stock number to post id.

如果不是,它将创建一个新列表,并通过将库存编号映射到职位ID将Feed中的数据与列表相关联。

If it finds the association, it will update the data.

如果找到关联,它将更新数据。

It also displays the imported data on edit screen of listing.

还会在列表的编辑屏幕上显示导入的数据。

Demo

演示

You can see the working demo of plugin at http://automotive.site.bz

您可以在http://automotive.site.bz 上查看插件的工作演示。

Test Cases

测试用例

    • Typical case: Plugin runs every 10 minutes and load the XML feed, and update the listings against each unit from feed.

    • 典型情况:插件每10分钟运行一次,并加载XML feed,并针对feed中的每个单元更新清单。

      If feed contains any unit for which it cannot find associated listing, it will create a new listing and then update data for it.

    • 如果Feed中包含无法找到相关列表的任何单位,它将创建一个新列表,然后为其更新数据。

    • First time load:

    • 第一次加载:

      o When there are no listings: It will create a new list against each unit imported from feed.

      o如果没有列表:它将针对从feed导入的每个单元创建一个新列表。

      o When there are already some listings: Typically, there will not be any unit added to listings, in this case it will create new listing for each of the unit.

      o当已经有一些列表时:通常,没有任何单元添加到列表中,在这种情况下,它将为每个单元创建新列表。

      If one needs to associate the units with existing listing, then it requires manual intervention either doing it by hand or by some custom script.

    • 如果需要将单位与现有列表相关联,则需要手动干预,方法是手工操作或使用一些自定义脚本。

    Future Development

    未来发展

    There is still plenty of room for enhancement and optimization in this plugin as few things have been done by making assumptions.

    此插件中仍有大量的增强和优化空间,因为很少有人做假设。

    Enhancements/optimizations that we plan to do are:

    我们计划要做的增强/优化是:

    1) Currently the XML feed path is hardcoded to be picked from /wp-content/plugins/automotive-feed-import/ folder, which is root of this plugin.

    1)当前,XML提要路径已硬编码从/ wp-content / plugins / automotive-feed-import /文件夹中选取,该文件夹是此插件的根。

    Folder name for plugin can be anything, it will pick automatically, but file should be present in this plugins root folder.

    插件的文件夹名称可以是任何名称,它将自动选择,但是该插件的根文件夹中应包含文件。

    For this, new options/settings page can be created for plugin so user can specify custom path to pick the XML feed from.

    为此,可以为插件创建新的选项/设置页面,以便用户可以指定自定义路径以从中选择XML提要。

    2) At the moment, when creating new listing it sets the

    2)目前,在创建新列表时会设置

    a) Post title as manufacturer and brand concatenated, and

    a)作为制造商和品牌的衔接职位,并且

    b) Post content as designation, manufacturer, brand, model, and model year concatenated

    b)将内容(例如名称,制造商,品牌,型号和型号年份)串联起来

    This can be modified and further information can be set after clarifying, finalizing, and discussing requirements in detail.

    在明确,最终确定并详细讨论需求之后,可以对此进行修改并设置更多信息。

    3) Following fields in XML feed are also made available by the theme in same or some other manner:

    3)主题也以相同或其他方式提供XML feed中的以下字段:

    a) Manufacturer

    a)制造商

    b) Year

    b)年

    c) Price

    c)价格

    d) Mileage

    d)里程

    e) Color

    e)颜色

    When importing data, plugin does not touch the data already provided by the theme, instead it adds data resulting in some redundant information.

    导入数据时,插件不会触摸主题已经提供的数据,而是会添加数据,从而导致一些冗余信息。

    And, when creating new listing it copies the same value from feed into these fields.

    而且,在创建新列表时,它会将Feed中的相同值复制到这些字段中。

    Again, this can be modified after clarifying, finalizing, and discussing requirements in detail.

    同样,可以在明确,最终确定和详细讨论需求之后进行修改。

安装步骤

    1. Upload automotive-feed-import folder to the /wp-content/plugins/ directory
    2. automotive-feed-import 文件夹上传到 / wp-content / plugins / 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

下载地址
https://downloads.wordpress.org/plugin/automotive-feed-import.1.0.zip
-EOF-

AI助手支持GPT4.0