-
Notifications
You must be signed in to change notification settings - Fork 0
/
recommendedPlacement.js
63 lines (56 loc) · 3.73 KB
/
recommendedPlacement.js
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
class recommendedPlacement {
constructor(placementData) {
this.placementData = placementData;
}
render() {
const {
clickURL,
clickTrackingURL,
salePriceCents,
imageURL,
name,
priceCents,
productURL,
strategyMessage
} = this.placementData;
return `
<div id="optimizely-extension-5b6a6c9799b446779e7b6edfd7af32c3" class="optly-recommendations" style="background-color:rgba(255, 255, 255, 1)">
<div class="optly-recommendations__inner">
<h3 class="block__title">${strategyMessage}</h3>
<div class="optly-reco-scroller-chevron optly-reco-scroller-chevron-left">
<a href="${clickURL}">
<img src="data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9.24 16"><title>left chevron active</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path d="M0,8,7.74.26A.88.88,0,0,1,9,1.5L2.49,8,9,14.5a.88.88,0,0,1-1.24,1.24Z"></path></g></g></svg>">
</a>
</div>
<div class="optly-recommendations-scroller">
<ul class="cara" style="width: 2300px;">
<li class="ui-carousel--related__item">
<a href="https://www.missguided.co.uk/rust-bardot-slinky-ruched-bodycon-midaxi-dress-10142139" class="reco-link">
<div class="reco-img-wrapper">
<div class="reco-img-container">
<img src="https://media.missguided.com/s/missguided/DE928991_set/1/rust-bardot-slinky-ruched-bodycon-midaxi-dress.jpg?$product-page__main--1x$&w=300">
</div>
</div>
</a>
<div class="price-box">£22.00</div>
<p class="reco-desc">rust bardot slinky ruched bodycon midaxi...</p>
<div class="reco-details">
<div class="10142139-RUST-sizes reco-bottom--size"><ul class="size-drop-down"><li class="init">select your size</li><li data-value="4" data-id="7399" class="available">Size 4</li><li data-value="6" data-id="7357" class="available">Size 6</li><li data-value="8" data-id="7358" class="available">Size 8</li><li data-value="10" data-id="7359" class="available">Size 10</li><li data-value="12" data-id="7360" class="available">Size 12</li><li data-value="14" data-id="7361" class="available">Size 14</li><li data-value="16" data-id="7362" class="available">Size 16</li></ul></div>
<div class="reco-bottom--add">
<a class="button reco-add-to-bag" href="#" data-super_attribute="super_attribute[164]" data-productid="1035960" data-sku="10142139-RUST">add to bag</a>
</div>
</div>
</li>
</ul>
</div>
<div class="optly-reco-scroller-chevron optly-reco-scroller-chevron-right">
<a href="#">
<img src="data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9.24 16"><title>right chevron active</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path d="M9.24,8,1.5,15.74A.88.88,0,0,1,.26,14.5L6.76,8,.26,1.5A.88.88,0,0,1,1.5.26Z"></path></g></g></svg>">
</a>
</div>
</div>
</div>
`
}
}
export { recommendedPlacement };