Add the photo book editor to Shopify
Add the editor container and embed script to your theme, using a shop metafield for your merchant ID.
For stores Prodigi has connected to Studio, the shopify option adds the finished book to the cart as the variant Studio has set for its page count, with a private checkout ticket, then opens checkout.
Studio records each paid order from Shopify’s signed paid-order notification and sends it to Prodigi for printing automatically.
Shopify example
{% comment %} In your theme liquid file {% endcomment %}
<div id="photobook-designer"></div>
<script src="https://studio.prodigi.com/embed.js" defer></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
PhotobookGenerator.create(
document.getElementById('photobook-designer'),
{
merchantId: '{{ shop.metafields.studio.merchant_id }}',
// Stores connected to Studio by Prodigi: Studio picks the
// variant for the book's page count and adds it to the cart
// with a private checkout ticket, then opens checkout.
shopify: true,
onError: function(err) { console.error(err); },
}
);
});
</script>