I have an ecommerce site and am trying to generate product feeds for Googles merchant center.
It started out as one product feed for one country, one language and one currency, as we're growing we've a number for different feeds for numerous languages, different prices for different regions.
I had just been creating them manually but want to improve this so I've created a database of the combinations of countries languages and currencies that we want and took out the basic structure for generating it and put it in a function.
So now I have something like this:
$sql = "SELECT * FROM product_feeds";
$stmt = DB::run($sql);
while($row = $stmt->fetch(PDO::FETCH_ASSOC)){
$country = $row['country'];
$currency = $row['currency'];
$language = $row['language'];
generate_product_feeds($country,$currency,$language);
}
This kind of works fine. The issue is it will get through about two or three product feeds before I get a maximum execution time error.
Is there a way to stall the functions or do this in seperate requests so it will run properly.