Wix Stores provides placeholders in their default product page where you can extend the functionality by injecting embedded scripts:
Below the product SKU you should find:
And at the bottom of the product page you should find:
The placeholders are empty divs with data-hooks that allow you to add content to these specific page locations.
To inject data into a placeholder, follow these steps:
Develop the HTML content or elements you want to insert into the placeholder.
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
:
Add the script to your app using an embedded script extension. You can do this in your app's dashboard 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.