---
title: "getProduct Method"
canonical: https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.editor.getproduct.htm
archived: true
applies_to:
  - product: "Customer's Canvas On-Premises"
  - product: "Design Editor"
    versions: ["6.15.0", "6.x (may differ)"]
---

**You’re viewing outdated documentation.** [View the latest Customer’s Canvas On-Premises documentation](https://customerscanvas.com/docs/on-premises/).

# getProduct Method

**Applies to:** Customer's Canvas On-Premises; Design Editor 6.15.0, 6.x (may differ) · **Archived documentation**
 
### Callable
 
- getProduct( ) :  Promise &lt; [Product](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.product.htm.md) &gt;

- Returns the product currently loaded in the editor.
  
 - example
     - ```
    // Let us add a back side to the postcard.
    editor.getProduct()
        // When we get the product.
        .then(function(product) {
            // If postcard has no back side.
            if (product.surfaces.length < 2) {
                   // Adding the back to the loaded product.
                return product.addSurface(
                    { 
                        // Defining the template file.
                        printAreas: [{ designFile: "postcard_side2"}]
                    })
                    // If the back side is added to the postcard.
                    .then(function(newProduct) {
                        // Replace the loaded product with the new one.
                        product = newProduct;
                    });
            }
        })
        // If there was an error while getting the product or adding a back side to the postcard.
        .catch(function (error) {
            console.error("Adding surface failed with exception: ", error);
        });
    ```

#### Returns Promise &lt; Product &gt;
 
    The product loaded in the editor.
