setSurfaces Method

Callable

  • Replaces a product.

    example
    editor.getProduct()
        // When we get the product.
        .then(function(product) {
            // Replace the product with two new pages.
            product.setSurfaces([
                { width: 300, height: 300 },
                { designFile: "postcard" }
            ])
            // If there was an error while replacing pages in the product.
            .catch(function (error) {
                console.error("Setting surfaces failed with exception: ", error);
            });
        });
    

    Parameters

    Returns Promise < Product >

    The product instance with the new surfaces.