I have created this system that automatically sends printready files (PDF’s) to the email of our print service.
Works just fine with 1 product, but if an order has 2 products it won’t work - It won’t iterate over several products in the same order. It only iterates over the very first product.
So in the end it will send an email containing the shared link of only the first product and not the second product, nor third and so on… Is there any way to get around this?
I’m using item name to locate the files both in Woocomerce and in Google Drive.
Test order
An order of 2 products: “Plain Foil for Soundboks 2 Backside - Light Blue” and “Plain Foil for Soundboks 3 Grill - Purple”.
Update:
The system recognize both “purple product” and “blue product” and finds the shared link for both of them perfectly.
But just before it sends the email I use the text aggregator to combine the shared links using file id. This somehow ends up messing everything up as the final e-mail only sends the shared link for the first product “blue” and not the second. Also worth noticing that {{1.lineItems.quantity}} is 1, not 2 for some reason…
So I got the whole thing working! The only thing is that it sends 2 different e-mail (1 e-mail for each product). I want to send 1 e-mail containing 2 links, not 2 e-mail containing 1 link each.