Spectrum Integration
  • Introduction
  • Ecommerce
    • Front End Integration
    • Load Design
    • Add to Cart
    • Save Design
    • Generate Cart Item
    • Pricing & Availability
    • Order Acknowledgement
    • Shipment Notification
    • Update Order Status
    • Order Search
    • Integration Driver
    • Production Related File Delivery
    • Spectrum + Shopify Integration
      • Overall Flow
      • Product Set Up: "Add-ons"
      • Line Item Properties
      • Shopify Cart
      • Order Processing
  • API
    • Environments
    • Image QueryString API
      • Image Transforms
      • Image Filters
      • Image Encoding
    • Rendering
    • WebToPrint (W2P)
    • Assets
    • Rate Limiting
  • Marketing
    • Share
  • General
    • Glossary
Powered by GitBook
On this page

Was this helpful?

  1. Ecommerce

Save Design

PreviousAdd to CartNextGenerate Cart Item

Last updated 3 years ago

Was this helpful?

Similar to spectrumAddtoCart,Spectrum will send a recipeID, SKUs, quantities, and other relevant data to the page via the spectrumSaveDesign function. Once the recipe is saved, the design is locked, and available for recall within Spectrum for the length of the client contract.

The spectrumSaveDesign function should accept a single payload argument and use it to add items to the cart. The implementation of this call is the responsibility of the e-commerce development team. We have provided some example use cases below to show how this functionality can be useful to users.

window.spectrumSaveDesign = function(payload) {
  // payload.recipeSetId: string
  // payload.items: array | null
  // payload.items[n]: object
  // payload.items[n].sku: string | null
  // payload.items[n].name: string | null
  // payload.items[n].quantity: number | null
  // payload.primaryThumbnailAngle: string | null
  // payload.thumbnailsByAngle: array | null
  // payload.thumbnailsByAngle[n].angleName: string
  // payload.thumbnailsByAngle[n].url: string
  // payload.options: object | null
  // payload.options[optionName]: string
}

Common Use Case

The most common use case for Save Design is when a user may want to design a few items and come back and order them later. In this case, the recipes are saved and 2D images may be retrieve to showcase in a "My Designs" section of their account. Using the Spectum routes, you may showcase the Saved designs on any page of your website.

It should be noted that Spectrum simply calls this JavaScript function and must be implemented to produce the correct behavior. For example:

  • Determining if the user is authenticated.

  • Redirecting to login if user is not authenticated

  • Saving the Recipe to the user's account or other data store.

Rendering