www.duafehairsalon.com
Open in
urlscan Pro
2620:127:f00f:e::
Public Scan
Submitted URL: http://www.duafehairsalon.com//cart
Effective URL: https://www.duafehairsalon.com//cart
Submission: On August 29 via api from US — Scanned from CA
Effective URL: https://www.duafehairsalon.com//cart
Submission: On August 29 via api from US — Scanned from CA
Form analysis
3 forms found in the DOMGET /search
<form action="/search" method="get" role="search" data-hs-cf-bound="true">
<div class="input-group--underline">
<input class="input-group__field" type="search" name="q" value="" placeholder="Search" aria-label="Search" tabindex="-1">
<div class="input-group__btn">
<button type="submit" class="btn btn--clear btn--square" tabindex="-1">
<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-search" viewBox="0 0 21.4 21.4">
<path fill="#444" d="M13.4 0c-4.4 0-8 3.6-8 8 0 1.8.6 3.5 1.7 4.9L0 20l1.4 1.4 7.1-7.1c1.4 1.1 3.1 1.7 4.9 1.7 4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 14c-3.3 0-6-2.7-6-6s2.7-6 6-6 6 2.7 6 6-2.7 6-6 6z"></path>
</svg>
<span class="icon__fallback-text">Search again</span>
</button>
</div>
</div>
</form>
POST https://www.duafehairsalon.com/cart?locale=en&step=contact_information
<form action="https://www.duafehairsalon.com/cart?locale=en&step=contact_information" method="post" novalidate="" class="cart__form" data-hs-cf-bound="true">
<table class="cart__table">
<thead class="cart__table-header border-bottom">
<tr>
<th class="text-left" colspan="2">Product</th>
<th class="text-right">Price</th>
<th class="text-center">Quantity</th>
<th class="text-right">Total</th>
</tr>
</thead>
<tbody data-cart-item-list="">
<tr class="cart-item ajax-cart__template" data-cart-item="" data-cart-item-id="">
<td class="cart-item__image-wrapper">
<a class="cart-item__image-link" href="/collections/all" style="background-image: none;" data-cart-item-background-image="" data-cart-item-href="">
<img class="cart-item__image lazyload hide" src="//www.duafehairsalon.com/cdn/shopifycloud/shopify/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_medium.gif" alt="" data-cart-item-image="">
</a>
</td>
<td class="cart-item__meta small--text-left">
<a class="cart-item__meta-title h4" href="" data-cart-item-href="" data-cart-item-title=""></a>
<p class="cart-item__meta-variant" data-cart-item-variant-title="">
</p>
<ul class="cart-item__properties" data-cart-item-property-list="">
<li class="cart-item__property ajax-cart__template" data-cart-item-property=""> t: e </li>
</ul>
<div class="medium-up--hide">
<div data-cart-item-price-container=""><span class="cart-item__original-price cart-item__price"></span></div>
<ul class="order-discount order-discount--list order-discount--title order-discount--cart medium-up--hide" aria-label="Discount" data-cart-item-discount-list="">
<li class="order-discount__item ajax-cart__template" data-cart-item-discount=""><svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-saletag">
<path d="M10 3a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0-3H7a1 1 0 0 0-.71.29l-6 6a1 1 0 0 0 0 1.42l4 4a1 1 0 0 0 1.42 0c.19-.2 5.8-5.81 6-6A1 1 0 0 0 12 5V2a2 2 0 0 0-2-2z" fill="#231F20"></path>
</svg><span data-cart-item-discount-title=""></span> (-<span data-cart-item-discount-amount=""></span>) </li>
</ul>
</div>
<p class="small--hide">
<a href="/cart/change?line=1&quantity=0" class="btn-link cart-item__remove" data-cart-item-delete="">Remove</a>
</p>
<p class="cart-item__message" data-item-message=""></p>
</td>
<td class="cart-item__price-wrapper small--hide text-right">
<div data-cart-item-price-container=""><span class="cart-item__original-price cart-item__price"></span></div>
<ul class="order-discount order-discount--list order-discount--title order-discount--cart" aria-label="Discount" data-cart-item-discount-list=""></ul>
</td>
<td class="cart-item__update-wrapper text-right">
<a href="/cart/change?line=1&quantity=0" class="btn-link cart-item__remove medium-up--hide" data-cart-item-delete="">Remove</a>
<div class="cart-item__qty">
<label for="quantity_" class="cart-item__qty-label" data-cart-item-label-quantity="">Quantity</label>
<input id="quantity_" class="cart-item__qty-input" value="" type="number" pattern="\d*" min="1" name="updates[]" required="" data-cart-item-input-quantity="">
</div>
</td>
<td class="text-right small--hide">
<div data-cart-item-line-price-container=""><span class="cart-item__original-price cart-item__price"></span></div>
</td>
</tr>
</tbody>
</table>
<footer class="cart-footer">
<div class="grid">
<div class="grid__item medium-up--one-half cart-note">
<label for="CartSpecialInstructions" class="cart-footer__note-label small--text-center">Special instructions for seller</label>
<textarea name="note" id="CartSpecialInstructions" class="cart-footer__note-input" rows="4" data-cart-note=""></textarea>
</div>
<div class="grid__item text-right small--text-center medium-up--one-half">
<div data-cart-discount-container="">
<div class="order-discount-cart-wrapper ajax-cart__template" data-cart-discount="">
<span class="order-discount order-discount--title order-discount--cart-title"><svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-saletag">
<path d="M10 3a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0-3H7a1 1 0 0 0-.71.29l-6 6a1 1 0 0 0 0 1.42l4 4a1 1 0 0 0 1.42 0c.19-.2 5.8-5.81 6-6A1 1 0 0 0 12 5V2a2 2 0 0 0-2-2z" fill="#231F20"></path>
</svg><span class="visually-hidden">Discount:</span><span data-cart-discount-title=""></span>
</span>
<span class="order-discount order-discount--cart-price">-<span data-cart-discount-amount=""></span></span>
</div>
</div>
<div class="cart-subtotal">
<span class="cart-subtotal__title h4">Subtotal</span>
<span class="cart-subtotal__price" data-cart-subtotal="">$0.00</span>
</div>
<p class="cart-policies text-small rte">Taxes and shipping calculated at checkout </p>
<div class="btn-group">
<input type="submit" name="update" class="btn btn--secondary supports-no-js supports-js--hide" value="Update Cart">
<style>
.lds-ellipsis {
display: inline-block;
position: relative;
width: 103px;
top: 0;
right: 0;
height: 50px
}
.lds-ellipsis div {
position: absolute;
top: 27px;
width: 11px;
height: 11px;
border-radius: 50%;
background: #282828;
animation-timing-function: cubic-bezier(0, 1, 1, 0)
}
.lds-ellipsis div:nth-child(1) {
left: 6px;
animation: lds-ellipsis1 .6s infinite
}
.lds-ellipsis div:nth-child(2) {
left: 6px;
animation: lds-ellipsis2 .6s infinite
}
.lds-ellipsis div:nth-child(3) {
left: 26px;
animation: lds-ellipsis2 .6s infinite
}
.lds-ellipsis div:nth-child(4) {
left: 45px;
animation: lds-ellipsis3 .6s infinite
}
@keyframes lds-ellipsis1 {
0% {
transform: scale(0)
}
100% {
transform: scale(1)
}
}
@keyframes lds-ellipsis3 {
0% {
transform: scale(1)
}
100% {
transform: scale(0)
}
}
@keyframes lds-ellipsis2 {
0% {
transform: translate(0, 0)
}
100% {
transform: translate(19px, 0)
}
}
.cr-delivery-method {
cursor: pointer;
}
.cr-delivery-method img {
width: 50px;
margin-top: 0;
position: relative;
top: 12px;
}
.cr-delivery-method.selected {
border-color: #b5b5b5;
background-color: #f7f7f7;
}
#pickup-container.v2 {
align-items: baseline !important;
}
.cr-delivery-methods {
width: 100%;
text-align: center;
margin: 0;
padding: 0;
display: flex;
}
.cr-delivery-method {
border-radius: 5px;
border: 1px solid #eee;
background-color: #fff;
list-style: none;
display: inline-block;
flex-grow: 1;
flex-basis: 0;
padding: 0;
margin: 0 9px 0 0;
}
.cr-delivery-method-text {
color: #282828;
}
</style>
<div id="pickup-container" class="v2" style="display: flex; flex-direction: column; margin-bottom: 1rem; margin-top: 1rem;">
<div class="pickup-loading hide">
<div class="lds-ellipsis">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div id="pickup-header"></div>
<div class="cr-delivery-methods">
<div class="cr-delivery-method cr-shipping-method selected">
<img src="//www.duafehairsalon.com/cdn/shop/t/4/assets/cr-shipping-icon.png?v=68766003840615150171587308039" class="pickup-icon">
<p class="cr-delivery-method-text">Shipping</p>
</div>
<div class="js-toggle-pickup pickup-button cr-delivery-method">
<img src="//www.duafehairsalon.com/cdn/shop/t/4/assets/cr-store-pickup-icon.png?v=6168139995613020951587308038">
<p class="cr-delivery-method-text">Pickup at Duafe</p>
</div>
</div>
<div class="delivery-method-desc">Please click the checkout button to continue.</div>
<!-- Name of person picking up etc -->
<div id="pickup-details" style="display:none;">
<div class="js-stores-position-1"></div>
<label id="pickup-date-label" for="pickup-date">Pickup Date</label>
<div style="position:relative">
<input type="text" class="datepicker picker__input" id="pickup-date-start" name="pickup-date-start" placeholder="Choose a date/time" readonly="" aria-haspopup="true" aria-expanded="false" aria-readonly="false"
aria-owns="pickup-date-start_root">
<div class="picker" id="pickup-date-start_root" aria-hidden="true">
<div class="picker__holder" tabindex="-1">
<div class="picker__frame">
<div class="picker__wrap">
<div class="picker__box">
<div class="picker__header">
<div class="picker__month">August</div>
<div class="picker__year">2024</div>
<div class="picker__nav--prev picker__nav--disabled" data-nav="-1" role="button" aria-controls="pickup-date-start_table" title="Previous month"> </div>
<div class="picker__nav--next" data-nav="1" role="button" aria-controls="pickup-date-start_table" title="Next month"> </div>
</div>
<table class="picker__table" id="pickup-date-start_table" role="grid" aria-controls="pickup-date-start" aria-readonly="true">
<thead>
<tr>
<th class="picker__weekday" scope="col" title="Sunday">Sun</th>
<th class="picker__weekday" scope="col" title="Monday">Mon</th>
<th class="picker__weekday" scope="col" title="Tuesday">Tue</th>
<th class="picker__weekday" scope="col" title="Wednesday">Wed</th>
<th class="picker__weekday" scope="col" title="Thursday">Thu</th>
<th class="picker__weekday" scope="col" title="Friday">Fri</th>
<th class="picker__weekday" scope="col" title="Saturday">Sat</th>
</tr>
</thead>
<tbody>
<tr>
<td role="presentation">
<div class="picker__day picker__day--outfocus picker__day--disabled" data-pick="1722150000000" role="gridcell" aria-label="28 July, 2024" aria-disabled="true">28</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--outfocus picker__day--disabled" data-pick="1722236400000" role="gridcell" aria-label="29 July, 2024" aria-disabled="true">29</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--outfocus picker__day--disabled" data-pick="1722322800000" role="gridcell" aria-label="30 July, 2024" aria-disabled="true">30</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--outfocus picker__day--disabled" data-pick="1722409200000" role="gridcell" aria-label="31 July, 2024" aria-disabled="true">31</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1722495600000" role="gridcell" aria-label="1 August, 2024" aria-disabled="true">1</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1722582000000" role="gridcell" aria-label="2 August, 2024" aria-disabled="true">2</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1722668400000" role="gridcell" aria-label="3 August, 2024" aria-disabled="true">3</div>
</td>
</tr>
<tr>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1722754800000" role="gridcell" aria-label="4 August, 2024" aria-disabled="true">4</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1722841200000" role="gridcell" aria-label="5 August, 2024" aria-disabled="true">5</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1722927600000" role="gridcell" aria-label="6 August, 2024" aria-disabled="true">6</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1723014000000" role="gridcell" aria-label="7 August, 2024" aria-disabled="true">7</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1723100400000" role="gridcell" aria-label="8 August, 2024" aria-disabled="true">8</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1723186800000" role="gridcell" aria-label="9 August, 2024" aria-disabled="true">9</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1723273200000" role="gridcell" aria-label="10 August, 2024" aria-disabled="true">10</div>
</td>
</tr>
<tr>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1723359600000" role="gridcell" aria-label="11 August, 2024" aria-disabled="true">11</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1723446000000" role="gridcell" aria-label="12 August, 2024" aria-disabled="true">12</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1723532400000" role="gridcell" aria-label="13 August, 2024" aria-disabled="true">13</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1723618800000" role="gridcell" aria-label="14 August, 2024" aria-disabled="true">14</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1723705200000" role="gridcell" aria-label="15 August, 2024" aria-disabled="true">15</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1723791600000" role="gridcell" aria-label="16 August, 2024" aria-disabled="true">16</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1723878000000" role="gridcell" aria-label="17 August, 2024" aria-disabled="true">17</div>
</td>
</tr>
<tr>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1723964400000" role="gridcell" aria-label="18 August, 2024" aria-disabled="true">18</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1724050800000" role="gridcell" aria-label="19 August, 2024" aria-disabled="true">19</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1724137200000" role="gridcell" aria-label="20 August, 2024" aria-disabled="true">20</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1724223600000" role="gridcell" aria-label="21 August, 2024" aria-disabled="true">21</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1724310000000" role="gridcell" aria-label="22 August, 2024" aria-disabled="true">22</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1724396400000" role="gridcell" aria-label="23 August, 2024" aria-disabled="true">23</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1724482800000" role="gridcell" aria-label="24 August, 2024" aria-disabled="true">24</div>
</td>
</tr>
<tr>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1724569200000" role="gridcell" aria-label="25 August, 2024" aria-disabled="true">25</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1724655600000" role="gridcell" aria-label="26 August, 2024" aria-disabled="true">26</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1724742000000" role="gridcell" aria-label="27 August, 2024" aria-disabled="true">27</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1724828400000" role="gridcell" aria-label="28 August, 2024" aria-disabled="true">28</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--today picker__day--disabled" data-pick="1724914800000" role="gridcell" aria-label="29 August, 2024" aria-disabled="true">29</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--highlighted" data-pick="1725001200000" role="gridcell" aria-label="30 August, 2024" aria-activedescendant="true">30</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--infocus picker__day--disabled" data-pick="1725087600000" role="gridcell" aria-label="31 August, 2024" aria-disabled="true">31</div>
</td>
</tr>
<tr>
<td role="presentation">
<div class="picker__day picker__day--outfocus picker__day--disabled" data-pick="1725174000000" role="gridcell" aria-label="1 September, 2024" aria-disabled="true">1</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--outfocus" data-pick="1725260400000" role="gridcell" aria-label="2 September, 2024">2</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--outfocus picker__day--disabled" data-pick="1725346800000" role="gridcell" aria-label="3 September, 2024" aria-disabled="true">3</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--outfocus" data-pick="1725433200000" role="gridcell" aria-label="4 September, 2024">4</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--outfocus picker__day--disabled" data-pick="1725519600000" role="gridcell" aria-label="5 September, 2024" aria-disabled="true">5</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--outfocus" data-pick="1725606000000" role="gridcell" aria-label="6 September, 2024">6</div>
</td>
<td role="presentation">
<div class="picker__day picker__day--outfocus picker__day--disabled" data-pick="1725692400000" role="gridcell" aria-label="7 September, 2024" aria-disabled="true">7</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<input type="text" id="pickup-time" style="display: none;" readonly="" class="picker__input" aria-haspopup="true" aria-expanded="false" aria-readonly="false" aria-owns="pickup-time_root">
<div class="picker picker--time" id="pickup-time_root" aria-hidden="true">
<div class="picker__holder" tabindex="-1" style="">
<div class="picker__frame">
<div class="picker__wrap">
<div class="picker__box">
<ul class="picker__list" role="listbox" aria-controls="pickup-time">
<li class="picker__list-item" data-pick="0" role="option" aria-label="12:00 AM">12:00 AM</li>
<li class="picker__list-item" data-pick="30" role="option" aria-label="12:30 AM">12:30 AM</li>
<li class="picker__list-item" data-pick="60" role="option" aria-label="1:00 AM">1:00 AM</li>
<li class="picker__list-item" data-pick="90" role="option" aria-label="1:30 AM">1:30 AM</li>
<li class="picker__list-item" data-pick="120" role="option" aria-label="2:00 AM">2:00 AM</li>
<li class="picker__list-item" data-pick="150" role="option" aria-label="2:30 AM">2:30 AM</li>
<li class="picker__list-item" data-pick="180" role="option" aria-label="3:00 AM">3:00 AM</li>
<li class="picker__list-item" data-pick="210" role="option" aria-label="3:30 AM">3:30 AM</li>
<li class="picker__list-item" data-pick="240" role="option" aria-label="4:00 AM">4:00 AM</li>
<li class="picker__list-item" data-pick="270" role="option" aria-label="4:30 AM">4:30 AM</li>
<li class="picker__list-item" data-pick="300" role="option" aria-label="5:00 AM">5:00 AM</li>
<li class="picker__list-item" data-pick="330" role="option" aria-label="5:30 AM">5:30 AM</li>
<li class="picker__list-item" data-pick="360" role="option" aria-label="6:00 AM">6:00 AM</li>
<li class="picker__list-item" data-pick="390" role="option" aria-label="6:30 AM">6:30 AM</li>
<li class="picker__list-item" data-pick="420" role="option" aria-label="7:00 AM">7:00 AM</li>
<li class="picker__list-item" data-pick="450" role="option" aria-label="7:30 AM">7:30 AM</li>
<li class="picker__list-item" data-pick="480" role="option" aria-label="8:00 AM">8:00 AM</li>
<li class="picker__list-item" data-pick="510" role="option" aria-label="8:30 AM">8:30 AM</li>
<li class="picker__list-item" data-pick="540" role="option" aria-label="9:00 AM">9:00 AM</li>
<li class="picker__list-item" data-pick="570" role="option" aria-label="9:30 AM">9:30 AM</li>
<li class="picker__list-item" data-pick="600" role="option" aria-label="10:00 AM">10:00 AM</li>
<li class="picker__list-item" data-pick="630" role="option" aria-label="10:30 AM">10:30 AM</li>
<li class="picker__list-item" data-pick="660" role="option" aria-label="11:00 AM">11:00 AM</li>
<li class="picker__list-item" data-pick="690" role="option" aria-label="11:30 AM">11:30 AM</li>
<li class="picker__list-item" data-pick="720" role="option" aria-label="12:00 PM">12:00 PM</li>
<li class="picker__list-item" data-pick="750" role="option" aria-label="12:30 PM">12:30 PM</li>
<li class="picker__list-item" data-pick="780" role="option" aria-label="1:00 PM">1:00 PM</li>
<li class="picker__list-item" data-pick="810" role="option" aria-label="1:30 PM">1:30 PM</li>
<li class="picker__list-item" data-pick="840" role="option" aria-label="2:00 PM">2:00 PM</li>
<li class="picker__list-item" data-pick="870" role="option" aria-label="2:30 PM">2:30 PM</li>
<li class="picker__list-item picker__list-item--highlighted picker__list-item--viewset" data-pick="900" role="option" aria-label="3:00 PM" aria-activedescendant="true">3:00 PM</li>
<li class="picker__list-item" data-pick="930" role="option" aria-label="3:30 PM">3:30 PM</li>
<li class="picker__list-item" data-pick="960" role="option" aria-label="4:00 PM">4:00 PM</li>
<li class="picker__list-item" data-pick="990" role="option" aria-label="4:30 PM">4:30 PM</li>
<li class="picker__list-item" data-pick="1020" role="option" aria-label="5:00 PM">5:00 PM</li>
<li class="picker__list-item" data-pick="1050" role="option" aria-label="5:30 PM">5:30 PM</li>
<li class="picker__list-item" data-pick="1080" role="option" aria-label="6:00 PM">6:00 PM</li>
<li class="picker__list-item" data-pick="1110" role="option" aria-label="6:30 PM">6:30 PM</li>
<li class="picker__list-item" data-pick="1140" role="option" aria-label="7:00 PM">7:00 PM</li>
<li class="picker__list-item" data-pick="1170" role="option" aria-label="7:30 PM">7:30 PM</li>
<li class="picker__list-item" data-pick="1200" role="option" aria-label="8:00 PM">8:00 PM</li>
<li class="picker__list-item" data-pick="1230" role="option" aria-label="8:30 PM">8:30 PM</li>
<li class="picker__list-item" data-pick="1260" role="option" aria-label="9:00 PM">9:00 PM</li>
<li class="picker__list-item" data-pick="1290" role="option" aria-label="9:30 PM">9:30 PM</li>
<li class="picker__list-item" data-pick="1320" role="option" aria-label="10:00 PM">10:00 PM</li>
<li class="picker__list-item" data-pick="1350" role="option" aria-label="10:30 PM">10:30 PM</li>
<li class="picker__list-item" data-pick="1380" role="option" aria-label="11:00 PM">11:00 PM</li>
<li class="picker__list-item" data-pick="1410" role="option" aria-label="11:30 PM">11:30 PM</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<label id="pickup-date-start-error" class="valid" for="pickup-date-start" style="display: none;"></label>
<label id="pickup-name-label" for="pickup-name">Name of Person Collecting</label>
<!--<input style="margin-bottom: 0px;" type="text" id="pickup-name" name="pickup-name" placeholder="Your Name">-->
<input style="margin-bottom: 0;" type="hidden" id="pickup-name" name="pickup-name" placeholder="Your Name">
<div style="display: flex;">
<div style="margin-right: 10px;">
<input style="margin-bottom: 0px;" type="text" id="pickup-first-name" name="pickup-first-name" placeholder="First name">
</div>
<div>
<input style="margin-bottom: 0px;" type="text" id="pickup-last-name" name="pickup-last-name" placeholder="Last name">
</div>
</div>
<label id="pickup-number-label" for="pickup-number">Contact Number</label>
<input type="text" id="pickup-number" name="pickup-number" placeholder="">
<label id="pickup-email-label" for="pickup-email">Email address</label>
<input type="text" id="pickup-email" name="pickup-email" placeholder="your email address">
<div class="js-stores-position-2"></div>
<div class="js-storepickup-message">Pick up Mon., Wed., Fridays - 9am-11am</div>
<input type="hidden" id="pickup-attribute" name="attributes[pickup]" value="0">
<input type="hidden" id="pickup-information" name="attributes[Pickup_Information]" value="">
<input type="hidden" id="pickup-selected-store" name="attributes[Pickup_Store]" value="">
<input type="hidden" id="note-pickup-date" name="attributes[Pickup_date]" value="">
<input type="hidden" id="note-pickup-time" name="attributes[Pickup_time]" value="">
<input type="hidden" id="note-pickup-name" name="attributes[Pickup_name]" value="">
<input type="hidden" id="note-pickup-phone" name="attributes[Pickup_phone]" value="">
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script>
axios.get(appUrl + 'isInstalled', {
params: {
shop: "duafehairsalon.myshopify.com"
}
}).then(function(response) {
if (response.data.status == '404') {
var elem = document.querySelector('#pickup-container');
elem.parentNode.removeChild(elem);
} else {
var pickupContainer = document.getElementById("pickup-container");
pickupContainer.classList.remove("hide");
var pickupLoadingContainer = document.querySelector('.pickup-loading');
if (pickupLoadingContainer) {
pickupLoadingContainer.classList.add("hide");
}
var storeForm = pickupContainer.closest("form");
//storeForm.action += '?locale=en';
//
storeForm.action += '?locale=en&step=contact_information';
}
}).catch(function(error) {
console.log(error);
})
</script>
<script type="text/javascript">
! function(n) {
var e = {};
function a(r) {
if (e[r]) return e[r].exports;
var t = e[r] = {
i: r,
l: !1,
exports: {}
};
return n[r].call(t.exports, t, t.exports, a), t.l = !0, t.exports
}
a.m = n, a.c = e, a.d = function(r, t, n) {
a.o(r, t) || Object.defineProperty(r, t, {
enumerable: !0,
get: n
})
}, a.r = function(r) {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(r, Symbol.toStringTag, {
value: "Module"
}), Object.defineProperty(r, "__esModule", {
value: !0
})
}, a.t = function(t, r) {
if (1 & r && (t = a(t)), 8 & r) return t;
if (4 & r && "object" == typeof t && t && t.__esModule) return t;
var n = Object.create(null);
if (a.r(n), Object.defineProperty(n, "default", {
enumerable: !0,
value: t
}), 2 & r && "string" != typeof t)
for (var e in t) a.d(n, e, function(r) {
return t[r]
}.bind(null, e));
return n
}, a.n = function(r) {
var t = r && r.__esModule ? function() {
return r.default
} : function() {
return r
};
return a.d(t, "a", t), t
}, a.o = function(r, t) {
return Object.prototype.hasOwnProperty.call(r, t)
}, a.p = "", a(a.s = "./src/index.js")
}({
"./src/includes/init.js": function(module, exports) {
eval(
"var mandatoryCollections = [];\r\nvar excludeCollections = [];\r\nfor (var c in storePickupSettings.mandatory_collections) {\r\n // Some stores have extra functions inside an empty array, this will cause errors, to prevent it we check for undefined\r\n if(storePickupSettings.mandatory_collections[c].title === undefined) continue;\r\n mandatoryCollections.push(storePickupSettings.mandatory_collections[c].title.replace(/'/g, '''));\r\n}\r\nfor (var c in storePickupSettings.exclude_collections) {\r\n if(storePickupSettings.exclude_collections[c].title === undefined) continue;\r\n excludeCollections.push(storePickupSettings.exclude_collections[c].title.replace(/'/g, '''));\r\n}\r\n\r\nvar productCollections = document.querySelectorAll('.storepickup-product-collection'), i;\r\nvar pickupContainer = document.getElementById(\"pickup-container\");\r\nvar storeForm = pickupContainer.closest(\"form\");\r\n\r\nif (pickupProductInCart === true) {\r\n // storeForm.querySelector('[name=\"checkout\"]').style = 'display: none;' // hide the form till we load the pickup options\r\n}\r\nvar excludedFromPickup = false;\r\nvar mandatoryForPickup = false;\r\nfor (i = 0; i < productCollections.length; ++i) {\r\n var value = productCollections[i].innerHTML.replace(/'/g, ''').replace(/&/, '&');\r\n // If there is an item in the cart exluded from pickup, we'll not display the store pickup option at all\r\n if (excludeCollections.indexOf(value) > -1) {\r\n //document.querySelector('#pickup-container').style = 'display: none;';\r\n\r\n //document.querySelector('#pickup-container').remove();\r\n //break;\r\n excludedFromPickup = true;\r\n }\r\n if (mandatoryCollections.indexOf(value) > -1) {\r\n mandatoryForPickup = true;\r\n document.querySelector('.pickup-button').style = 'display: none;';\r\n var newItem = document.createElement(\"span\");\r\n newItem.style = 'font-weight: bold;';\r\n var mandatoryForPickupText = pickupTranslations.en.mandatoryForPickupText? pickupTranslations.en.mandatoryForPickupText : 'An item in your cart must be collected';\r\n var textnode = document.createTextNode(mandatoryForPickupText);\r\n newItem.appendChild(textnode);\r\n\r\n pickupContainer.insertBefore(newItem, pickupContainer.childNodes[0]);\r\n //storeForm.querySelector('[name=\"checkout\"]').style = 'display: none;'\r\n break;\r\n }\r\n}\r\nif (excludedFromPickup === true && mandatoryForPickup === false) {\r\n document.querySelector('#pickup-container').remove();\r\n}\r\n\r\n\n\n//# sourceURL=webpack:///./src/includes/init.js?"
)
},
"./src/includes/storepickup.js": function(module, exports) {
eval(
"var css = `\r\n#pickup-store-search {\r\n background-position: 10px 12px;\r\n /* Position the search icon */\r\n background-repeat: no-repeat;\r\n /* Do not repeat the icon image */\r\n font-size: 16px;\r\n /* Increase font-size */\r\n padding: 12px 20px 12px 12px;\r\n /* Add some padding */\r\n border: 1px solid #ddd;\r\n /* Add a grey border */\r\n margin-bottom: 12px;\r\n /* Add some space below the input */\r\n }\r\n\r\n #storeUL {\r\n list-style-type: none;\r\n padding: 0;\r\n margin: 0;\r\n overflow: auto;\r\n border: 1px solid #dadada;\r\n border-radius: 4px; \r\n max-height: 240px;\r\n overflow-y: auto;\r\n margin-top: 0;\r\n width: 100%;\r\n }\r\n\r\n #storeUL li {\r\n margin-bottom: 0;\r\n border-bottom: 1px solid #efefef;\r\n }\r\n\r\n #storeUL li a {\r\n padding: 12px;\r\n /* Add some padding */\r\n text-decoration: none;\r\n /* Remove default text underline */\r\n display: block;\r\n /* Make it into a block element to fill the whole list */\r\n }\r\n\r\n #storeUL li a.header {\r\n background-color: #e2e2e2;\r\n /*Darker background for headers */\r\n cursor: default;\r\n /* Change cursor style */\r\n }\r\n\r\n #storeUL li a:hover:not(.header) {\r\n background-color: #eee;\r\n color: #000;\r\n /* Add a hover effect to all links, except for headers */\r\n }\r\n \r\n select#storeUL{\r\n padding: 10px;\r\n }\r\n\r\n .activeStore {\r\n background: #cccccc;\r\n /* Background for currently selected store */\r\n }\r\n\r\n #pickup-header {\r\n font-size: 0.95em;\r\n text-decoration: none;\r\n display: inline;\r\n position: relative;\r\n top: -15px;\r\n }\r\n\r\n #pickup-box {\r\n vertical-align: middle;\r\n }\r\n\r\n .pickup-hidden {\r\n display: none!important;\r\n }\r\n\r\n #pickup-details{\r\n min-width: 260px;\r\n width: 100%;\r\n }\r\n \r\n #pickup-details > div > div {\r\n width: 100%;\r\n }\r\n\r\n #pickup-details input{\r\n width:100%;\r\n border: 1px solid #efefef;\r\n }\r\n\r\n .hide{\r\n display: none!important;\r\n }\r\n #pickup-container{\r\n display: flex;\r\n -ms-flex-direction: column;\r\n flex-direction: column;\r\n margin-bottom: 1rem;\r\n margin-top: 1rem;\r\n text-align: left;\r\n align-items: flex-end;\r\n width: 100%;\r\n transition: all .4s ease-out;\r\n }\r\n .pickup-button{\r\n border: 1px solid #efefef;\r\n border-radius: 2px;\r\n padding: 10px;\r\n margin-bottom: 20px;\r\n display: inline-block;\r\n text-align: center;\r\n margin-top: 20px;\r\n margin-right: 0!important;\r\n cursor: pointer;\r\n }\r\n\r\n .selected{\r\n background: #f7f7f7; \r\n color: #1a1a1a;\r\n border: 1px solid #1a1a1a;\r\n } \r\n .away{\r\n position: fixed;\r\n top: -1000px;\r\n }\r\n #ajaxifyCart, .drawer--has-fixed-footer .drawer__inner{\r\n overflow: auto;\r\n }\r\n #pickup-container .picker__list{\r\n padding: 0;\r\n }\r\n #CartDrawer #pickup-container .pickup-button{\r\n width: 100%;\r\n } \r\n .main-content{\r\n overflow: visible;\r\n } \r\n .cr-store-title{\r\n text-align: center;\r\n } \r\n .cr-store-details{\r\n display: flex;\r\n }\r\n .cr-more-details{\r\n text-align: center;\r\n width: 50%;\r\n border: 1px dashed #c4c4c4;\r\n }\r\n .cr-store-address{\r\n width: 50%;\r\n }\r\n`;\r\n\r\nvar defaultPickupTranslation = {\r\n \"en\": {\r\n \"textButton\": \"Pickup In Store\",\r\n \"pickupDate\": \"Pickup Date\",\r\n \"pickupDateError\": \"Please enter a pickup date.\",\r\n \"nameOfPersonCollecting\": \"Name of Person Collecting\",\r\n \"shippingMethod\": \"Shipping\",\r\n \"pleaseClickCheckout\": \"Please click the checkout button to continue.\",\r\n \"mandatoryForPickupText\": \"An item in your cart must be collected\",\r\n \"chooseADateTime\": \"Choose a date/time\",\r\n \"yourName\": \"Your Name\",\r\n \"pickupFirstName\": \"First Name\",\r\n \"pickupLastName\": \"Last Name\",\r\n \"contactNumber\": \"Contact Number\",\r\n \"pickupEmail\": \"Email address\",\r\n \"pickupStore\": \"Pickup Store\",\r\n \"chooseLocation\": \"Choose a location below for pickup\",\r\n \"chooseLocationOption\": \"Please choose a location\",\r\n \"nameOfPersonCollectingError\": \"Please enter who will be picking up your order.\",\r\n \"pickupFirstNameError\": \"Enter a first name\",\r\n \"pickupLastNameError\": \"Enter a last name\",\r\n \"storeSelectError\": \"Please select which store you will pick up from\",\r\n \"extra1Placeholder\": \"\",\r\n \"extra2Placeholder\": \"\",\r\n \"extra3Placeholder\": \"\",\r\n \"contactNumberError\": \"Please enter a phone number.\",\r\n \"emailError\": \"Please enter your email address\",\r\n \"extraField1Error\": \"You must complete this field\",\r\n \"extraField2Error\": \"You must complete this field\",\r\n \"extraField3Error\": \"You must complete this field\",\r\n }\r\n};\r\n\r\n// if pressing add to cart multiple times (without refreshing the page), pickup buttons dissapears\r\nvar storePickup = {\r\n $: {},\r\n storeIds: [],\r\n pickupStore: '',\r\n shippingInformation: '',\r\n pickupButtonText: '',\r\n translations: {},\r\n language: 'en',\r\n selectedStoreId: null,\r\n init: function($){\r\n this.$ = $;\r\n\r\n console.log('initializing...');\r\n\r\n if ($ === undefined || $.fn.pickadate === undefined) $ = jQuery;\r\n if (typeof storePickupLoaded !== \"undefined\"){\r\n storePickupLoaded = true;\r\n }\r\n\r\n //console.log(stores)\r\n var that = this;\r\n var settings = this.settings();\r\n // Used on setting up blackout dates\r\n for (var n in stores) {\r\n if (stores[n].storeID === undefined) continue;\r\n that.storeIds[stores[n].storeID] = stores[n];\r\n }\r\n\r\n that.translations = typeof pickupTranslations !== \"undefined\"? pickupTranslations : defaultPickupTranslation;\r\n //if (window.location.pathname == '/cart') return;\r\n\r\n this.injectButton(that.setPickupButtonValues.bind(that));\r\n\r\n var body = that.$('body');\r\n body.on('click tap', '.js-toggle-pickup', function(e){\r\n e.preventDefault()\r\n console.log('click');\r\n that.$(this).toggleClass('selected');\r\n that.pickupBoxChange.apply(that);\r\n });\r\n\r\n // Disable pickup and choose shipping\r\n body.on('click tap', '.cr-shipping-method', function(e){\r\n if (that.$(this).hasClass('selected')) return;\r\n that.$('.js-toggle-pickup').click()\r\n })\r\n\r\n that.listenEvents();\r\n },\r\n\r\n setPickupButtonValues: function(){\r\n console.log('Resetting')\r\n var settings = storePickupSettings;\r\n var that = this;\r\n\r\n that.setDatePicker();\r\n that.displayStores();\r\n that.initShippingInformation();\r\n\r\n // Pickup button text\r\n var cr_button_text = settings.button_text === undefined? 'Pick Up In Store' : settings.button_text;\r\n if (cr_button_text.trim() === '') cr_button_text = 'Pick Up In Store';\r\n that.pickupButtonText = cr_button_text;\r\n //that.$('.pickup-button > span').text(that.pickupButtonText);\r\n that.changePickupButtonText();\r\n\r\n // Hide loading\r\n that.$('.pickup-loading').addClass('hide');\r\n\r\n // Display pickup container\r\n that.$('#pickup-container').removeClass('hide');\r\n\r\n // Display checkout button\r\n var form = that.submitForm();\r\n that.$(form).find('[name=\"checkout\"]').css('display', 'inline-block')\r\n\r\n // Extra message\r\n if (settings.message !== undefined && settings.message != '') {\r\n that.$('.js-storepickup-message').html(settings.message);\r\n }\r\n\r\n // If disabled, hide it\r\n if (settings.disabled === true) {\r\n that.$('#pickup-container').addClass('hide');\r\n }\r\n\r\n // Check for a mandatory product\r\n if (that.checkForMandatoryProduct() === true){\r\n // Hide other delivery methods\r\n that.$('.cr-shipping-method').addClass('hide');\r\n\r\n that.activatePickupButton();\r\n } else {\r\n // check if already in the cart\r\n that.getCartItems().then((response) => {\r\n let found = false;\r\n let giftCard = false;\r\n\r\n for (var item in response.items) {\r\n if (response.items[item].variant_id === parseInt(pickupProduct)) {\r\n found = true;\r\n break;\r\n }\r\n\r\n if (response.items[item].gift_card === true) {\r\n giftCard = true;\r\n }\r\n }\r\n\r\n if (giftCard === true) {\r\n that.$('#pickup-container').addClass('hide');\r\n }\r\n\r\n if (found === true) {\r\n that.activatePickupButton()\r\n } else if(settings.saveOnChange){ //remove pickup attributes if save on change is active\r\n //remove pickup cart attributes\r\n var attributes = {};\r\n attributes['Pickup_date'] = '';\r\n attributes['Pickup_time'] = '';\r\n attributes['Pickup_name'] = '';\r\n attributes['Pickup_phone'] = '';\r\n attributes['Pickup_extra1'] = '';\r\n attributes['Pickup_extra2'] = '';\r\n attributes['Pickup_extra3'] = '';\r\n attributes['Pickup_Store'] = '';\r\n attributes['pickup'] = '';\r\n\r\n that.updateCartAttributes(attributes)\r\n }\r\n })\r\n }\r\n },\r\n\r\n changePickupButtonText: function(){\r\n let that = this;\r\n that.$('.pickup-button > span').text(that.pickupButtonText);\r\n that.$('#pickup-container').css('display', 'flex')\r\n if (!that.settings().disabled){\r\n that.$('#pickup-container').removeClass('hide')\r\n }\r\n },\r\n\r\n /**\r\n * Check the contents of the cart and if the pickup product is listed activates the button\r\n * @param cart\r\n */\r\n activatePickupButtonIfItemInCart: function(cart){\r\n let that = this;\r\n let found = false;\r\n for (var item in cart.items) {\r\n if (cart.items[item].variant_id === parseInt(pickupProduct)) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (found === true) {\r\n that.activatePickupButton()\r\n }\r\n },\r\n\r\n // Initialize shipping information that will help fill up the checkout form\r\n initShippingInformation: function(){\r\n var shippingInfo = \"step=contact_information&checkout[shipping_address][company]=\" + pickupCompany\r\n //+ \"&checkout[shipping_address][phone]=\"\r\n + \"&checkout[shipping_address][address1]=\" + pickupAddress.replace(/\\#/, '') +\r\n \"&checkout[shipping_address][city]=\" + pickupCity\r\n + \"&checkout[shipping_address][country]=\" + pickupCountry\r\n + \"&checkout[shipping_address][zip]=\" + pickupZip\r\n + \"&checkout[shipping_address][province]=\" + pickupProvince\r\n ;\r\n if(this.settings().replaceCustomerName !== undefined && this.settings().replaceCustomerName === 'true') {\r\n shippingInfo += \"&checkout[shipping_address][last_name]=\" + this.settings().checkoutStoreName\r\n }\r\n\r\n if (this.settings().discount !== undefined && this.settings().discount !== ''){\r\n shippingInfo += \"&discount=\" + this.settings().discount\r\n }\r\n\r\n this.shippingInformation = shippingInfo;\r\n },\r\n\r\n activatePickupButton: function(){\r\n this.$('.js-toggle-pickup').addClass('selected');\r\n this.pickupBoxChange.apply(this);\r\n },\r\n\r\n checkForMandatoryProduct: function(){\r\n var that = this;\r\n let mandatoryCollections = [];\r\n for (var c in storePickupSettings.mandatory_collections) {\r\n let collection = storePickupSettings.mandatory_collections[c].title;\r\n if (collection === undefined) continue;\r\n mandatoryCollections.push(collection.replace(/'/g, '''));\r\n }\r\n var gotMandatoryProduct = false;\r\n this.$('.storepickup-product-collection').each(function(c) {\r\n //console.log($jq(this).text())\r\n if (mandatoryCollections.indexOf(that.$(this).text().replace(/'/g, ''')) > -1) {\r\n gotMandatoryProduct = true;\r\n }\r\n });\r\n\r\n this.$('.storepickup-product-title').each(function(c) {\r\n //console.log($jq(this).text())\r\n if (that.$(this).text().toLowerCase().replace(/'/g, ''').indexOf('click & collect') > -1 ||\r\n that.$(this).text().toLowerCase().replace(/'/g, ''').indexOf('click and collect') > -1 ||\r\n that.$(this).text().toLowerCase().replace(/'/g, ''').indexOf('c & c') > -1 ||\r\n that.$(this).text().toLowerCase().replace(/'/g, ''').indexOf('c&c') > -1\r\n ){\r\n gotMandatoryProduct = true;\r\n }\r\n });\r\n\r\n return gotMandatoryProduct;\r\n },\r\n\r\n setDatePicker: function(){\r\n var that = this;\r\n var settings = storePickupSettings;\r\n var yesterday = new Date((new Date()).valueOf() - 1000 * 60 * 60 * 36);\r\n var maxDays = settings.max_days && settings.max_days != 0? new Date((new Date()).valueOf() + 1000 * 60 * 60 * settings.max_days * 24) : '';\r\n var minDays = settings.min_days && settings.min_days != 0? new Date((new Date()).valueOf() + 1000 * 60 * 60 * settings.min_days * 24) : new Date();\r\n var todayPickup = settings.same_day_pickup? yesterday : new Date(); // blackout today if same day pickup is not set\r\n\r\n //\r\n var today = new Date();\r\n var day = today.getDate()\r\n var month = today.getMonth()\r\n var year = today.getFullYear();\r\n var hour = today.getHours();\r\n var minutes = today.getMinutes();\r\n\r\n //var limit = '01:55'; //stored in the database normaly, this is just for testing\r\n if (stores.length === 1) {\r\n that.selectedStoreId = stores[0].storeID;\r\n }\r\n var selectedStore = that.storeIds[that.selectedStoreId];\r\n\r\n if (selectedStore && selectedStore.disableSameDayPickup && selectedStore.disableSameDayAfterHour){\r\n var limit = selectedStore.disableSameDayAfterHour;\r\n console.log(limit);\r\n var chunks = limit.split(':');\r\n var limitHours = chunks[0];\r\n var limitMinutes = chunks[1];\r\n if ((hour > limitHours) ||\r\n (limitHours == hour && minutes >= limitMinutes)\r\n ) {\r\n todayPickup = new Date();\r\n }\r\n }\r\n\r\n //\r\n var $input = that.$('.datepicker').pickadate({\r\n today: '',\r\n clear: '',\r\n close: '',\r\n min: minDays,\r\n max: maxDays,\r\n onSet: function(item) {\r\n //console.log(item);\r\n if (item.select){\r\n //console.log(item.indexOf('select'))\r\n // console.log('start time')\r\n if ('select' in item) {\r\n // Check if same day was selected\r\n var ts = item.select;\r\n var today = new Date().setHours(0, 0, 0, 0);\r\n var thatDay = new Date(ts).setHours(0, 0, 0, 0);\r\n var isSameDay = today === thatDay;\r\n\r\n var selectedDate = new Date(item.select);\r\n var selectedDay = selectedDate.getDay();\r\n if (stores.length === 1) {\r\n that.selectedStoreId = stores[0].storeID;\r\n }\r\n that.updateStorePickupInformation()\r\n\r\n var selectedStore = that.storeIds[that.selectedStoreId];\r\n if (!selectedStore || !selectedStore.daysOfWeek || !selectedStore.enablePickupTime){\r\n that.$('#pickup-time').val('');\r\n that.$('#note-pickup-time').val('')\r\n return true;\r\n }\r\n\r\n var minHour = selectedStore.daysOfWeek[selectedDay].min.hour;\r\n var minMinute = selectedStore.daysOfWeek[selectedDay].min.minute;\r\n var currentHour = new Date().getHours()\r\n var currentMinute = new Date().getMinutes();\r\n if (isSameDay && currentHour > minHour) {\r\n // Allow at least 1 hour before picking up the order\r\n /*\r\n minHour = currentHour + 1;\r\n\r\n //@todo add disable same day pickup with the minimum pickup time a customer is allowed to order\r\n */\r\n minHour = currentHour;\r\n //minMinute = currentMinute;\r\n var minuteDiff = currentMinute < 30? 30 - currentMinute : 60 - currentMinute;\r\n minMinute = currentMinute + minuteDiff;\r\n }\r\n var maxHour = selectedStore.daysOfWeek[selectedDay].max.hour;\r\n var maxMinute = selectedStore.daysOfWeek[selectedDay].max.minute;\r\n if (timepicker) {\r\n timepicker.clear(); // clear previous values if it was set\r\n timepicker.set('min', [minHour, minMinute]);\r\n timepicker.set('max', [maxHour, maxMinute]);\r\n //timepicker.set('disable', [8,30]);\r\n setTimeout(timepicker.open, 0)\r\n }\r\n }\r\n\r\n }\r\n }\r\n });\r\n\r\n var picker = $input.pickadate('picker');\r\n // Set time cut off\r\n if (selectedStore && selectedStore.allowTimeCutOff && selectedStore.cutOffMinPickupDays) {\r\n var limit = selectedStore.cutOffStartTime;\r\n var chunks = limit.split(':');\r\n var limitHours = chunks[0];\r\n var limitMinutes = chunks[1];\r\n if ((hour > limitHours) ||\r\n (limitHours == hour && minutes >= limitMinutes)\r\n ) {\r\n\r\n minDays = Number(selectedStore.cutOffMinPickupDays);\r\n\r\n if (picker !== undefined && picker !== null) {\r\n picker.set('enable', true)\r\n picker.set('min', minDays);\r\n }\r\n }\r\n }\r\n\r\n // end time cut off\r\n var timeFormat = 'h:i A';\r\n if(pickupLocale == 'fr') {\r\n timeFormat ='HH:i';\r\n }\r\n // Time\r\n var timepicker = that.$('#pickup-time').pickatime({\r\n clear: '',\r\n format: timeFormat,\r\n onSet: function(item) {\r\n console.log(item);\r\n\r\n if ( 'select' in item ) setTimeout( function() {\r\n var selectedTime = timepicker.get();\r\n that.$('#pickup-time').val('');\r\n that.$('#pickup-time').val(selectedTime)\r\n that.updateStorePickupInformation()\r\n\r\n var selectedDateTime = picker.get() + ' @ ' + timepicker.get();\r\n that.$('#pickup-date-start').val('')\r\n that.$('#pickup-date-start').val(selectedDateTime)\r\n\r\n }, 0 )\r\n },\r\n onClose: function() {\r\n if(timepicker.get() == ''){\r\n that.$('#pickup-date-start').val('')\r\n } else {\r\n that.$('#pickup-date-start-error').css('display', 'none');\r\n }\r\n console.log('Closed now')\r\n },\r\n }).pickatime('picker');\r\n\r\n let blackoutdatesCollection = [];\r\n blackoutdatesCollection.push(todayPickup)\r\n // Blackout dates\r\n if (picker !== undefined && picker !== null && settings.blackoutDates) {\r\n // Global Blackout Dates\r\n let blackoutdates = settings.blackoutDates.split('-')\r\n\r\n for (let i in blackoutdates) {\r\n let chunks = (blackoutdates[i] + '').split(',');\r\n blackoutdatesCollection.push(chunks);\r\n }\r\n }\r\n\r\n // Store Blackout Dates\r\n if (stores.length === 1) {\r\n that.selectedStoreId = stores[0].storeID;\r\n }\r\n\r\n if (that.selectedStoreId != null && that.storeIds[that.selectedStoreId]){\r\n let disableDays = []\r\n let pickupDays = that.storeIds[that.selectedStoreId].pickupDays\r\n\r\n // Disable specific days\r\n if (typeof pickupDays !== 'undefined' && pickupDays !== null && pickupDays.length) {\r\n disableDays = [1, 2, 3, 4, 5, 6, 7];\r\n // Disable only days that are not enabled\r\n pickupDays.map(item => {\r\n if(pickupLocale == 'fr'){\r\n item = item == 1? 7 : Number(item) - 1\r\n }\r\n disableDays = that.arrayRemove(disableDays, item);\r\n });\r\n disableDays.map(item => {\r\n blackoutdatesCollection.push(item)\r\n });\r\n //blackoutdatesCollection.push(0)\r\n }\r\n }\r\n\r\n if (that.selectedStoreId != null && that.storeIds[that.selectedStoreId].blackoutDates) {\r\n let storeBlackoutDates = that.storeIds[that.selectedStoreId].blackoutDates.split('-');\r\n\r\n for (let i in storeBlackoutDates) {\r\n let chunks = (storeBlackoutDates[i] + '').split(',');\r\n blackoutdatesCollection.push(chunks);\r\n }\r\n }\r\n\r\n if (picker !== undefined && picker !== null) {\r\n picker.set('enable', true)\r\n // blackoutdatesCollection.push(1);\r\n picker.set('disable', blackoutdatesCollection);\r\n picker.on({\r\n set: function(thingSet) {\r\n //console.log('Set stuff:', thingSet)\r\n //that.updateStorePickupInformation()\r\n },\r\n\r\n close: function(){\r\n // Fix scroll issue\r\n var drawerInner = document.querySelector('.drawer--has-fixed-footer .drawer__inner')\r\n if (drawerInner) {\r\n var initScroll = drawerInner.scrollTop;\r\n document.querySelector('.drawer--has-fixed-footer .drawer__inner').scrollTop = initScroll - 15;\r\n }\r\n\r\n }\r\n })\r\n }\r\n\r\n },\r\n\r\n arrayRemove: function (arr, value) {\r\n return arr.filter(function(ele){\r\n return ele != value;\r\n });\r\n },\r\n displayStores: function(){\r\n var that = this;\r\n var settings = this.settings();\r\n if (stores === undefined) return;\r\n if (stores === '') return;\r\n\r\n //if (typeof stores === \"object\") return;\r\n if (stores !== Object(stores)) {\r\n stores = JSON.parse(stores);\r\n }\r\n\r\n // if not at least 2 stores don't display this field\r\n if (stores.length < 2) return;\r\n\r\n // Set position where stores will be displayed\r\n console.log('stores')\r\n var storesTemplate = '';\r\n var text = '';\r\n if (settings.locationsInASelect){\r\n storesTemplate = this.storesTemplateSelect();\r\n } else {\r\n storesTemplate = this.storesTemplate();\r\n }\r\n\r\n if (settings.stores_on_top) {\r\n that.$('.js-stores-position-1').html(storesTemplate);\r\n } else {\r\n that.$('.js-stores-position-2').html(storesTemplate);\r\n }\r\n\r\n that.$('.pickup-store-search').prop('required', true);\r\n // Special display for a specific store\r\n var extra = false;\r\n var CRpermanentDomain = CRpermanentDomain || '';\r\n if (CRpermanentDomain && CRpermanentDomain.indexOf('reddaway.myshopify.com') > -1) {\r\n extra = true;\r\n }\r\n\r\n var ul = document.getElementById(\"storeUL\");\r\n if (settings.locationsInASelect){\r\n var chooseLocationText = that.translations[that.language].chooseLocationOption || defaultPickupTranslation.en.chooseLocationOption;\r\n text = '<option>' + chooseLocationText + '</option>';\r\n that.$(ul).append(text);\r\n }\r\n\r\n for (var n in stores) {\r\n if (stores[n].storeID === undefined) continue;\r\n that.storeIds[stores[n].storeID] = stores[n];\r\n var displayStore = stores[n].name + ' - ' + stores[n].city;\r\n\r\n if (extra === true) {\r\n displayStore = displayStore + ' - ' + stores[n].province;\r\n }\r\n\r\n if (settings.locationsInASelect) {\r\n text = '<option value=\"' + stores[n].storeID + '\" id= ' + stores[n].storeID + ' class=\"searchTerm\"' +\r\n 'data-zip-code=\"' + stores[n].zip + '\" '\r\n + 'data-address=\"' + stores[n].street + '\"'\r\n + 'data-name=\"' + stores[n].name + '\"'\r\n + 'data-city=\"' + stores[n].city + '\"'\r\n + 'data-country=\"' + stores[n].country + '\"'\r\n + 'data-province=\"' + stores[n].province + '\"'\r\n + 'data-store-id=\"' + stores[n].storeID + '\"'\r\n + 'data-company=\"' + stores[n].company + '\"' +'>' +\r\n displayStore + ' ' + stores[n].street + '' +\r\n '</option>';\r\n } else {\r\n if (stores[n].allowDisplayMoreInformation) {\r\n text = '<li id= ' + stores[n].storeID + ' class=\"searchTerm\">' +\r\n '<a href=\"#\" ' +\r\n 'data-zip-code=\"' + stores[n].zip + '\" '\r\n + 'data-address=\"' + stores[n].street + '\"'\r\n + 'data-name=\"' + stores[n].name + '\"'\r\n + 'data-city=\"' + stores[n].city + '\"'\r\n + 'data-country=\"' + stores[n].country + '\"'\r\n + 'data-province=\"' + stores[n].province + '\"'\r\n + 'data-store-id=\"' + stores[n].storeID + '\"'\r\n + 'data-company=\"' + stores[n].company + '\"'\r\n + '\">'\r\n + '<div class=\"cr-store-title\"><strong>' + displayStore + '</strong></div>' +\r\n '<div class=\"cr-store-details\">' +\r\n '<div class=\"cr-store-address\"><span>' + stores[n].street + '</span><br>' +\r\n '<span>' + stores[n].city + ', ' + stores[n].province + ' ' + stores[n].zip + '</span></div>' +\r\n '<div class=\"cr-more-details\">' + stores[n].moreInformation + '</div>'+\r\n '</div></a>' +\r\n '</li>';\r\n } else {\r\n text = '<li id= ' + stores[n].storeID + ' class=\"searchTerm\">' +\r\n '<a href=\"#\" ' +\r\n 'data-zip-code=\"' + stores[n].zip + '\" '\r\n + 'data-address=\"' + stores[n].street + '\"'\r\n + 'data-name=\"' + stores[n].name + '\"'\r\n + 'data-city=\"' + stores[n].city + '\"'\r\n + 'data-country=\"' + stores[n].country + '\"'\r\n + 'data-province=\"' + stores[n].province + '\"'\r\n + 'data-store-id=\"' + stores[n].storeID + '\"'\r\n + 'data-company=\"' + stores[n].company + '\"'\r\n + '\">'\r\n + '<strong>' + displayStore + '</strong><br>' +\r\n '<span>' + stores[n].street + '</span><br>' +\r\n '<span>' + stores[n].city + ', ' + stores[n].province + ' ' + stores[n].zip + '</span>' +\r\n '</a>' +\r\n '</li>';\r\n }\r\n\r\n }\r\n\r\n\r\n that.$(ul).append(text);\r\n }\r\n this.storeSearchEvent()\r\n },\r\n\r\n // Event triggered when locations are displayed in a \"select\"\r\n onStoreChangeInSelect: function(that){\r\n // Reset all values\r\n that.$('#storeUL option').removeClass('activeStore')\r\n that.$('#pickup-date-start').val('')\r\n var selectedOption = that.$('#storeUL option:selected');\r\n var phone = that.$('#pickup-number').val() || '';\r\n var pickupStoreHtml = selectedOption.html();\r\n var pickupStoreHtmlEscaped = '';\r\n if (pickupStoreHtml != undefined) {\r\n pickupStoreHtmlEscaped = pickupStoreHtml.replace(/\\&/g, '&')\r\n }\r\n var zipCode = selectedOption.attr('data-zip-code');\r\n var address = selectedOption.attr('data-address');\r\n var chosenCity = selectedOption.attr('data-city');\r\n var chosenProvince = selectedOption.attr('data-province');\r\n var chosenCountry = selectedOption.attr('data-country');\r\n var storeName = selectedOption.attr('data-name');\r\n var companyName = selectedOption.attr('data-company');\r\n that.selectedStoreId = selectedOption.attr('data-store-id');\r\n\r\n that.setDatePicker()\r\n //that.$(\"#storeUL li\").removeClass('activeStore'); // Clear class from all li\r\n that.$('.js-chosen-store').remove();\r\n\r\n that.$('#pickup-store').val(pickupStoreHtml);\r\n that.$('#pickup-store-search').val(pickupStoreHtmlEscaped)\r\n\r\n // This is needed for validation purposes\r\n that.$('#pickup-store-search').after(\r\n '<span class=\"js-chosen-store\">' + storeName + '<br> ' +\r\n 'Address: ' + address + '<br>' +\r\n 'Zip: ' + zipCode\r\n + '</span>'\r\n )\r\n\r\n if (typeof address !== 'undefined') {\r\n address = address.replace(/\\#/, '');\r\n }\r\n\r\n //that.updateStorePickupInformation()\r\n if (companyName === undefined) companyName = '';\r\n selectedOption.addClass('activeStore');\r\n //Update autofilling data for the checkout page\r\n //var shippingInfo = \"step=contact_information&checkout[shipping_address][company]=\" + storeName.replace(/\\#/, '')\r\n var shippingInfo = \"step=contact_information&checkout[shipping_address][company]=\" + companyName.replace(/\\#/, '')\r\n + \"&checkout[shipping_address][phone]=\" + ''\r\n + \"&checkout[shipping_address][address1]=\" + address\r\n + \"&checkout[shipping_address][city]=\" + chosenCity\r\n + \"&checkout[shipping_address][country]=\" + chosenCountry\r\n + \"&checkout[shipping_address][zip]=\" + zipCode\r\n + \"&checkout[shipping_address][province]=\" + chosenProvince\r\n + \"&checkout[shipping_address][county]=\" + chosenProvince\r\n ;\r\n\r\n //@todo (remove duplication)\r\n var firstName = that.$('#pickup-first-name').val();\r\n var lastName = that.$('#pickup-last-name').val();\r\n if (firstName) {\r\n firstName = firstName.trim();\r\n shippingInfo += \"&checkout[shipping_address][first_name]=\" + firstName + '&';\r\n }\r\n if (lastName) {\r\n lastName = lastName.trim();\r\n shippingInfo += \"&checkout[shipping_address][last_name]=\" + lastName + '&';\r\n }\r\n var pickupNumber = that.$('#pickup-number').val()\r\n if (pickupNumber != undefined && pickupNumber != '') {\r\n shippingInfo += \"&checkout[shipping_address][phone]=\" + pickupNumber + '&';\r\n }\r\n\r\n var pickupEmail = that.$('#pickup-email').val()\r\n if (pickupEmail !== undefined && pickupEmail != '') {\r\n shippingInfo += \"&checkout[email_or_phone]=\" + pickupEmail + '&';\r\n }\r\n //@endtodo\r\n\r\n // This is kept for legacy, the option is not active anymore\r\n if(that.settings().replaceCustomerName !== undefined && that.settings().replaceCustomerName === 'true') {\r\n shippingInfo += \"&checkout[shipping_address][last_name]=\" + storeName.replace(/\\#/, '')\r\n }\r\n\r\n if (that.settings().discount !== undefined && that.settings().discount !== ''){\r\n shippingInfo += \"&discount=\" + that.settings().discount\r\n }\r\n\r\n that.shippingInformation = shippingInfo;\r\n that.updateFormActionWithShippingInformation();\r\n that.updateStorePickupInformation()\r\n\r\n },\r\n\r\n storeSearchEvent: function(){\r\n let that = this;\r\n let settings = this.settings();\r\n var phone = that.$('#pickup-number').val() || '';\r\n if (settings.locationsInASelect) {\r\n that.$(\"#storeUL\").on(\"change\", that.onStoreChangeInSelect.bind(this, that));\r\n } else {\r\n that.$(\"#storeUL\").on(\"click change\", \".searchTerm\", onStoreChange);\r\n }\r\n\r\n function onStoreChange(e) {\r\n that.$('#pickup-date-start').val('')\r\n // Make class active\r\n // If already selected, unselect\r\n if (that.$(this).attr('class').indexOf('activeStore') > -1) {\r\n that.$(this).removeClass('activeStore');\r\n this.pickupStore = \"\";\r\n that.$('#pickup-store').val('');\r\n that.$('#pickup-store-search').val('')\r\n that.$('.js-chosen-store').remove();\r\n that.selectedStoreId = null;\r\n } else {\r\n var pickupStoreHtml = that.$(this).children('a')[0].innerHTML;\r\n var pickupStoreHtmlEscaped = '';\r\n if (pickupStoreHtml != undefined) {\r\n pickupStoreHtmlEscaped = pickupStoreHtml.replace(/\\&/g, '&')\r\n }\r\n var zipCode = that.$(this).children(\"a\")[0].getAttribute('data-zip-code');\r\n var address = that.$(this).children(\"a\")[0].getAttribute('data-address');\r\n var chosenCity = that.$(this).children(\"a\")[0].getAttribute('data-city');\r\n var chosenProvince = that.$(this).children(\"a\")[0].getAttribute('data-province');\r\n var chosenCountry = that.$(this).children(\"a\")[0].getAttribute('data-country');\r\n var storeName = that.$(this).children(\"a\")[0].getAttribute('data-name');\r\n var companyName = that.$(this).children(\"a\")[0].getAttribute('data-company');\r\n that.selectedStoreId = that.$(this).children(\"a\")[0].getAttribute('data-store-id');\r\n that.setDatePicker()\r\n that.$(\"#storeUL li\").removeClass('activeStore'); // Clear class from all li\r\n that.$('.js-chosen-store').remove();\r\n that.$(this).addClass('activeStore');\r\n that.$('#pickup-store').val(pickupStoreHtml);\r\n that.$('#pickup-store-search').val(pickupStoreHtmlEscaped)\r\n that.$('#pickup-store-search').after(\r\n '<span class=\"js-chosen-store\">' + storeName + '<br> ' +\r\n 'Address: ' + address + '<br>' +\r\n 'Zip: ' + zipCode\r\n + '</span>'\r\n )\r\n\r\n that.updateStorePickupInformation()\r\n\r\n //Update autofilling data for the checkout page\r\n //var shippingInfo = \"step=contact_information&checkout[shipping_address][company]=\" + storeName.replace(/\\#/, '')\r\n var shippingInfo = \"step=contact_information&checkout[shipping_address][company]=\" + companyName.replace(/\\#/, '')\r\n + \"&checkout[shipping_address][phone]=\" + phone\r\n + \"&checkout[shipping_address][address1]=\" + address.replace(/\\#/, '')\r\n + \"&checkout[shipping_address][city]=\" + chosenCity\r\n + \"&checkout[shipping_address][country]=\" + chosenCountry\r\n + \"&checkout[shipping_address][zip]=\" + zipCode\r\n + \"&checkout[shipping_address][province]=\" + chosenProvince\r\n + \"&checkout[shipping_address][county]=\" + chosenProvince\r\n ;\r\n\r\n //@todo (remove duplication)\r\n var firstName = that.$('#pickup-first-name').val();\r\n var lastName = that.$('#pickup-last-name').val();\r\n if (firstName) {\r\n firstName = firstName.trim();\r\n shippingInfo += \"&checkout[shipping_address][first_name]=\" + firstName + '&';\r\n }\r\n if (lastName) {\r\n lastName = lastName.trim();\r\n shippingInfo += \"&checkout[shipping_address][last_name]=\" + lastName + '&';\r\n }\r\n var pickupNumber = that.$('#pickup-number').val()\r\n if (pickupNumber !== undefined && pickupNumber != '') {\r\n shippingInfo += \"&checkout[shipping_address][phone]=\" + pickupNumber + '&';\r\n }\r\n\r\n var pickupEmail = that.$('#pickup-email').val()\r\n if (pickupEmail !== undefined && pickupEmail != '') {\r\n shippingInfo += \"&checkout[email_or_phone]=\" + pickupEmail + '&';\r\n }\r\n\r\n //@endtodo\r\n\r\n if(that.settings().replaceCustomerName !== undefined && that.settings().replaceCustomerName === 'true') {\r\n shippingInfo += \"&checkout[shipping_address][last_name]=\" + storeName.replace(/\\#/, '')\r\n }\r\n\r\n if (that.settings().discount !== undefined && that.settings().discount !== ''){\r\n shippingInfo += \"&discount=\" + that.settings().discount\r\n }\r\n\r\n that.shippingInformation = shippingInfo;\r\n that.updateFormActionWithShippingInformation();\r\n };\r\n\r\n e.preventDefault();\r\n }\r\n },\r\n\r\n // Set the url where the form will point (helps auto complete the checkout page form)\r\n updateFormActionWithShippingInformation: function(){\r\n var form = this.submitForm();\r\n var localeChunks = pickupLocale.split('-');\r\n this.shippingInformation = this.shippingInformation.replace(/\\&+/g, '&');\r\n\r\n this.$(form).attr('action', '/checkout?' + this.shippingInformation + '&skip_shopify_pay=true' + '&locale=' + localeChunks[0] + '-pickup');\r\n },\r\n\r\n listenEvents: function(){\r\n let that = this;\r\n const body = that.$('body');\r\n //var theme = theme || '';\r\n if (typeof theme !== \"undefined\" && typeof theme.cache !== \"undefined\" && typeof theme.cache.$body !== \"undefined\") {\r\n theme.cache.$body.on('ajaxCart.afterCartLoad', function(evt, cart) {\r\n console.log('cart loaded')\r\n if (!that.$('.pickup-button').hasClass('selected')) {\r\n //that.activatePickupButton();\r\n that.changePickupButtonText();\r\n that.activatePickupButtonIfItemInCart(cart);\r\n that.setDatePicker();\r\n that.displayStores();\r\n }\r\n })\r\n } else {\r\n that.$('body').on('click', '.ajaxcart__qty-adjust', function() {\r\n console.log('cart updated')\r\n setTimeout(function () {\r\n that.displayPickupAfterRedraw()\r\n }, 1500)\r\n });\r\n }\r\n\r\n body.on('click tap', 'button.js-product-add', function(){\r\n setTimeout(function () {\r\n that.displayPickupAfterRedraw()\r\n }, 700)\r\n })\r\n\r\n // Keep this for legacy code in case the template was not updated\r\n body.on('change', '#pickup-name', function(e){\r\n that.$(document).trigger(\"storePickupInformationChanged\");\r\n that.updateStorePickupInformation()\r\n })\r\n\r\n body.on('change', '#pickup-first-name', function(e){\r\n that.updateStorePickupInformation()\r\n })\r\n body.on('change', '#pickup-last-name', function(e){\r\n that.updateStorePickupInformation()\r\n })\r\n\r\n body.on('change', '#pickup-number', function(e){\r\n that.updateStorePickupInformation()\r\n })\r\n\r\n body.on('change', '#pickup-email', function(e){\r\n that.updateStorePickupInformation()\r\n })\r\n\r\n body.on('change', '#extra_input_1', function(e){\r\n that.updateStorePickupInformation()\r\n })\r\n\r\n body.on('change', '#extra_input_2', function(e){\r\n that.updateStorePickupInformation()\r\n })\r\n\r\n body.on('change', '#extra_input_3', function(e){\r\n that.updateStorePickupInformation()\r\n })\r\n },\r\n // Used only when searching for a location\r\n storeFilter: function() {\r\n // Filters stores by search\r\n // Declare variables\r\n var input, filter, ul, li, a, i;\r\n input = document.getElementById('pickup-store-search');\r\n filter = input.value.toUpperCase();\r\n ul = document.getElementById(\"storeUL\");\r\n li = ul.getElementsByTagName('li');\r\n\r\n // Loop through all list items, and hide those who don't match the search query\r\n for (i = 0; i < li.length; i++) {\r\n a = li[i].getElementsByTagName(\"a\")[0];\r\n if (a.innerHTML.toUpperCase().indexOf(filter) > -1) {\r\n li[i].style.display = \"\";\r\n } else {\r\n li[i].style.display = \"none\";\r\n }\r\n }\r\n },\r\n\r\n addCartItems: function(){\r\n var that = this;\r\n console.log(pickupProduct)\r\n this.getCartItems()\r\n .then((response) => {\r\n var inCart = false; // Assume not currently in cart\r\n\r\n // Check each item in cart to see if Pickup product currently in the cart\r\n for (var item in response.items) {\r\n if (response.items[item].variant_id == pickupProduct) {\r\n inCart = true;\r\n };\r\n };\r\n\r\n // Not in cart, add pickup product to cart\r\n if (inCart === false) {\r\n var productData = {\r\n quantity: 1,\r\n id: pickupProduct\r\n };\r\n\r\n that.$.ajax({\r\n type: \"POST\",\r\n url: \"/cart/add.js\",\r\n data: productData,\r\n success: function() {\r\n if(window.location.pathname.indexOf('/cart') < 0){\r\n //var ajaxCart = ajaxCart || '';\r\n if (typeof ajaxCart !== \"undefined\"){\r\n ajaxCart.load();\r\n if (typeof theme === \"undefined\" || typeof theme.cache === \"undefined\"){\r\n setTimeout(function(){\r\n that.displayPickupAfterRedraw()\r\n }, 500)\r\n }\r\n }\r\n }\r\n console.log('store pickup added')\r\n },\r\n error: function(err) {\r\n console.log(err);\r\n },\r\n dataType: \"json\"\r\n });\r\n }\r\n });\r\n },\r\n\r\n displayPickupAfterRedraw: function(){\r\n let that = this;\r\n if (!that.$('.pickup-button').hasClass('selected')) {\r\n console.log('reload pickup')\r\n that.getCartItems().then(cart => {\r\n //that.activatePickupButton();\r\n that.changePickupButtonText();\r\n that.activatePickupButtonIfItemInCart(cart);\r\n that.setDatePicker();\r\n that.displayStores();\r\n });\r\n\r\n }\r\n },\r\n\r\n removePickupProduct: function(){\r\n var that = this;\r\n this.getCartItems()\r\n .then((response) => {\r\n //Check each item in cart to see if Pickup product currently in the cart\r\n let found = false;\r\n for (var item in response.items) {\r\n if (response.items[item].variant_id == pickupProduct) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (found === true) {\r\n // Changes quantity of item in cart to 0.\r\n var productData = {\r\n quantity: 0,\r\n id: pickupProduct\r\n };\r\n that.$.post('/cart/change.js', productData, function(res, err) {\r\n if (err != \"success\") {\r\n console.log(err);\r\n } else {\r\n //@todo remove pickup attributes - at the moment this is not the case, because page is being reloaded\r\n if(window.location.pathname.indexOf('/cart') > -1){\r\n location.reload();\r\n } else {\r\n //var ajaxCart = ajaxCart || '';\r\n if (typeof ajaxCart !== \"undefined\"){\r\n console.log('redraw');\r\n ajaxCart.load();\r\n if (typeof theme === \"undefined\") {\r\n setTimeout(function(){\r\n that.displayPickupAfterRedraw()\r\n }, 500)\r\n } else if (typeof theme.cache === \"undefined\"){\r\n setTimeout(function(){\r\n that.displayPickupAfterRedraw()\r\n }, 500)\r\n }\r\n }\r\n }\r\n\r\n }\r\n }, 'json');\r\n }\r\n });\r\n },\r\n\r\n getCartItems: function(){\r\n var that = this;\r\n return new Promise((resolve, reject) => {\r\n that.$.ajax({\r\n url: '/cart.js',\r\n type: 'GET',\r\n dataType: 'json',\r\n success: function(response) {\r\n resolve(response)\r\n },\r\n error: function(e) {\r\n reject(e);\r\n }\r\n });\r\n })\r\n },\r\n displayExtraFields: function(){\r\n var that = this;\r\n var settings = this.settings();\r\n\r\n // Display extra fields\r\n // Hide/show extra 1\r\n if (settings.extra_input_1 && settings.extra_input_1.trim() !== '') {\r\n that.$('#extra_input_1_label').text(settings.extra_input_1.replace(/\\'/g, '\\''));\r\n that.$('#extra_input_1').rules('add', {\r\n \"required\": true,\r\n \"messages\": {\r\n \"required\": that.translations[that.language].extraField1Error\r\n }\r\n });\r\n } else {\r\n that.$('.extra_input_1_wrapper').css('display', 'none');\r\n }\r\n\r\n // Hide/show extra 2\r\n if (settings.extra_input_2 && settings.extra_input_2.trim() !== '') {\r\n that.$('#extra_input_2_label').text(settings.extra_input_2.replace(/\\'/g, '\\''));\r\n that.$('#extra_input_2').rules('add', {\r\n \"required\": true,\r\n \"messages\": {\r\n \"required\": that.translations[that.language].extraField2Error\r\n }\r\n });\r\n } else {\r\n that.$('.extra_input_2_wrapper').css('display', 'none');\r\n }\r\n\r\n // Hide/show extra 3\r\n if (settings.extra_input_3 && settings.extra_input_3.trim() !== '') {\r\n that.$('#extra_input_3_label').text(settings.extra_input_3.replace(/\\'/g, '\\''));\r\n that.$('#extra_input_3').rules('add', {\r\n \"required\": true,\r\n \"messages\": {\r\n \"required\": that.translations[that.language].extraField3Error\r\n }\r\n });\r\n } else {\r\n that.$('.extra_input_3_wrapper').css('display', 'none');\r\n }\r\n },\r\n\r\n // Used to validate if selected store is valid\r\n validateSubmiHandler: function(form){\r\n var that = this;\r\n var settings = this.settings();\r\n var extra1 = that.$('#extra_input_1').val()\r\n var extra2 = that.$('#extra_input_2').val()\r\n var extra3 = that.$('#extra_input_3').val()\r\n\r\n //var form = this.submitForm();\r\n var validator = that.$(form).validate()\r\n var valid = true;\r\n\r\n // Prevent extra field form being empty\r\n if (settings.extra_input_1 && extra1.trim() == '') {\r\n validator.showErrors({\r\n \"extra_input_1\": that.translations[that.language].extraField1Error\r\n });\r\n valid = false;\r\n }\r\n\r\n // Prevent extra field form being empty\r\n if (settings.extra_input_2 && extra2.trim() == '') {\r\n validator.showErrors({\r\n \"extra_input_2\": that.translations[that.language].extraField2Error\r\n });\r\n valid = false;\r\n }\r\n\r\n // Prevent extra field form being empty\r\n if (settings.extra_input_3 && extra3.trim() == '') {\r\n validator.showErrors({\r\n \"extra_input_3\": that.translations[that.language].extraField1Error\r\n });\r\n valid = false;\r\n }\r\n if (valid === false) return;\r\n\r\n if (that.$('#pickup-container').is(\":visible\")\r\n && that.$('.pickup-button').hasClass('selected')\r\n && that.$('.activeStore').attr('id') === undefined\r\n && stores !== undefined\r\n && stores.length> 1\r\n ) {\r\n that.$('.searchTerm').css('display', 'block')\r\n that.$('#pickup-store-search').val('')\r\n that.$('#pickup-store-search-error').remove()\r\n that.$('#storeUL').after('<label id=\"pickup-store-search-error\" class=\"error\" for=\"storeUL\">' + that.translations[that.language].storeSelectError + '</label>');\r\n that.$('#pickup-store-search-error').text(that.translations[that.language].storeSelectError)\r\n that.$('#pickup-store-search-error').css('display', 'block')\r\n\r\n } else {\r\n form.submit();\r\n }\r\n },\r\n\r\n pickupBoxChange: function() {\r\n console.log('pickup box change')\r\n\r\n var that = this;\r\n var form = this.submitForm();\r\n var settings = this.settings();\r\n\r\n // Remove selected from all the buttons\r\n that.$('.cr-shipping-method').removeClass('selected')\r\n that.$('.delivery-method-desc').addClass('hide')\r\n\r\n that.$(document).trigger(\"storePickupActivated\");\r\n // Needed for top drawers\r\n that.$('#ajaxifyDrawer').css('overflow', 'auto');\r\n that.$('.drawer--has-fixed-footer .drawer__inner').css('overflow', 'auto');\r\n //ajaxCart.load();// SHOPIFY function\r\n // This will resize the footer but it's not very advantageous for us\r\n //theme.sizeCartDrawerFooter();\r\n //ShopifyAPI.changeItem(1, 60)\r\n\r\n that.$(form).validate({\r\n submitHandler: that.validateSubmiHandler.bind(that)\r\n });\r\n console.log(that.$('.js-toggle-pickup').hasClass('selected'))\r\n\r\n // If user has selected to pickup or cart contains pickup product\r\n if(that.$('.js-toggle-pickup').hasClass('selected')) {\r\n that.$('#pickup-attribute').val('1')\r\n this.updateFormActionWithShippingInformation();\r\n that.$('#pickup-details').show();\r\n this.addCartItems(); // Add pickup product to the cart\r\n\r\n // Hide/show date\r\n if (settings.date_enabled) {\r\n // If enabled, add validation rules\r\n //let dateErrorMessage = pickupTranslations.en\r\n that.$(\"#pickup-date-start\").rules('add', {\r\n \"required\": true,\r\n \"messages\": {\r\n \"required\": that.translations[that.language].pickupDateError\r\n }\r\n });\r\n }\r\n\r\n // Hide/show phone\r\n if (settings.phone) {\r\n that.$(\"#pickup-number\").rules('add', {\r\n \"required\": true,\r\n \"messages\": {\r\n \"required\": that.translations[that.language].contactNumberError\r\n }\r\n });\r\n }\r\n\r\n if (settings.email) {\r\n that.$(\"#pickup-email\").rules('add', {\r\n \"required\": true,\r\n \"messages\": {\r\n \"required\": that.translations[that.language].emailError\r\n }\r\n });\r\n }\r\n\r\n // Hide/show name\r\n if (settings.name) {\r\n that.$('#pickup-name').rules('add', {\r\n required: true,\r\n messages: {\r\n required: that.translations[that.language].nameOfPersonCollectingError\r\n }\r\n });\r\n\r\n that.$('#pickup-first-name').rules('add', {\r\n required: true,\r\n messages: {\r\n required: that.translations[that.language].pickupFirstNameError\r\n }\r\n });\r\n\r\n that.$('#pickup-last-name').rules('add', {\r\n required: true,\r\n messages: {\r\n required: that.translations[that.language].pickupLastNameError\r\n }\r\n });\r\n }\r\n\r\n // Hide/show store search\r\n if (stores !== undefined && stores !== '' && stores.length > 1) {\r\n // var rules = ($j('#pickup-store').rules());\r\n // console.log(rules);\r\n that.$('#pickup-store-search').rules('add', {\r\n \"required\": true,\r\n \"messages\": {\r\n \"required\": that.translations[that.language].storeSelectError\r\n }\r\n });\r\n } else {\r\n that.$('#store-search').css('display', 'none'); // Hide store search\r\n }\r\n this.displayExtraFields();\r\n that.$('#pickup-details').css('display', 'inline !important'); // Show extra info\r\n } else {\r\n that.$('.cr-shipping-method').addClass('selected'); // Display as selected the shipping method\r\n that.$('#pickup-attribute').val('0')\r\n\r\n if(that.$(\"#pickup-date-start\").length){\r\n that.$(\"#pickup-date-start\").rules('remove');\r\n }\r\n\r\n if (that.$(\"#pickup-number\").length){\r\n that.$(\"#pickup-number\").rules('remove');\r\n }\r\n\r\n if (that.$(\"#pickup-email\").length){\r\n that.$(\"#pickup-email\").rules('remove');\r\n }\r\n\r\n if (that.$('#pickup-name').length){\r\n that.$('#pickup-name').rules('remove');\r\n }\r\n\r\n if (that.$('#pickup-first-name').length) {\r\n that.$('#pickup-first-name').rules('remove');\r\n }\r\n\r\n if (that.$('#pickup-last-name').length){\r\n that.$('#pickup-last-name').rules('remove');\r\n }\r\n\r\n if (that.$('#pickup-store-search').length) {\r\n that.$('#pickup-store-search').rules('remove');\r\n }\r\n\r\n // Pickup not checked. Hide display.\r\n that.$('#pickup-details').css('display', 'none'); // Hide extra info\r\n this.removePickupProduct()\r\n }\r\n },\r\n\r\n updateStorePickupInformation: function (){\r\n var that = this;\r\n var settings = this.settings();\r\n var storePickupInformation = '';\r\n var pickupDate = that.$('#pickup-date-start').val();\r\n var changed = false;\r\n var attributes = {};\r\n\r\n if (pickupDate != undefined && pickupDate != '') {\r\n var chunks = pickupDate.split('@')\r\n var selectedPickupDate = chunks[0].trim();\r\n storePickupInformation += ' Pickup Date: ' + selectedPickupDate;\r\n that.$('#note-pickup-date').val(selectedPickupDate);\r\n attributes['Pickup_date'] = selectedPickupDate;\r\n changed = true;\r\n }\r\n\r\n var pickupTime = that.$('#pickup-time').val();\r\n if (pickupTime != undefined && pickupTime.trim() != '') {\r\n storePickupInformation += ' Pickup Time: ' + pickupTime;\r\n that.$('#note-pickup-time').val(pickupTime);\r\n attributes['Pickup_time'] = pickupTime;\r\n changed = true;\r\n }\r\n\r\n var firstName = that.$('#pickup-first-name').val();\r\n var lastName = that.$('#pickup-last-name').val();\r\n var pickupName = '';\r\n if (!firstName && !lastName) {\r\n pickupName = that.$('#pickup-name').val();\r\n attributes['Pickup_name'] = '';\r\n } else {\r\n pickupName = firstName + ' ' + lastName;\r\n that.$('#pickup-name').val(pickupName);\r\n attributes['Pickup_name'] = pickupName;\r\n }\r\n\r\n if (pickupName != undefined && pickupName != ''){\r\n storePickupInformation += ' Name of person collecting: ' + pickupName;\r\n that.$('#note-pickup-name').val(pickupName);\r\n attributes['Pickup_name'] = pickupName;\r\n changed = true;\r\n }\r\n if (firstName) {\r\n firstName = firstName.trim();\r\n var pivot = that.shippingInformation.replace(/checkout\\[shipping_address\\]\\[first_name\\]=(.*?)\\&/ig, '');\r\n that.shippingInformation = pivot + \"&checkout[shipping_address][first_name]=\" + firstName + '&';\r\n that.updateFormActionWithShippingInformation();\r\n changed = true;\r\n }\r\n\r\n if (lastName) {\r\n lastName = lastName.trim();\r\n var pivot = that.shippingInformation.replace(/checkout\\[shipping_address\\]\\[last_name\\]=(.*?)\\&/ig, '');\r\n that.shippingInformation = pivot + \"&checkout[shipping_address][last_name]=\" + lastName + '&';\r\n that.updateFormActionWithShippingInformation();\r\n changed = true;\r\n }\r\n\r\n var pickupNumber = that.$('#pickup-number').val()\r\n if (pickupNumber != undefined && pickupNumber != '') {\r\n storePickupInformation += ' Contact Number: ' + pickupNumber;\r\n that.$('#note-pickup-phone').val(pickupNumber);\r\n attributes['Pickup_phone'] = pickupNumber;\r\n var pivot = that.shippingInformation.replace(/checkout\\[shipping_address\\]\\[phone\\]=(.*?)\\&/ig, '');\r\n that.shippingInformation = pivot + \"&checkout[shipping_address][phone]=\" + pickupNumber + '&';\r\n that.updateFormActionWithShippingInformation();\r\n changed = true;\r\n }\r\n\r\n var pickupEmail = that.$('#pickup-email').val()\r\n if (pickupEmail != undefined && pickupEmail != '') {\r\n var pivot = that.shippingInformation.replace(/checkout\\[email_or_phone\\]=(.*?)\\&/ig, '');\r\n that.shippingInformation = pivot + \"&checkout[email_or_phone]=\" + pickupEmail + '&';\r\n that.updateFormActionWithShippingInformation();\r\n changed = true;\r\n }\r\n\r\n var extraInput1 = that.$('#extra_input_1').val();\r\n if (extraInput1 != undefined && extraInput1 != '') {\r\n storePickupInformation += ' ' + settings.extra_input_1 + ': ' + extraInput1;\r\n that.$('#note-pickup-extra1').val(extraInput1);\r\n attributes['Pickup_extra1'] = extraInput1;\r\n changed = true;\r\n }\r\n\r\n var extraInput2 = that.$('#extra_input_2').val();\r\n if (extraInput2 != undefined && extraInput2 != '') {\r\n storePickupInformation += ' ' + settings.extra_input_2 + ': ' + extraInput2;\r\n that.$('#note-pickup-extra2').val(extraInput2);\r\n attributes['Pickup_extra2'] = extraInput2;\r\n changed = true;\r\n }\r\n\r\n var extraInput3 = that.$('#extra_input_3').val();\r\n if (extraInput3 != undefined && extraInput3 != '') {\r\n storePickupInformation += ' ' + settings.extra_input_3 + ': ' + extraInput3;\r\n that.$('#note-pickup-extra3').val(extraInput3);\r\n attributes['Pickup_extra3'] = extraInput3;\r\n changed = true;\r\n }\r\n\r\n if (that.$('.activeStore').html() !== undefined) {\r\n var selectedStore = ''\r\n if (settings.locationsInASelect) {\r\n selectedStore = that.$('.activeStore').html();\r\n } else {\r\n selectedStore = that.$('li.activeStore > a > strong').text();\r\n }\r\n\r\n storePickupInformation += ' Selected store: ' + selectedStore\r\n that.$('#pickup-selected-store').val(selectedStore);\r\n attributes['Pickup_Store'] = selectedStore;\r\n changed = true;\r\n }\r\n\r\n if (changed && settings.saveOnChange){\r\n console.log('Pickup information saved');\r\n attributes['pickup'] = 1;\r\n that.updateCartAttributes(attributes)\r\n }\r\n\r\n that.$('#pickup-information').val(storePickupInformation.trim())\r\n that.$('.cart__checkout--page').removeClass('btn--loading');\r\n that.$('.cart__checkout').removeClass('btn--loading');\r\n },\r\n\r\n updateCartAttributes: function(attributes, callback) {\r\n var that = this;\r\n var params = {\r\n type: 'POST',\r\n url: '/cart/update.js',\r\n data: {\r\n attributes: attributes\r\n },\r\n dataType: 'json',\r\n success: function() {\r\n console.log('Updated cart');\r\n callback;\r\n },\r\n error: function(XMLHttpRequest, textStatus) {\r\n console.log(XMLHttpRequest, textStatus);\r\n }\r\n };\r\n that.$.ajax(params);\r\n },\r\n\r\n submitForm: function(){\r\n let foundForm = false;\r\n var that = this;\r\n let myForm = that.$('#pickup-details').closest('form')\r\n\r\n if (!myForm.length){\r\n for (var n in that.$('form')) {\r\n var testForm = that.$('form')[n]; // Create $jq to test the form attributes\r\n if(testForm.attributes && testForm.attributes.class && testForm.attributes.class.value == 'mini-cart') continue;\r\n if(testForm.attributes && testForm.attributes.class && testForm.attributes.class.value.indexOf('ajaxcart') > -1) continue;\r\n if (testForm.attributes && testForm.attributes.action && testForm.attributes.action.value.indexOf('/cart') > -1\r\n && testForm.attributes.class\r\n && testForm.attributes.class.value.indexOf('cart') > -1\r\n && testForm.attributes.action.value.indexOf('/add') < 0\r\n ) { // We have a winner\r\n return that.$(testForm)[0];\r\n };\r\n };\r\n } else {\r\n return myForm;\r\n }\r\n\r\n if (!foundForm) {\r\n for (var n in that.$('form')) {\r\n var testForm = that.$('form')[n]; // Create $jq to test the form attributes\r\n if(testForm.attributes && testForm.attributes.class && testForm.attributes.class.value == 'mini-cart') continue;\r\n if(testForm.attributes && testForm.attributes.class && testForm.attributes.class.value.indexOf('mm-menu') > -1) continue;\r\n if (testForm.attributes && testForm.attributes.action && testForm.attributes.action.value.indexOf('/cart') > -1\r\n && testForm.attributes.action.value.indexOf('/add') < 0\r\n ) { // We have a winner\r\n return that.$(testForm)[0];\r\n };\r\n };\r\n }\r\n if (!foundForm) {\r\n for (var n in that.$('form')) {\r\n var testForm = that.$('form')[n]; // Create $jq to test the form attributes\r\n if(testForm.attributes && testForm.attributes.class && testForm.attributes.class.value == 'mini-cart') continue;\r\n if (testForm.attributes && testForm.attributes.action && testForm.attributes.action.value.indexOf('/checkout') > -1\r\n && testForm.attributes.action.value.indexOf('/add') < 0\r\n ) { // We have a winner\r\n return that.$(testForm)[0];\r\n };\r\n };\r\n }\r\n\r\n return '';\r\n },\r\n\r\n settings: function(){\r\n return storePickupSettings;\r\n },\r\n\r\n injectButton: function(callback){\r\n var that = this;\r\n var checkExist = setInterval(function() {\r\n //console.log('checking')\r\n if (that.$('#pickup-container').length) {\r\n that.$('#pickup-container').css('display', 'flex');\r\n console.log(\"Exists!\");\r\n clearInterval(checkExist);\r\n callback();\r\n }\r\n }, 100);\r\n },\r\n\r\n storesTemplate: function(){\r\n var that = this;\r\n return '<div id=\"store-search\">' +\r\n that.translations[that.language].chooseLocation +\r\n //'<label for=\"pickup-store-search\">' + that.translations[that.language].pickupStore + '</label>' +\r\n //'<input type=\"text\" name=\"pickup-store-search\" ' + 'id=\"pickup-store-search\" onkeyup=\"storePickup.storeFilter()\" ' + 'placeholder=\"' + that.translations[that.language].chooseLocation +'\">' +\r\n '<input type=\"hidden\" name=\"pickup-store\" id=\"pickup-store\">' +\r\n '\x3c!-- Where store value gets saved for validation --\x3e' +\r\n '<ul id=\"storeUL\"></ul>' +\r\n '</div>';\r\n },\r\n\r\n storesTemplateSelect: function(){\r\n var that = this;\r\n return '<div id=\"store-search\">' +\r\n that.translations[that.language].chooseLocation +\r\n '\x3c!-- Where store value gets saved for validation --\x3e' +\r\n '<input type=\"hidden\" name=\"pickup-store\" id=\"pickup-store\">' +\r\n '<select id=\"storeUL\"></select>' +\r\n '</div>';\r\n }\r\n};\r\n\r\n(function(){\r\n if (typeof CRpermanentDomain !== \"undefined\" && CRpermanentDomain == 'function-fringe.myshopify.com' && document.location.href.indexOf('/cart') < 0){\r\n return;\r\n }\r\n //console.log(document.currentScript.src)\r\n if (typeof storePickupLoaded !== \"undefined\"){\r\n if (storePickupLoaded === true) return;\r\n storePickupLoaded = true;\r\n }\r\n\r\n var loadScript = function(url, callback){\r\n\r\n var script = document.createElement(\"script\");\r\n script.type = \"text/javascript\";\r\n\r\n // If the browser is Internet Explorer.\r\n if (script.readyState){\r\n script.onreadystatechange = function(){\r\n if (script.readyState == \"loaded\" || script.readyState == \"complete\"){\r\n script.onreadystatechange = null;\r\n callback();\r\n }\r\n };\r\n // For any other browser.\r\n } else {\r\n script.onload = function(){\r\n callback();\r\n };\r\n }\r\n\r\n script.src = url;\r\n document.getElementsByTagName(\"head\")[0].appendChild(script);\r\n };\r\n\r\n // Load inline css\r\n (function(css){\r\n var head = document.getElementsByTagName('head')[0];\r\n var s = document.createElement('style');\r\n s.setAttribute('type', 'text/css');\r\n s.appendChild(document.createTextNode(css));\r\n head.appendChild(s);\r\n })(css);\r\n\r\n //load link css\r\n (function(linkCss){\r\n var link = document.createElement('link');\r\n link.setAttribute('rel', 'stylesheet');\r\n link.setAttribute('type', 'text/css');\r\n link.setAttribute('href', linkCss );\r\n document.getElementsByTagName('head')[0].appendChild(link)\r\n })('https://cdn.thecreativer.com/css/classic.css');\r\n\r\n\r\n var myAppJavaScript = function($){\r\n // Start of callback hell :) fix it\r\n loadScript('https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js', function(){\r\n if (jQuery !== undefined && jQuery.fn.validate !== undefined && jQuery.fn.rules !== undefined){\r\n $.fn.validate = jQuery.fn.validate;\r\n $.fn.rules = jQuery.fn.rules;\r\n }\r\n\r\n //loadScript(appUrl + 'js/picker.js', function(){\r\n var scriptUrl = '';\r\n if (pickupLocale == 'fr'){\r\n scriptUrl = 'https://cdn.jsdelivr.net/combine/npm/pickadate@3.5.6/lib/compressed/picker.min.js,npm/pickadate@3.5.6/lib/compressed/picker.date.min.js,npm/pickadate@3.5.6/lib/compressed/picker.time.min.js,npm/pickadate@3.5.6/lib/translations/fr_FR.min.js';\r\n } else {\r\n scriptUrl = 'https://cdn.jsdelivr.net/combine/npm/pickadate@3.5.6/lib/compressed/picker.min.js,npm/pickadate@3.5.6/lib/compressed/picker.date.min.js,npm/pickadate@3.5.6/lib/compressed/picker.time.min.js';\r\n }\r\n\r\n loadScript(scriptUrl, function(){\r\n if (jQuery !== undefined && jQuery.fn.pickadate !== undefined) {\r\n $.fn.pickadate = jQuery.fn.pickadate;\r\n }\r\n console.log('script added');\r\n $(document).ready(function() {\r\n // Initialize Store Pickup Option\r\n storePickup.init($);\r\n });\r\n });\r\n });\r\n };\r\n\r\n // Check jquery version\r\n if ((typeof jQuery === 'undefined') || (parseFloat(jQuery.fn.jquery) < 1.11)) {\r\n console.log('Load jquery...');\r\n loadScript('//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js', function(){\r\n var jQuery191 = jQuery.noConflict();\r\n myAppJavaScript(jQuery191);\r\n });\r\n } else {\r\n console.log('jQuery loaded.')\r\n myAppJavaScript(jQuery);\r\n }\r\n})();\r\n\n\n//# sourceURL=webpack:///./src/includes/storepickup.js?"
)
},
"./src/index.js": function(module, exports, __webpack_require__) {
eval(
"// don't insert axios directly, it was creating issues for this store: articledublin.com\r\n//require('./includes/axios.min.js');\r\ndocument.querySelector('#pickup-container').style.display = 'flex'\r\nvar pickupButtonSpan = document.querySelector('.pickup-button > span');\r\nif (pickupButtonSpan) {\r\n pickupButtonSpan.innerHTML = '<div class=\"lds-ellipsis\"><div></div><div></div><div></div><div></div></div>';\r\n}\r\n\r\nvar pickupLoadingContainer = document.querySelector('.pickup-loading');\r\nif (pickupLoadingContainer) {\r\n pickupLoadingContainer.innerHTML = '<div class=\"lds-ellipsis\"><div></div><div></div><div></div><div></div></div>';\r\n}\r\n\r\nvar pickupContainer = document.getElementById(\"pickup-container\");\r\nvar storeForm = pickupContainer.closest(\"form\");\r\naxios.get(appUrl + 'isInstalled', {\r\n params: {\r\n shop: \"duafehairsalon.myshopify.com\"\r\n }\r\n}).then(function(response) {\r\n if (response.data.status == '404'){\r\n // var elem = document.querySelector('#pickup-container');\r\n // elem.parentNode.removeChild(elem);\r\n } else {\r\n console.log('cart')\r\n __webpack_require__(/*! ./includes/init.js */ \"./src/includes/init.js\");\r\n __webpack_require__(/*! ./includes/storepickup.js */ \"./src/includes/storepickup.js\");\r\n }\r\n}).catch(function (error) {\r\n console.log(error);\r\n})\r\n\n\n//# sourceURL=webpack:///./src/index.js?"
)
}
})
</script>
<button type="submit" name="checkout" class="btn btn--loader" data-cart-submit="" style="display: inline-block;"> Checkout <span class="btn--loader-balls"></span>
</button>
</div>
<div class="cart-footer__message-container">
<div class="cart-footer__message" data-cart-message=""></div>
</div>
</div>
</div>
</footer>
</form>
POST /contact#contact_form
<form method="post" action="/contact#contact_form" id="contact_form" accept-charset="UTF-8" class="contact-form" data-hs-cf-bound="true"><input type="hidden" name="form_type" value="customer"><input type="hidden" name="utf8" value="✓">
<input type="hidden" name="contact[tags]" value="newsletter">
<label for="NewsletterEmail" class="site-footer__newsletter-label">Sign up for updates</label>
<div class="site-footer__newsletter-subheading">
<p>Promotions, new products and sales. Directly to your inbox.</p>
</div>
<div class="input-group--underline">
<input type="email" value="" placeholder="My email address" name="contact[email]" id="NewsletterEmail" class="input-group__field site-footer__newsletter-input" aria-label="My email address" autocorrect="off" autocapitalize="off">
<div class="input-group__btn input-group__btn--newsletter">
<button type="submit" class="btn--newsletter__submit"> Subscribe <svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-arrow-right" viewBox="0 0 4 7">
<path fill="#444" d="M4 3.5L0 7V0z"></path>
</svg>
</button>
</div>
</div>
<div class="site-footer__newsletter-message" aria-role="alert">
</div>
</form>
Text Content
Skip to content Call Us (267) 297-7636 Menu * Home * Book Online * Free Consultation * Contact Us * Prices * Knowledge Base Knowledge Base menu * Knowledge Base * Hair Ingredients Hair Ingredients menu * Almond Oil * Aloe Vera * Avocado Oil * Beeswax * Blackseed Oil * Burdock Root * Castor Oil * Chamomile * Cocoa Butter * Fennel * Hair Issues Hair Issues menu * Dandruff * Alopecia * Razorbumps * Split Ends * Job Application * Press * Search * Hair Diagnostic * Employees Only * Employee Uploads * Wash Room Reporting * Press * Facebook * Twitter * Pinterest * Instagram Search again View cart SHOPPING CART Enable cookies to use the shopping cart Your cart is currently empty. Continue browsing here Product Price Quantity Total * t: e * (-) Remove Remove Quantity Special instructions for seller Discount: - Subtotal $0.00 Taxes and shipping calculated at checkout Shipping Pickup at Duafe Please click the checkout button to continue. Pickup Date August 2024 SunMonTueWedThuFriSat 28 29 30 31 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 1 2 3 4 5 6 7 * 12:00 AM * 12:30 AM * 1:00 AM * 1:30 AM * 2:00 AM * 2:30 AM * 3:00 AM * 3:30 AM * 4:00 AM * 4:30 AM * 5:00 AM * 5:30 AM * 6:00 AM * 6:30 AM * 7:00 AM * 7:30 AM * 8:00 AM * 8:30 AM * 9:00 AM * 9:30 AM * 10:00 AM * 10:30 AM * 11:00 AM * 11:30 AM * 12:00 PM * 12:30 PM * 1:00 PM * 1:30 PM * 2:00 PM * 2:30 PM * 3:00 PM * 3:30 PM * 4:00 PM * 4:30 PM * 5:00 PM * 5:30 PM * 6:00 PM * 6:30 PM * 7:00 PM * 7:30 PM * 8:00 PM * 8:30 PM * 9:00 PM * 9:30 PM * 10:00 PM * 10:30 PM * 11:00 PM * 11:30 PM Name of Person Collecting Contact Number Email address Pick up Mon., Wed., Fridays - 9am-11am Checkout Invalid Password Enter * Search * Hair Diagnostic * Employees Only * Employee Uploads * Wash Room Reporting * Press Sign up for updates Promotions, new products and sales. Directly to your inbox. Subscribe * Facebook * Twitter * Pinterest * Instagram Copyright © 2024, Duafe Natural Hair Salon. Powered by Shopify Payment icons * American Express * Apple Pay * Diners Club * Discover * Meta Pay * Google Pay * Mastercard * Shop Pay * Visa * choosing a selection results in a full page refresh