0

Hi I want to achieve the following szenario and asking for advice to start off

Szenario

We have an external mysql-database filled with product informations. This database is delivering data for a few online-shops. The access to the database is possible directly per mysql connection or as i prefer per homegrown API. (http-request). The result can be fetched as a JSON-formated array.

We now want several wordpress environments on different servers / countries and display filtered product information. We want to build an "advertisment-blog" for let's say a specific product branch (e.g. lighting supplies). Each product as a wordpress-post

If I want to add a new product-advertisement to a specific blog, I want to create a new post and click a button and enter a product id. The plugin has to fetch the data from the external server (at best via api-access) and auto-fill parts of a template.

I found plugins which can do parts of that, but none which fits the requirements.

The other problem, I have, is, that the post has du auto-update the information periodically (let's say once per week). Is this even possible?

Solutions

I am not afraid in developing a homegrown plugin, which can fit the requirements. I am also not afraid to customize some plugins if necessary. Buying a commercal plugin is even an option. But I am not sure where to start. Does anyone know a plugin or a suite of plugins which fits (or almost fits) the requirements?

Has someone some plugins/themes/wordpress-clones which fits the requirements?

Auto-Update-Part Developing a plugin which fetches data and creating a post is not that problem for me. I also could format the output of the api to deliver a copy-pasteable block for post creating. I am afraid for the update-part. Is it better to create the post, and manipulate the data in the database afterwards or to create some kind of widget which don't store the data and fetches the information over the api at each page request? Is it performant enough? Or should i store the product-relevant data for each post in a seperate table/column/whatsoever and update them periodically per cronjob or something?

I am thankfull for any advice

EDIT

I am writing my own plugin now. Data import, storage and shortcode display works like a charm. Now struggeling with the update part, but this won't be a serious problem.

Thanks for your advice

  • Do you have this plugin available? I think it would have been finished since you posted unless you abandoned it. I'm looking to do the exact same thing you are asking about here. – o_O Sep 10 '15 at 16:27
  • Yes I finished it, but it was for single, company intern project and highly customize to fit the needs for that project. I am afraid modifying it would result into rewriting it. – Ello Sep 10 '15 at 17:04
0

Network requests during page load are very heavy action and should be avoided at all cost.

WordPress has wp cron functionality to work with scheduled events and depending on your data requirements you might map data to Custom Post Type, store it in custom table or maybe more simply use caching API such as Transients API

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.