Plugin runs every 10 minutes and import XML feed data into database.
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.
If it finds the association, it will update the data.
It also displays the imported data on edit screen of listing.
- 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中包含无法找到相关列表的任何单位,它将创建一个新列表,然后为其更新数据。 li>
- 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.
如果需要将单位与现有列表相关联,则需要手动干预,方法是手工操作或使用一些自定义脚本。 li>
ul>
Future Development
未来发展 h4>
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.
同样,可以在明确,最终确定和详细讨论需求之后进行修改。 p>