---
title: "setMockups Method"
canonical: https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.objectmodel.product.setmockups.htm
archived: true
applies_to:
  - product: "Customer's Canvas On-Premises"
  - product: "Design Editor"
    versions: ["4.4.25", "4.x (may differ)"]
---

**You’re viewing outdated documentation.** [View the latest Customer’s Canvas On-Premises documentation](https://customerscanvas.com/docs/on-premises/).

# setMockups Method

**Applies to:** Customer's Canvas On-Premises; Design Editor 4.4.25, 4.x (may differ) · **Archived documentation**
 
### Callable
 
- setMockups(mockupsData:  [IMockupData](https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.objectmodel.imockupdata.htm.md) [], options?:  object ) :  Promise &lt; [Product](https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.objectmodel.product.htm.md) &gt;

- Sets mockups for several product pages.
  
 - example
     - ```
    editor.getProduct()
        .then(function (product) {
            product.setMockups([
                {
                    surface: product.surfaces[0],
                    mockup: null
                }, {
                    surface: product.surfaces[1],
                    mockup: { up: "mockup1" }
                }, {
                    surface: product.surfaces[2],
                    mockup: { up: "mockup2" }
                }
            ],
            { updateRevertData: false, addToHistory: false })
            .then(function (product) {
                    console.log("Mockups are successfully set for the product " + product.id);
            });
        })
        .catch(function (error) {
            console.error("Setting up the mockups failed with exception: ", error);
        });
    ```

#### Parameters

    - ##### mockupsData: [IMockupData](https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.objectmodel.imockupdata.htm.md) [] 
  
        The product surface with mockups and preview mockups.
    - #####  Optional options: object 
  
        Mockup additional configuration.

        - #####  Optional addToHistory:  boolean 
  
            If `false`, the new mockup cannot be reverted using the **Undo** button. The default value is `true`.
        - #####  Optional updateRevertData:  boolean 
  
            If `true`, the new mockup is stored as one to restore when the product is reverted. Otherwise, the previously stored mockup is restored on a product revert. The default value is `true`.

#### Returns Promise &lt; Product &gt;
 
    A new product instance containing the changed surfaces.
