This is the most easy way to embedd an editor in any webpage or system. It just needs a few lines of code an you have an editor embedded in your website, your shop or wherever you can insert html.
Try it yourself: Just open any of your templates (Should have a configured Buyer Side). Open the token Window and click on Embedd. A ready made code example for this document with the shop token embedded and the template name integrated will get displayed.
Now visit one of the countless webpage test offerings e.g. click here to open codepen
Copy and paste the embedd code into the html window of codepen. And voila a your first buyer configurable Printess Document will be loaded and the editor in buyer mode will open.
The following parameters should get customized when embedding into your ecommerce infrastructure:
name - this parameter holds the template name to load. This Parameter can also take an ID of a customer edit and will then load the customer edited document (see below).
basketId - this should contain your user or basketID to allow users to upload images which are private to them / to this session
token - by default this is the Shop-Token (s.a.) It allows users to open templates and to upload images.
Form Fields - You can also initialized any number of form-fields by passing values in the iframe-src-url:
Every form field assignment has to be prefixed by “FF_” followed by the name or the ID the form-field. The URI-Encoded value comes after the “=”. In the example a form field named “Name” is set to “Peter Meyer” and a form field named “Email” is set to “firstname.lastname@example.org”
All parameters must be URL-encoded (e.g. a space will be represented by ‘%20’)
There is also a button for saving customer edits of the document just like an add to card button would do to save a customer order into a shoping basket. The return value of this API call is an ID under which this customer edit can either get ordered as a print file or get loaded again by supplying it to as template name, or if the editor is already open by using loadJson like in the example code.