Repository navigation
Expand file tree
/
Copy pathexample.html
More file actions
49 lines (45 loc) · 1.68 KB
/
Copy pathexample.html
File metadata and controls
49 lines (45 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Constructor.io PLP - Example</title>
<!-- Deferred so it downloads in parallel with HTML parsing and executes before DOMContentLoaded -->
<script defer src="../../dist/cio-plp/custom-cio-plp.js"></script>
<style>
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, sans-serif;
}
</style>
</head>
<body>
<!-- The PLP component will mount to this element -->
<div id="cio-plp-container"></div>
<script>
// Wait for DOMContentLoaded so the deferred bundle above has executed
// and CioPlp is defined on the global scope.
document.addEventListener('DOMContentLoaded', () => {
// Basic usage - mount to a custom selector
CioPlp({
selector: '#cio-plp-container',
apiKey: 'YOUR_CONSTRUCTOR_API_KEY',
});
// With Shopify defaults (uses predefined Shopify selector and configuration)
// CioPlp({
// useShopifyDefaults: true,
// apiKey: 'YOUR_CONSTRUCTOR_API_KEY',
// });
// With all options
// CioPlp({
// selector: '#cio-plp-container', // CSS selector for the container element
// apiKey: 'YOUR_CONSTRUCTOR_API_KEY',
// includeCSS: true, // Include default styles (default: true)
// useShopifyDefaults: false, // Use Shopify default configuration
// // ...additional CustomCioPlp props
// });
});
</script>
</body>
</html>