0

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?

  • There are plugins to import products as CPTs - you can look into those and see whether the provided data is in a format that the plugins can parse, and whether that then creates products the way the client would prefer. Then it's a matter of deciding whether you will pull these in on a schedule and update/add/delete products, or only import once and then handle manually. Custom code may be able to parse more efficiently but might need more dev time for maintenance and updates if it's something they use frequently, so you should consider whether an out-of-the-box solution is long-term. – WebElaine Apr 26 at 15:21
  • Had no idea any plugins already existed! I'll have to do some digging! Any idea what they are called? – Chris Wendel Apr 26 at 15:31
  • A search for "wp import plugin" will come up with some of the most popular, so you can test them out and see what works best. – WebElaine Apr 26 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.