Customize Wix Stores Using Embedded Scripts

Wix Stores provides placeholders in their default product page where you can extend the functionality by injecting embedded scripts:

Step 1 | Locate the placeholders

Below the product SKU you should find:

Copy
1

And at the bottom of the product page you should find:

Copy
1

The placeholders are empty divs with data-hooks that allow you to add content to these specific page locations.

Step 2 | Inject data into a placeholder

To inject data into a placeholder, follow these steps:

  1. Develop the HTML content or elements you want to insert into the placeholder.

  2. Write a JavaScript script to append your content to the relevant placeholder. Ensure your script waits until the page is fully loaded by using the DOMContentLoaded event or a similar method. The following example appends a new paragraph to the details-placeholder:

    Copy
    1
  3. Add the script to your app using an embedded script extension. You can do this with through the Wix Dev Center or via the CLI. For detailed instructions, refer to the following resources:

Important: Make sure you append your DOM elements to the placeholder's existing content. Don't replace the content as other apps may be using the same placeholder.

See also

Was this helpful?
Yes
No