MegaEdit has a number of default scripts avaliable to use (MegaEdit PRO version ONLY). Here we look at the Layout Based Autofill script and how to apply to a product.
Firstly enable the script against your chosen dynamic product under the dynamic products setup displayed below.
This script has 2 functionalities, primarily it will use saved layout designs to auto populate the max amount of images in a the specified media album for the dynamic product with one of each the layout designs and fill each of the empty image placeholder fields on the pre saved layouts contained on the canvas.
If the canvas being used has NO layouts saved at all then it's secondry functionality will be to auto fill any empty image placeholder fields on the canvas from a selected media album of your choice.
Using the first functionality (layout designs are being used) as an example: You would start with a blank document and some predesigned layouts as illustrated below.
You would then click the Autofill button to get the pop up prompt as displayed below.
You are required to select a media Album from the dropdown, the images in this album will be used once across the canvas pages. The Start Fresh tick box, if ticked any images currently placed in any of the image fields will be "replaced" by a new image from the media album. If left unticked then the images currently be used in the placeholder fields will remain. As stated in the pop up the book/product will be filled using the layout designs, repeated if neccessary until either all images from the album have been used or the max page count has been reached as displayed below.
Then using the secondry option, no pre-saved layouts, the sequence of steps would be as follows:
Below the canvas has been prepopulated with 4 image placeholder fields and 1 has already been filled with a media image. AutoFill has been clicked and the pop up is displayed.
I have selected as an example an album called "Preview size 4000" - I have set the start fresh box as not selected - so my current image on the canvas in the image placeholder should remain when we click ok - all other empty fields will be filled ONLY. No extra layouts will be used as in this example there are not any saved against the canvas.
As you can see the top left image placeholder has remained and the remaining empty fields have been placed with an image.