Promotional Refund
Read Reviews
{
if($event.detail > 0){
price = $event.detail;
}
});" x-text="Unick.formatMoney2(price)">
$0.00
✷ Earn 0 points with DRMTLGY Rewards.
Join →
✷ Earn 0 points with DRMTLGY Rewards.
Join →
{
show_subscription_promo = true;
});
"
@variant-updated.window="first_variant = $event.detail.variant.id"
@price-updated.window="
$nextTick(() => {
if($event.detail > 0){
let has_discount = false;
let item_price, discount_percentage, discount_price;
has_discount = true;
item_price = $event.detail;
discount_percentage = 20;
discount_price = item_price * discount_percentage / 100;
discount_price = item_price - discount_price;
price = `
` + Unick.formatMoney3(0) + `` + Unick.formatMoney3(discount_price);
if(!has_discount || subscribe == true){
price = `
` + Unick.formatMoney3(0) + `` + Unick.formatMoney3($event.detail);
}
}
});
"
x-init="
productForm = $refs.product_form;
button_label = 'ADD TO CART';
first_variant = '40475195080759';
price = `
${Unick.formatMoney3(0)}
`
price = `
${ Unick.formatMoney3(0)}
${Unick.formatMoney(0)}
`
"
>
Free U.S. Shipping Over $40 and a 60 day guarantee!
If you don't love it, return it within 60 days for a full-refund - just contact us and we'll take care of you
{
abtest = $event.detail.abtest;
});"
x-data="{
show: false,
abtest: false,
isSubs: false,
price: null,
lastScrollTop: 0,
scrollThreshold: 100, // Minimum scroll position to show button
init() {
// Initialize price
this.price = `$0.00 USD`;
this.initBehavior();
this.$watch('abtest', () => {
this.initBehavior();
});
const params = new URLSearchParams(window.location.search);
if (params.get('selling_plan') === 'subscription') {
this.isSubs = true;
}
},
addToCartFooter() {
let findAddToCartButton = document.querySelector('.product__info-wrapper form.product-form .button-add-to-cart');
let echoBundleButton = document.querySelector('.product__info-wrapper .bundle-builder-pdp .echo-checkout-button');
if (echoBundleButton) {
echoBundleButton.click();
} else {
findAddToCartButton.click();
}
},
initBehavior() {
// Find main add to cart button
const mainButton = document.querySelector('form.product-form .button-add-to-cart');
if (this.abtest) {
// AB Test: New behavior (IntersectionObserver)
if (!mainButton) {
this.show = true;
return;
}
const observer = new IntersectionObserver((entries) => {
this.show = !entries[0].isIntersecting;
}, {
threshold: 0.1,
rootMargin: '0px 0px -50px 0px'
});
observer.observe(mainButton);
} else {
// Original behavior (scroll-based)
if (!mainButton) {
this.show = true;
return;
}
// Initialize scroll position
const st = window.pageYOffset || document.documentElement.scrollTop;
this.lastScrollTop = st;
this.checkScroll();
// Add scroll listener
window.addEventListener('scroll', () => {
this.checkScroll();
});
}
},
checkScroll() {
if (!this.abtest) {
const st = window.pageYOffset || document.documentElement.scrollTop;
const scrollPosition = st || document.documentElement.scrollTop;
// Only show if scrolled more than 100px AND scrolling down
if (scrollPosition > this.scrollThreshold) {
this.show = st > this.lastScrollTop;
} else {
this.show = false;
}
this.lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
}
}
}"
x-title="Footer sticky add to cart"
x-show="show"
x-transition:enter="transform transition ease-in-out duration-500"
x-transition:enter-start="translate-y-full opacity-0"
x-transition:enter-end="translate-y-0 opacity-1"
x-transition:leave="transform transition ease-in-out duration-500"
x-transition:leave-start="translate-y-0"
x-transition:leave-end="translate-y-full opacity-0"
@price-updated.window="$nextTick(() => {
const params = new URLSearchParams(window.location.search);
if (params.get('selling_plan') === 'subscription') {
isSubs = true;
}
const priceString = '$0.00 USD';
const currency = priceString.split(' ').pop();
price = `${Unick.formatMoney3($event.detail)} ${currency}`;
});"
@price-updated-reset.window="$nextTick(() => {
price = `$0.00 USD`;
});"
@price-updated-custom.window="($event) => {
if(!isNaN(`${$event.detail}`)){
const priceString = '$0.00 USD';
const currency = priceString.split(' ').pop();
price = `${Unick.formatMoney3($event.detail)} ${currency}`
} else {
price = $event.detail
}
}"
class="add-to-cart-footer p-3 bg-white text-black fixed bottom-0 w-full z-[70] shadow border-t">