Search

dear all, I got a problem, might be easy to solve.

I'm using dynamic xml to ask an api from an online shop what products are online. For this the right use is:

http://example.com/shopname/products.xml?apikey=xx&page=n

the count of the products changing, and I can't recieve only 10 products per page. so is my question:

can I told the dynamic datasource in a way to run all pagen from 1 to 50 and stop if an error comes? a param like page={1-20]} obviosly don't works.

If this is not possible, is there any sencefull way to patch the dynamic datasource with an extension, I may try to write?

Or is the only way to go a lot off different datasources ?

thx for reply

@moma I wouldn't recommend to do it that way, best to update the data locally via a cron or other script.

The problem with trying to loop is that your user who needs to update the data will have a very significant delay, most likely with a time-out. Say you have 50 pages which take around 2s each to fetch & parse, that would be a wait-time of nearly 2 minutes (if you have problems or feeds are slower it could be much longer).

thx for the help gunglien.

I though of this too bevor. the one posibility is to fire about ten(or so) request in an multi-request) to speed the thing up. but, the second, more important to me is, to print the cache( no matter how old) while tried to update the whole thing. if cache is more the x-seconds old, it should be easy to implement an meta refresh in the page.

cron is not enabled on the webspace I try to run symphony, and symphony cron dont work in 2.3.3.

PHP Fatal error: Call to a member function getCurrentPageURL() on a non-object in

I will try to fix this sometimes.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details