First of all let’s clarify things!
1) What WIDGET are we talking about ?
2) How do look like its EMBED-CODE ?
3)
I am trying to integrate an external 3D configurator on my Wix site using the old Wix Editor (not Wix Studio) . The script requires a fixed container with a specific ID (example-container
).
What element exactly did you try?
a) Directly on Wix-Page (Dashboard-Settings) → CUSTOM-CODE ?
b) HTML-Comp (probably won’t work) like you already recognized the culprit/bottleneck.
c) What about → CUSTOM-ELEMENT ???
4) Which possibilities else do we have?
Well this will depend on your external provider.
a) Only EMBED-WIDGETS → PROBLEMATIC-BOTTLENECK???
b) API -SUPPORT ??? → using VELO-API ???
c) Maybe even NPM-SUPPORT? → installing customers NPM on Wix-page ???
d) Working over http-requests / http-functions / queries ?
e) REST-API-SUPPORT ??
f) Wix-SDKs ???
f) Webhooks
So, it will also depend a lot onto your external provider (3.-party).
→ HACK-MODE-ACTIVATED
!!! Now let’s go into details !!!
You’re running into a known limitation of Wix’s old Editor:
Wix does not allow fixed HTML IDs on live pages. Even though you can set an id
in the editor, Wix replaces it at runtime with a generated ID like comp-mf9h5875
. This is done to prevent conflicts between apps and widgets.
However, there are workarounds to integrate an external 3D configurator that requires a fixed container ID.
Your aim:
You want to embed an external 3D configurator into your Wix site, without using an iframe, so that it:
- Renders directly inside the Wix page DOM in a fixed container.
- Has a stable, predictable container ID (e.g.,
example-container
) that the configurator can target.
- Can interact directly with Wix features, especially the shopping cart, to:
- Send product customization data (colors, sizes, etc.).
- Trigger Wix cart updates programmatically.
- Works seamlessly in live mode, not just in the Wix Editor preview.
Your problem:
- Wix wraps all elements in a shadow DOM-like structure.
- The ID you set in the editor (
example-container
) is only for the editor, not the live site.
- At runtime, Wix generates unique IDs (
comp-xxxxxxx
) for every element.
- This means any external script that directly uses
#example-container
will fail because that element never exists in the published DOM.
.
.
.
But like i always like to say: !!! Where there’s a will, there’s a way !!!
1. Possible-Workaround: Setting the fixed ID dynamically (not tested)
You can try to use Velo (Wix Code) to assign the correct fixed ID dynamically after the page loads.
Steps:
- Give your container a Wix ID in the editor (e.g.,
configuratorBox
).
- Add this Velo code to your site:
$w.onReady(function () {
// Dynamically assign fixed ID
const wixBoxId = "#configuratorBox";
const fixedId = "example-container";
setTimeout(() => {
const element = document.querySelector(`[data-testid="configuratorBox"]`) || document.getElementById($w(wixBoxId).id);
if (element) {
element.setAttribute("id", fixedId);
// Initialize the external 3D configurator
initConfigurator({
containerId: fixedId,
onComplete: (configData) => {
// Add to Wix cart when configuration is done
import('wix-stores').then(({ cart }) => {
cart.addToCart({
productId: configData.productId,
quantity: 1,
options: configData.options
});
});
}
});
}
}, 100);
});
Did you belive into this b_ _ _ s _ _ _-code (generated by an AI)?
!!! ME NOT !!! 
Well this of course won’t work !!!
But wait, there is maybe light at the end of the tunnel…
What about …
… and …
… well even the mentioned Webhooks included…
And this is surely only one of possible working solutions and if you give more efforts to search for more information, you will find even more possible solutions!!!
Check all your possibilities!!! (provided by Wix and your 3.-party)
And by the way, a → CUSTOM-ELEMENT ← should also work for you, i asume a → 90% success-rate, if you will use it.