admin管理员组文章数量:1022761
I am working with a client who sells products from a few different vendors. They want a separate page for each vendor and want a list view and detail view of each product. Most of their clients send them a list of products and they will have to manually input the products into their system. Easy.
Now one of their clients is a much larger supplier and has an API where you can pull back all the product info through unique IDs. Technically my client could also just find these and load them manually but they have asked if it would be possible to load those automagically. Initially I thought I could just write some PHP or JS, connect to the API, loop through each unique ID, return the values, and then send them into my pages. However, is there a better/cleaner way? Maybe create a custom plugin that connects to the API and sends all the data into a CPT that way they are editable.
Has anyone ever done something like this that can shed any light on a good way to go about it?
I am working with a client who sells products from a few different vendors. They want a separate page for each vendor and want a list view and detail view of each product. Most of their clients send them a list of products and they will have to manually input the products into their system. Easy.
Now one of their clients is a much larger supplier and has an API where you can pull back all the product info through unique IDs. Technically my client could also just find these and load them manually but they have asked if it would be possible to load those automagically. Initially I thought I could just write some PHP or JS, connect to the API, loop through each unique ID, return the values, and then send them into my pages. However, is there a better/cleaner way? Maybe create a custom plugin that connects to the API and sends all the data into a CPT that way they are editable.
Has anyone ever done something like this that can shed any light on a good way to go about it?
本文标签: phpPulling Products from an API
版权声明:本文标题:php - Pulling Products from an API 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745549060a2155532.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论