To add your designs, you just need to pass an array of designs during plugin initialization. To understand how a design object should be formed, refer to the following example:

var options = {
    designs: [
      {
          "src": "url",
          "name": "My first design",
          "categories": ["Category 1", "Category 2"],
          "price": 2,
          "parameters": {}
      },
      {
          "src": "http://localhost:8080/designs/Be_a_unicorn_in_a_field_of_horses_6105.svg",
          "name": "My second design",
          "categories": ["Category 2"],
          "price": 3,
          "parameters": {}
      }
    ]
}

var instance = new AsukaDesigner('#myId', options); // Create an instance of the main plugin class

Was this article helpful to you? Yes 1 No

How can we help?