Why do you want to loop through all products in the first place?
Don’t you just want it on the product page itself and fill in the product data or is there a specific reason why you want to loop through all of your products?
Thanks for that mate.
At the moment I have manually filled it out but doing it this way I would have thought it would update the schema file when you add new products would it not? or is this a bad idea?
Also, the more for loops you add to a site will it put heavy slow down on it?
@luke - No worries
Yeah this will automaticly add new products, but not quite sure why you want to do this on all pages. I thought you just wanted the info of the product on which product page the user is currently on?