Your Cart
(
{{ cart.item_count }}
Items)
{{ error.message }}
{{ error.description }}
Your shopping cart is empty. Check out our Shop to see what's available
.slider-nav.hidden-slide {
display: none;
}
#hero-banner {
background-image: url(//www.nixplay.ca/cdn/shop/files/Diamond_white_bg_03534eaf-e455-489d-bdb4-b769b511f7e2.jpg?v=1676449911);
background-size: cover;
background-position: 50% 50%;
}
[dots-index]:hover {
background: #20819c;
}
.bg-nx-teal {
background: #20819c;
}
.arrow-blend {
mix-blend-mode: difference;
}
.bannercontainer {
max-width: 100vw;
min-width: calc(100vw - (100vw - 100%));
}
.bannerslide {
min-width: 100%;
transition: 350ms;
}
.cta_align_left {
justify-content: center;
justify-items: start;
align-items: start;
text-align: left;
padding-left: 4rem;
}
.cta_align_right {
justify-content: center;
justify-items: end;
align-items: end;
text-align: right;
padding-right: 4rem;
}
.cta_align_center {
justify-content: center;
justify-items: center;
align-items: center;
text-align: center;
padding: 0 2rem;
}
.slider-dots {
width: 100%
}
@media (max-width: 639px) {
.cta_align_mobile {
justify-content: flex-end;
justify-items: center;
text-align: center;
padding: 0 20px 30px 20px;
}
.cta_dual {
display: flex;
width: 100%;
justify-content: center;
align-items: center;
align-content: center;
gap: 15px;
}
.cta_single {
display: flex;
width: 100%;
justify-content: center;
align-items: center;
align-content: center;
}
.slider-dots {
width: 60%;
margin: 0 20%;
}
}
.video_containerslide_1_WFrmhx video {
width: 100%;
}
var slidectr = 1;
var listcount = Array.from(document.querySelectorAll('#bannercontainer li'));
let inverval_timer;
const runTimer = () => {
inverval_timer = window.setTimeout(() => {
movenext(slidectr);
//
}, 17000);
}
runTimer();
function movenext(e){
var movevalue = 0;
let listcount = Array.from(document.querySelectorAll('#bannercontainer li'));
if (e != (listcount.length/2)) {
movevalue = movevalue - (100 * e);
for (i = 0; i < listcount.length; i++) {
listcount[i].style.transform = "translateX(" + movevalue + "%)";
}
}
else if (e == (listcount.length/2)) {
for (i = 0; i < listcount.length; i++) {
listcount[i].style.transform = "unset";
}
}
movedots(parseInt(e), "right");
slidectr = (e >= (listcount.length/2)) ? e - (e - 1) : parseInt(e) + 1;
}
function moveprev(e){
var movevalue = 0;
let listcount = Array.from(document.querySelectorAll('#bannercontainer li'));
if (e <= (listcount.length/2)) {
movevalue = e > (listcount.length/2) ? 0 : (e == 1 ? -100 * ((listcount.length/2) - 1) : -100 * (e - 2));
for (i = 0; i < listcount.length; i++) {
listcount[i].style.transform = "translateX(" + movevalue + "%)";
}
}
movedots(parseInt(e), "left");
slidectr = e <= 0 ? listcount.length/2 : e - 1;
}
function movedots(d, msg) {
let listdots = Array.from(document.querySelectorAll('[dots-index]'));
var listselected = '';
if (msg == "right") {
listselected = (parseInt(d) + 1) > listdots.length ? document.querySelector("[dots-index='1']") : document.querySelector("[dots-index='" + (parseInt(d) + 1) + "']") ;
}
else {
listselected = (parseInt(d) - 1) > 0 ? document.querySelector("[dots-index='" + (parseInt(d) - 1) + "']") : document.querySelector("[dots-index='" + listdots.length + "']");
}
listdots.forEach((listdots) => {
listdots.classList.add('bg-gray-400');
listdots.classList.remove('bg-nx-teal');
});
if(listselected) {
listselected.classList.add("bg-nx-teal");
listselected.classList.remove("bg-gray-400");
}
clearTimeout(inverval_timer);
runTimer();
}
"A great gift for any far-flung relative"
"A thoughtful gift someone on your list is going to appreciate"
"Best looking HD digital photo frame available"
"Brings those memorable experiences to life"
"A great gift for any far-flung relative"
"A thoughtful gift someone on your list is going to appreciate"
"Best looking HD digital photo frame available"
"Brings those memorable experiences to life"
.swiffy-slider-c3a03e78-d3d6-4405-b457-c93413c4d101 .slider-nav {
left: -20px;
outline: transparent;
}
.swiffy-slider-c3a03e78-d3d6-4405-b457-c93413c4d101 .slider-nav-next {
right: -20px;
left: auto;
}
.social-proof-desktop li {
width: 25%;
}
.social-proof li img {
max-width: 130px;
margin: 0 auto;
max-height: 30px;
width: auto;
}
.social-proof .img-container {
min-height: 25px;
}
@media (min-width: 1024px) {
.social-proof-mobile {
display: none;
}
}
@media (min-width: 1536px) {
.social-proof li img {
margin: 0 auto;
max-height: 40px;
width: auto;
}
.social-proof .img-container {
min-height: 55px;
}
}
10.1" HD Matted Touch Screen Wi-Fi Digital Frame
10.1" HD Touch Screen Wi-Fi Digital Frame
15" Smart Wi-Fi Digital Frame
nix-FamilyCircles keeps Mom in the picturewith her own personal social feed streamed from the whole family.
nix-FamilyCircles keeps Mom in the picturewith her own personal social feed streamed from the whole family.
@media screen and (min-width: 1024px) {
.video_container42cf74a8-6dd4-4243-b4f7-bfdb9687c404 video {
width: 100%;
height: 100%;
margin: 0 auto;
}
}
@media screen and (min-width: 1024px) {
.video_container_mobile42cf74a8-6dd4-4243-b4f7-bfdb9687c404 video {
width: 100%;
height: 100%;
margin: 0 auto;
}
}
Keep Grandparents up to speed with up-to-the-minute video clip from their Grandchildren.
Keep Grandparents up to speed with up-to-the-minute video clip from their Grandchildren.
.home-usp-banner-container .img-min-height {min-height: 320px;}
.home-usp-banner-container .img-min-height-video {min-height: 100%;}
.home-usp-banner-container h2 { line-height: 1.25; }
.home-usp-banner-container .header-text br, .home-usp-banner-container .unset-br br { display: none; }
.home-usp-banner-container .image-block__img { width: 100%; }
@media (min-width: 1024px) {
.home-usp-banner-container .img-min-height {min-height: 660px;}
.home-usp-banner-container .img-min-height-video {min-height: auto;}
}
@media (min-width: 640px) {
.home-usp-banner-container .header-text br, .home-usp-banner-container .unset-br br { display: inline; }
}
You can trust a Nixplay frame
You can trust a Nixplay frame
All your photos are kept safely on our cloud storage which is located on secure, encrypted servers in the U.S.A.
Nixplay is GDPR and CCPA-compliant.
Nixplay is GDPR and CCPA-compliant.
All your photos are kept safely on our cloud storage which is located on secure, encrypted servers in the U.S.A.
Nixplay is GDPR and CCPA-compliant.
Nixplay is GDPR and CCPA-compliant.
.trust-nixplay-container .img-min-height {min-height: 300px;}
.richtext-block br {display: none;}
@media (min-width: 1024px) {
.trust-nixplay-container .img-min-height {min-height: 650px;}
}
@media (min-width: 640px) {
.richtext-block br {display: inline;}
}
.new-star-rating use:nth-child(2) {
transform: translate(20px);
}
.new-star-rating use:nth-child(3) {
transform: translate(40px);
}
.new-star-rating use:nth-child(4) {
transform: translate(60px);
}
.new-star-rating use:nth-child(5) {
transform: translate(80px);
}
.w-30 {
width: 7.3rem;
}
.f-14 {
font-size: 14px;
}
I have everything I wanted in a photo frame
Reviewed in the United States on July 27, 2020
Size: 10 inch Wood-Effect
I have had the Nixplay Smart Digital Picture Frame 10.1 inch Wood-effect for 2 week now. It is like opening a new iPhone. The packaging was extremely high quality and instructions were well written. In looking for a photo album I wanted to avoid a cheap company with poor quality and, thankfully, that was not my experience with Nixplay. The finish of the frame is top-notch. There was a high quality bendable send on the back. The picture quality is crisp. The app is easy to use. It also syncs with Google Photos. The settings are abundant. You can edit the amount of time a picture is shown, how the photo fits in the frame, brightness, transition style, sleep hours, and more. Also there is a programmable motion sensor to save on electricity. I waited a long time to find a good picture frame and overlooked this one for a while due to uncertainty. I’m glad I picked this. It makes for a great gift. I would consider getting another for myself. I’m an amateur photographer and this is a great way to display my hobby.
.new-star-rating use:nth-child(2) {
transform: translate(20px);
}
.new-star-rating use:nth-child(3) {
transform: translate(40px);
}
.new-star-rating use:nth-child(4) {
transform: translate(60px);
}
.new-star-rating use:nth-child(5) {
transform: translate(80px);
}
.w-30 {
width: 7.3rem;
}
.f-14 {
font-size: 14px;
}
4.6 / 25.5k ratings
.new-star-rating use:nth-child(2) {
transform: translate(20px);
}
.new-star-rating use:nth-child(3) {
transform: translate(40px);
}
.new-star-rating use:nth-child(4) {
transform: translate(60px);
}
.new-star-rating use:nth-child(5) {
transform: translate(80px);
}
.w-30 {
width: 7.3rem;
}
.f-14 {
font-size: 14px;
}
4.5 / 31.1k ratings
.new-star-rating use:nth-child(2) {
transform: translate(20px);
}
.new-star-rating use:nth-child(3) {
transform: translate(40px);
}
.new-star-rating use:nth-child(4) {
transform: translate(60px);
}
.new-star-rating use:nth-child(5) {
transform: translate(80px);
}
.w-30 {
width: 7.3rem;
}
.f-14 {
font-size: 14px;
}
4.2 / 2k ratings
.new-star-rating use:nth-child(2) {
transform: translate(20px);
}
.new-star-rating use:nth-child(3) {
transform: translate(40px);
}
.new-star-rating use:nth-child(4) {
transform: translate(60px);
}
.new-star-rating use:nth-child(5) {
transform: translate(80px);
}
.w-30 {
width: 7.3rem;
}
.f-14 {
font-size: 14px;
}
4.5 / 2.8k ratings
Why are we rated so highly?
Perhaps because we’ve been designing and building our own hardware and software to the highest standards since 2013.
.top-selling-frame-container .swiffy-slider .slider-nav { opacity: 1; outline: 0; filter: none; }
Which frame has your name on it?
9.7" QHD (2K) Smart Wi-Fi Digital Frame
8" HD Touch Screen Wi-Fi Digital Frame
8" HD Touch Screen Wi-Fi Digital Frame
10.1" HD Touch Screen Wi-Fi Digital Frame
9.7 inch
8 inch
8 inch
10.1 inch
Gold
Silver
Black (Gold)
Black (Silver)
Black (Gold)
Black (Silver)
Black (Silver)
White
Portrait, Landscape
Portrait, Landscape
Portrait, Landscape
Portrait, Landscape
4:3
16:10
16:10
16:10
Save
Save
Save
Save
document.addEventListener("DOMContentLoaded", function() {
const container = document.querySelector('.comparison-container');
const stepsContainer = document.querySelector('.steps-container');
const containerTable = document.querySelector('.comparison-table');
const prevBtn = document.querySelector('.comparison-table-btn-prev');
const nextBtn = document.querySelector('.comparison-table-btn-next');
const btnContainer = document.querySelector('.comparison-table-btn');
const displayCount = 4;
let maxCols = 0
let colWidth = 0
let currentPosition = 0
let stepCount = 0
const countSides = () => {
const { scrollWidth } = container
maxCols = scrollWidth/colWidth
stepCount = Math.ceil((scrollWidth/colWidth) - displayCount)
if(maxCols <= displayCount) {
prevBtn.classList.add('invisible');
nextBtn.classList.add('invisible');
stepsContainer.classList.add('invisible');
}
}
const checkSize = () => {
const { width } = container.getBoundingClientRect()
const { scrollLeft, scrollWidth, clientWidth } = container
colWidth = width/displayCount
containerTable.style.setProperty("--td_width", `${colWidth}px`);
countSides();
}
if(containerTable && container) {
checkSize()
window.addEventListener('resize', checkSize)
const checkButtonStyle = () => {
const { width } = container.getBoundingClientRect()
const { scrollLeft, scrollWidth, clientWidth } = container
if (currentPosition > 0) {
prevBtn.classList.remove('opacity-30')
} else {
prevBtn.classList.add('opacity-30')
}
if ((clientWidth + (currentPosition * colWidth) + 50) < scrollWidth) {
nextBtn.classList.remove('opacity-30')
} else {
nextBtn.classList.add('opacity-30')
}
}
const showFive = (position = currentPosition) => {
const left = position * colWidth
container.scrollTo({ left, behavior: 'smooth' })
for(let index = 0; index < stepCount; index++) {
const stepItem = stepsContainer.querySelector(`.step-${index}`);
if(stepItem) {
if(index === position) {
stepItem.classList.add('active');
} else {
stepItem.classList.remove('active');
}
}
}
checkButtonStyle();
}
for(let index = 0; index < stepCount; index++) {
const stepItem = document.createElement("li");
if(index === 0) {
stepItem.classList.add('active');
}
stepItem.classList.add(`step-${index}`);
stepItem.addEventListener('click', () => {
currentPosition = index
showFive(index);
})
stepsContainer.appendChild(stepItem);
}
prevBtn.addEventListener('click', () => {
currentPosition -= currentPosition == 0 ? 0 : 1;
showFive();
checkButtonStyle();
})
nextBtn.addEventListener('click', () => {
const { scrollWidth, clientWidth } = container
const nextIndex = currentPosition + 1
const canAdd = (clientWidth + (nextIndex * colWidth)) < scrollWidth
currentPosition += canAdd ? 1 : 0;
showFive();
})
showFive();
}
});
.steps-container li {
border-radius: 50%;
background: #aaa;
margin: 0px 5px;
border: .2rem solid transparent;
}
.btn-next:hover svg, .btn-prev:hover svg {
animation-duration: 0.4s;
animation-iteration-count: 1;
animation-timing-function: ease-in-out;
}
.btn-prev:hover svg { animation-name: slide-button-go-left; }
.btn-next:hover svg { animation-name: slide-button-go-right; }
.steps-container li.active {
background: #20819c;
}
.comparison-container{
width: 100%;
overflow-x: auto;
padding-bottom: 10px;
}
.comparison-table {
--td_width: 500px;
}
.comparison-table td {
width: var(--td_width);
}
.available-color span:not(:last-child)::after { content: ','; }.comparison-table tr > * {
border-right: 1px solid #ececec;
padding: 0.8rem;
}
.comparison-table tr > th {
padding-right: 0.8rem;
padding-left: 0.8rem;
}
.comparison-table tr:first-child > * {
border-top: none;
}
.ratings-and-logos-block .slider-indicators > * {width: 0.8rem;height: 0.8rem;opacity: .2;}
What are nix-FamilyCircles?
nix-FamilyCircles allows you to create photo and video playlists that you can share with different family or friend groups. They can then play and add to them. Here are some cool Circle ideas:
Wedding Circle - a lovely surprise on their big day
Get everyone to add photos from the couples courtship to play at the special occasion or send it to their Nixplay frame wedding gift!
Birthday Circle - Surprise!
Invite people to send surprise birthday messages and wishes from all over the world.
Family Holiday Circle - Relive all the Fun!
Collate everyone’s memories of the trip, and share them during the cold Winter months.
What are nix-FamilyCircles?
nix-FamilyCircles allows you to create photo and video playlists that you can share with different family or friend groups. They can then play and add to them. Here are some cool Circle ideas:
Wedding Circle - a lovely surprise on their big day
Get everyone to add photos from the couples courtship to play at the special occasion or send it to their Nixplay frame wedding gift!
Birthday Circle - Surprise!
Invite people to send surprise birthday messages and wishes from all over the world.
Family Holiday Circle - Relive all the Fun!
Collate everyone’s memories of the trip, and share them during the cold Winter months.
.nix-circles-container .img-min-height {min-height: 330px;}
.nix-circles-container .richtext-block br {display: none;}
@media (min-width: 1024px) {
.nix-circles-container .img-min-height {min-height: 850px;}
}
@media (min-width: 640px) {
.nix-circles-container .richtext-block br {display: inline;}
}
@media (min-width: 640px) and (max-width: 850px) {
.nix-circles-banner {
background-color: rgb(10, 129, 156);
}
}
Every Nixplay frame helps plant a tree!
Every Nixplay frame helps plant a tree!
For every frame shipped, Nixplay makes a donation towards a greener world.
Thanks to all our Nixplayers, we've planted over 1,016,883 million trees to date!
.home-trees-for-future-section .trees-content br {display: none;}
@media (min-width: 1024px) {
.home-trees-for-future-section .trees-content br {display: inline;}
}
.quote-banner-container .slider-nav:focus {outline: none;}
.quote-banner-container .slider-nav { opacity: 1; outline: 0; filter: none; }
.quote-banner-container .img-min-height {min-height: 300px;}
.quote-banner-container .slider-indicators > * {
width: 0.8rem;
height: 0.8rem;
opacity: .2;
}
.quote-banner-container .slider-indicators>.active {opacity: .5;}
.swiffy-slider.slider-indicators-outside .quote-slider-nav button {margin-bottom: -15px;}
@media (min-width: 640px) {
}
Multi-shipping FAQ
When and where will I see the multi-shipping option during my order journey?
When more than one (1) digital photo frame is added to cart, a checkbox will appear on the cart slider/cart page.
This option will allow you to order 2 or more frames and send them to different locations at the same time through the same checkout experience without having to enter different shipping addresses one by one.
The multi-shipping option is not showing up / greyed out. Why is that?
This can happen due to 3 reasons:
When only one (1) digital photo frame is added to cart.
When a print store product is added to cart. Please note print products are not supported for delivery through multi-shipping and need to be ordered separately.
When Nixplay Plus subscription is added to cart together with more than one (1) digital photo frame.
At this step, the multi-shipping option will show as “Not applicable - Learn More”. To avoid this:
Simply purchase the Nixplay Plus subscription separately first and activate your account.
Next login to your account directly at Nixplay store and enjoy 25% off the digital photo frames and you will notice the multi-shipping option is now available.
Why can’t I order both the Nixplay Plus subscription and use multi-shipping option at the same time?
This is because the multi-shipping option cannot recognize subscription-based products and therefore the Nixplay Plus subscription needs to be ordered separately.
We apologize for any inconvenience this may cause you. Rest assure, our engineers are working hard to find a solution and make this a 1 step journey. In the meantime, please follow the steps shared above to place your order while using the multi-shipping option.
var saleDetails = {
saleEnd: '',
cartSummary: {
item_count: 0,
items_subtotal_price: 0,
original_total_price: 0,
requires_shipping: false,
total_discount: 0,
total_price: 0,
},
cartMessage:"[#%] discount applied for our Secret Sale",
cartDiscount_code: '',
fixedDiscount: '',
locale: 'en',
offer: { you_save: "You Save", buy: "BUY", off: "OFF"},
items: [{
sku : "4201",
id: 45350366937243,
price: 25999,
saleCopy: "",
saleCopyBi: "",
copyColor: "",
blockBg: "",
bannerBlockBgColor: false,
spendAmount: "",
disclaimer: "",
hideSticker: false,
sticker: null,
stickerBi: null,
discountType: "123plus",
valueOff: "percent-off",
discountValue: "0, 0.05, 0.08",
addDiscountCopy: "",
addDiscountCopyBi: ""
},{
sku : "4241",
id: 43451874771099,
price: 25999,
saleCopy: "",
saleCopyBi: "",
copyColor: "",
blockBg: "",
bannerBlockBgColor: false,
spendAmount: "",
disclaimer: "",
hideSticker: false,
sticker: null,
stickerBi: null,
discountType: "123plus",
valueOff: "percent-off",
discountValue: "0, 0.05, 0.08",
addDiscountCopy: "",
addDiscountCopyBi: ""
},{
sku : "422",
id: 44337413980315,
price: 25999,
saleCopy: "",
saleCopyBi: "",
copyColor: "",
blockBg: "",
bannerBlockBgColor: false,
spendAmount: "",
disclaimer: "",
hideSticker: false,
sticker: null,
stickerBi: null,
discountType: "123plus",
valueOff: "percent-off",
discountValue: "0, 0.05, 0.08",
addDiscountCopy: "",
addDiscountCopyBi: ""
},{
sku : "429",
id: 43827163299995,
price: 25999,
saleCopy: "",
saleCopyBi: "",
copyColor: "",
blockBg: "",
bannerBlockBgColor: false,
spendAmount: "",
disclaimer: "",
hideSticker: false,
sticker: null,
stickerBi: null,
discountType: "123plus",
valueOff: "percent-off",
discountValue: "0, 0.05, 0.08",
addDiscountCopy: "",
addDiscountCopyBi: ""
},{
sku : "704",
id: 41609513762971,
price: 36999,
saleCopy: "",
saleCopyBi: "",
copyColor: "",
blockBg: "",
bannerBlockBgColor: false,
spendAmount: "",
disclaimer: "",
hideSticker: false,
sticker: null,
stickerBi: null,
discountType: "123plus",
valueOff: "percent-off",
discountValue: "0, 0.05, 0.08",
addDiscountCopy: "",
addDiscountCopyBi: ""
},{
sku : "421",
id: 44272576037019,
price: 39999,
saleCopy: "",
saleCopyBi: "",
copyColor: "",
blockBg: "",
bannerBlockBgColor: false,
spendAmount: "",
disclaimer: "",
hideSticker: false,
sticker: null,
stickerBi: null,
discountType: "123plus",
valueOff: "percent-off",
discountValue: "0, 0.05, 0.08",
addDiscountCopy: "",
addDiscountCopyBi: ""
},{
sku : "409",
id: 44337460281499,
price: 39999,
saleCopy: "",
saleCopyBi: "",
copyColor: "",
blockBg: "",
bannerBlockBgColor: false,
spendAmount: "",
disclaimer: "",
hideSticker: false,
sticker: null,
stickerBi: null,
discountType: "123plus",
valueOff: "percent-off",
discountValue: "0, 0.05, 0.08",
addDiscountCopy: "",
addDiscountCopyBi: ""
},{
sku : "315",
id: 42498799796379,
price: 19999,
saleCopy: "",
saleCopyBi: "",
copyColor: "",
blockBg: "",
bannerBlockBgColor: false,
spendAmount: "",
disclaimer: "",
hideSticker: false,
sticker: null,
stickerBi: null,
discountType: "123plus",
valueOff: "percent-off",
discountValue: "0, 0.05, 0.08",
addDiscountCopy: "",
addDiscountCopyBi: ""
},{
sku : "316",
id: 43405107724443,
price: 19999,
saleCopy: "",
saleCopyBi: "",
copyColor: "",
blockBg: "",
bannerBlockBgColor: false,
spendAmount: "",
disclaimer: "",
hideSticker: false,
sticker: null,
stickerBi: null,
discountType: "123plus",
valueOff: "percent-off",
discountValue: "0, 0.05, 0.08",
addDiscountCopy: "",
addDiscountCopyBi: ""
}, {
sku : "314",
id: 41487638855835,
price: 9900,
saleCopy: "",
saleCopyBi: "",
copyColor: "",
blockBg: "",
bannerBlockBgColor: false,
spendAmount: "",
disclaimer: "",
hideSticker: false,
sticker: null,
discountType: "123plus",
valueOff: "percent-off",
discountValue: "0, 0.05, 0.08",
stickerBi: null,
addDiscountCopy: "",
addDiscountCopyBi: ""
}, {
sku : "425",
id: 43451871854747,
price: 23999,
saleCopy: "",
saleCopyBi: "",
copyColor: "",
blockBg: "",
bannerBlockBgColor: false,
spendAmount: "",
disclaimer: "",
hideSticker: false,
sticker: null,
discountType: "123plus",
valueOff: "percent-off",
discountValue: "0, 0.05, 0.08",
stickerBi: null,
addDiscountCopy: "",
addDiscountCopyBi: ""
}, {
sku : "419",
id: 45312357204123,
price: 25999,
saleCopy: "",
saleCopyBi: "",
copyColor: "",
blockBg: "",
bannerBlockBgColor: false,
spendAmount: "",
disclaimer: "",
hideSticker: false,
sticker: null,
discountType: "123plus",
valueOff: "percent-off",
discountValue: "0, 0.05, 0.08",
stickerBi: null,
addDiscountCopy: "",
addDiscountCopyBi: ""
},]
};
window.saleDetails = saleDetails;
var saleFunctions = {
getPrice: function (line, qtt) {
var price = line.price;
var quantity = qtt || 1
var valueOff = line.valueOff
var values = String(line.discountValue).split(',');
var totalPrice = 0
var unitPrice = 0
var difference = 0
switch (line.discountType) {
case 'none':
unitPrice = price
finalPrice = price * quantity
break;
case 'fixed':
var discount_value = Number(values[0]);
unitPrice = (valueOff === 'percent-off') ? price * (1 - discount_value) : price - (discount_value * 100);
unitPrice = (Math.floor(unitPrice/100)+ 0.99)*100
finalPrice = unitPrice * quantity;
difference = price - unitPrice
break;
case '3plus':
break;
case '123plus':
var discount_value;
if(quantity == 1) {
discount_value = Number(values[0]);
} else if (quantity == 2) {
discount_value = Number(values[1]);
} else {
discount_value = Number(values[2]);
}
unitPrice = (valueOff === 'percent-off') ? price * (1 - discount_value) : price - ((discount_value*100) / quantity);
unitPrice = (valueOff === 'percent-off') ? ((unitPrice/100))*100 : unitPrice
finalPrice = unitPrice * quantity;
difference = price - unitPrice
break;
case '1235plus':
break;
case '12plus':
var discount_value;
if(quantity == 1) {
discount_value = Number(values[0]);
} else {
discount_value = Number(values[1]);
}
unitPrice = (valueOff === 'percent-off') ? price * (1 - discount_value) : price - (discount_value * 100);
unitPrice = (Math.floor(unitPrice/100)+ 0.99)*100
finalPrice = unitPrice * quantity;
difference = price - unitPrice
break;
case 'spend':
var cartTriggers = String(line.spendAmount).split(',');
var lastPositiveIndex = -1;
cartTriggers.forEach((trigger, index) => {
var triggerValue = Number(trigger)
var cartValue = (Number(window.saleDetails.cartSummary.original_total_price || 0) + Number(price))/ 100
if(cartValue > triggerValue) {
lastPositiveIndex = index
}
});
discount_value = lastPositiveIndex > -1 ? Number(values[lastPositiveIndex] || 0) : 0;
unitPrice = (valueOff === 'percent-off') ? price * (1 - discount_value) : price - (discount_value * 100);
finalPrice = unitPrice * quantity;
difference = price - unitPrice
break;
case 'bogox':
break;
case 'bogo':
break;
default:
console.log(`Sorry, we are out of`);
}
return { finalPrice: finalPrice, unitPrice: unitPrice, difference: difference }
},
updateCartSummary: function(cart) {
window.saleDetails.cartSummary = {
item_count: cart.item_count,
items_subtotal_price: cart.items_subtotal_price,
original_total_price: cart.original_total_price,
requires_shipping: cart.requires_shipping,
total_discount: cart.total_discount,
total_price: cart.total_price,
}
}
}
window.saleFunctions = saleFunctions;