Mini ScrapBook™ Keychain

المورد: shopify
$60.00
Options:  8 Photos
كمية
المخذون : 999999999
const priceItemClass = 'loyalty-benefit-package-card-item-price-item'; const priceItemActiveClass = 'loyalty-benefit-package-card-item-price-item-active'; const MAX_PACKAGE_COUNT = 3; const tagName = 'spz-custom-loyalty-benefits-package-card-entry'; class LoyaltyBenefitsPackageCardEntry extends SPZ.BaseElement { constructor(element) { super(element); this.sectionType = element.getAttribute('data-section-type'); this.modalContainerId = element.getAttribute('data-modal-container-id'); this.eventBusId = element.getAttribute('data-event-bus-id'); this.eventBusDom = document.getElementById(this.eventBusId); } isLayoutSupported(layout) { return layout === SPZCore.Layout.CONTAINER; } buildCallback() { if (!window.loyalty_benefit_package_card_id_num) { window.loyalty_benefit_package_card_id_num = 1; } this.pageTemplateName = window.SHOPLAZZA?.meta?.page?.template_name; this.isProductPage = (this.pageTemplateName == 'product' || this.pageTemplateName == 'product.custom') && this.sectionType != 'cart_drawer'; this.productId = this.isProductPage ? window.SHOPLAZZA?.meta?.page?.resource_id : ''; this.ljsRenderDom = this.element.querySelector('ljs-render'); this.productFormBundleComponentsInput = null; this.plans = []; this.viewPlanBenefitPackageId = null; this.viewPlanBenefitId = null; this.setSelectedData_(null, null); this.cardInitSuccess = false; this.startInit = false; this.setupAction_(); this.listeningCartChange_(); if (!this.element.hasAttribute('manual')) { this.init_(); } } setupAction_() { this.registerAction("render", () => { this.init_(); }); this.registerAction("setViewBenefitPackageId", (invocation) => { this.setViewBenefitPackageId_(invocation.args); }); this.registerAction("getViewPlanBenefitPackageData", () => { this.getViewPlan_(); }); this.registerAction("getViewPlanDetail_", () => { this.getViewPlanDetail_(); }); this.registerAction("setViewBenefitId", (invocation) => { this.setViewBenefitId_(invocation.args); }); this.registerAction("getViewPlanBenefitDetail", () => { this.getViewPlanBenefitDetail_(); }); this.registerAction("selectPlan", (invocation) => { this.selectPlan_(invocation.args); }); this.registerAction("setPlanSelectedStyle", () => { this.setPlanSelectedStyle_(); }); this.registerAction("onSelectPlan", (invocation) => { this.onSelectPlan_(invocation.event.detail.detail); }); } async init_() { this.startInit = true; const canLoadCard = await this.getCanLoadCard_(); if (!canLoadCard) { return; } this.getPlans_() .then(() => { this.renderPlans_(); this.cardInitSuccess = true; }); } getCanLoadCard_() { if (this.isProductPage) { return Promise.resolve(true); } return this.getCartCount_().then((count) => { return count > 0; }); } getCartCount_() { return fetch(`/ar/api/cart/count`, { method: 'GET', }).then((response) => { return response.json(); }).then((data) => { return data.data?.count; }); } listeningCartChange_() { if (this.isProductPage) { return; } window.addEventListener('dj.cartChange', (e) => { this.getCartCount_() .then((cartCount) => { if (0 >= cartCount) { if (this.cardInitSuccess) { this.element.style.display = 'none'; } } else { if (!this.cardInitSuccess) { if (this.startInit) { this.init_(); } } else if (this.element.style.display === 'none') { this.element.style.display = 'block'; } } }); }) } getPlans_() { const otherFinishedCards = document.querySelector(`${tagName}[finished="true"]`); if (otherFinishedCards) { return SPZ.whenApiDefined(otherFinishedCards) .then((api) => { this.element.setAttribute('finished', 'true'); this.plans = api.plans; this.selectedBenefitPackageId = api.selectedBenefitPackageId; this.selectedSellingPlanOptionId = api.selectedSellingPlanOptionId; this.setSelectedData_(this.selectedBenefitPackageId, this.selectedSellingPlanOptionId); return; }); } return fetch( `/ar/api/loyalty-server/benefit-package/selling-plans?limit=${MAX_PACKAGE_COUNT}&product_id=${this.productId}`, { method: 'GET', } ).then((response) => { return response.json(); }).then((data) => { this.element.setAttribute('finished', 'true'); return this.plans = data.plans || []; }); } renderPlans_() { SPZ.whenApiDefined(this.ljsRenderDom).then((api) => { api.render({ plans: this.plans, selectedBenefitPackageId: this.selectedBenefitPackageId, selectedSellingPlanOptionId: this.selectedSellingPlanOptionId, showViewButton: true, idNum: ++window.loyalty_benefit_package_card_id_num, }); }); } selectPlan_(data) { SPZ.whenApiDefined(this.eventBusDom).then((api) => { api.emit_('loyalty.select_benefit_package_plan', { ...data, origin: this.eventBusDom.dataset.origin, }); }); this.onSelectPlan_(data); } onSelectPlan_(data) { const { benefit_package_id, selling_plan_option_id } = data; const { selectedBenefitPackageId, selectedSellingPlanOptionId } = this; if (benefit_package_id === selectedBenefitPackageId && selling_plan_option_id === selectedSellingPlanOptionId) { this.setSelectedData_(null, null); this.setPlanSelectedStyle_(); return; } const plan = this.plans.find((plan) => plan.benefit_package.id === benefit_package_id); if (!plan) { return; } if (selling_plan_option_id && plan.selling_plan_option_id !== selling_plan_option_id) { return; } this.setSelectedData_(benefit_package_id, selling_plan_option_id); this.setPlanSelectedStyle_(); } setPlanSelectedStyle_() { const { selectedBenefitPackageId, selectedSellingPlanOptionId } = this; document.querySelectorAll(`#${this.modalContainerId} .${priceItemActiveClass}`).forEach((item) => item.classList.remove(priceItemActiveClass)); this.element.querySelectorAll(`.${priceItemActiveClass}`).forEach((item) => item.classList.remove(priceItemActiveClass)); const activePlanDomList = document.querySelectorAll(`#${this.modalContainerId} .${priceItemClass}[data-benefit_package_id="${selectedBenefitPackageId}"][data-selling_plan_option_id="${selectedSellingPlanOptionId}"]`); const elementActivePlanDomList = this.element.querySelectorAll(`.${priceItemClass}[data-benefit_package_id="${selectedBenefitPackageId}"][data-selling_plan_option_id="${selectedSellingPlanOptionId}"]`); if (activePlanDomList.length > 0 || elementActivePlanDomList.length > 0) { activePlanDomList.forEach((activePlanDom) => { activePlanDom.classList.add(priceItemActiveClass); }); elementActivePlanDomList.forEach((activePlanDom) => { activePlanDom.classList.add(priceItemActiveClass); }); } else { this.setSelectedData_(null, null); } } setSelectedData_(benefit_package_id, selling_plan_option_id) { this.selectedBenefitPackageId = benefit_package_id; this.selectedSellingPlanOptionId = selling_plan_option_id; const currentSelectedPlan = this.plans.find((plan) => plan.benefit_package.id === benefit_package_id); if (!currentSelectedPlan) { this.setSubmitData_(''); return; } const planPurchaseData = [{ "quantity":1, "product_id": currentSelectedPlan.benefit_package.product_id, "variant_id": currentSelectedPlan.benefit_package.variant_id, "note":"", "properties": selling_plan_option_id.length ? JSON.stringify({_selling_plan_option_id: selling_plan_option_id}) : '', }]; this.setSubmitData_(JSON.stringify(planPurchaseData)); } setSubmitData_(data) { if (this.isProductPage) { this.getProductFormBundleComponentsInput_().value = data; } else { window.djInterceptors?.request?.eject(window.loyalty_benefit_package_card_request_interceptor); window.loyalty_benefit_package_card_request_interceptor = window.djInterceptors?.request?.use((config)=>{ if(config.url == '/api/checkout/order') { try { config.body.line_items[0].bundle_components = data; } catch (error) { console.error('error', error); } } return config; }); } } getProductFormBundleComponentsInput_() { if (!this.productFormBundleComponentsInput) { this.productFormBundleComponentsInput = document.createElement('input'); this.productFormBundleComponentsInput.type = 'hidden'; this.productFormBundleComponentsInput.name = 'bundle_components'; this.productFormBundleComponentsInput.autocomplete = 'off'; this.element.appendChild(this.productFormBundleComponentsInput); } return this.productFormBundleComponentsInput; } setViewBenefitPackageId_(data) { const { benefit_package_id } = data; this.viewPlanBenefitPackageId = benefit_package_id; } setViewBenefitId_(data) { const { benefit_id } = data; this.viewPlanBenefitId = benefit_id; } getViewPlan_() { const plan = this.plans.find((plan) => plan.benefit_package.id === this.viewPlanBenefitPackageId) || this.plans[0]; return { plans: [plan], selectedBenefitPackageId: this.selectedBenefitPackageId, selectedSellingPlanOptionId: this.selectedSellingPlanOptionId, showViewButton: false, idNum: ++window.loyalty_benefit_package_card_id_num, }; } getViewPlanDetail_() { return fetch( `/ar/api/loyalty-server/benefit-package/${this.viewPlanBenefitPackageId}`, { method: 'GET', } ).then((response) => { return response.json(); }); } getViewPlanBenefitDetail_() { return fetch( `/ar/api/loyalty-server/benefit//${this.viewPlanBenefitId}`, { method: 'GET', } ).then((response) => { return response.json(); }); } } SPZ.defineElement(tagName, LoyaltyBenefitsPackageCardEntry); const TAG = 'spz-custom-loyalty-app-config'; class SpzCustomLoyaltyAppConfig extends SPZ.BaseElement { constructor(element) { super(element); this.allConfig = null; this.configPath = element.getAttribute('data-config-path'); } buildCallback() { this.action_ = SPZServices.actionServiceForDoc(); window.__loyalty_settings__.then((allConfig) => { this.allConfig = allConfig; const eventName = this.allConfig[this.configPath] ? 'configPass' : 'configFail'; const event = SPZUtils.Event.create(this.win, `${TAG}.${eventName}`, {}); this.action_.trigger(this.element, eventName, event); }); } _getAllConfig() { if (this.allConfig) { return this.allConfig; } return window.__loyalty_settings__.then((allConfig) => { this.allConfig = allConfig; return this.allConfig; }); } isLayoutSupported(layout) { return layout === SPZCore.Layout.LOGIC; } } SPZ.defineElement(TAG, SpzCustomLoyaltyAppConfig); class SpzCustomLoyaltyPoint extends SPZ.BaseElement { constructor(element) { super(element); this.value_ = element.getAttribute('value'); } buildCallback() { if (this.win.__loyalty_settings__) { this.win.__loyalty_settings__.then((settings) => { this.pointName_ = (settings.points_rule && settings.points_rule.points_name) || "Points"; this.render_(); }); } } mutatedAttributesCallback(mutations) { if (!SPZCore.Types.hasOwn(mutations, 'value')) { return; } this.value_ = mutations.value; this.render_(); } render_() { if (this.element.childElementCount > 0) { this.element.innerHTML = ''; } this.container_ = document.createElement("span"); this.container_.classList.add("loyalty-point"); this.container_.innerHTML = `${this.value_ !== null ? `${this.value_} ` : ''}${this.pointName_}`; this.element.appendChild(this.container_); } isLayoutSupported(layout) { return layout === SPZCore.Layout.CONTAINER; } } SPZ.defineElement("spz-custom-loyalty-point", SpzCustomLoyaltyPoint); class SpzCustomLoyaltyEvent extends SPZ.BaseElement { constructor(element) { super(element); } buildCallback() { this.setupAction_(); this.action_ = SPZServices.actionServiceForDoc(this.element); this.origin = this.element.dataset.origin; const attributes = this.element.attributes; for (let i = 0; i < attributes.length; i++) { const attributeName = attributes[i].name; if (attributeName.startsWith('@event:')) { const eventName = attributeName.replace('@event:', ''); window.SPZUtils.Event.listen( window, eventName, (data) => { if(data.detail.origin !== this.origin) { this.triggerEvent_(`event:${eventName}`, data); } } ) } } } triggerEvent_(eventName, data) { const event = SPZUtils.Event.create( this.win, `spz-custom-loyalty-event.${eventName}`, data ); this.action_.trigger(this.element, eventName, event); } setupAction_() { this.registerAction("emit", (invocation) => { const { args } = invocation; const {eventName} = args; this.emit_(eventName, args); }); } emit_(eventName, args) { const event = window.SPZUtils.Event.create( window, eventName, args ); window.dispatchEvent(event); } isLayoutSupported(layout) { return layout === SPZCore.Layout.LOGIC; } } SPZ.defineElement("spz-custom-loyalty-event", SpzCustomLoyaltyEvent);
document.addEventListener("DOMContentLoaded", function() { const modalContainer = document.getElementById('loyalty-benefit-package-card-modal-container-109'); if (modalContainer && modalContainer.parentNode !== document.body) { document.body.appendChild(modalContainer); } });

وصف

✔ Customers Service 24/7

✔ 60 Day Warranty

 

CREATING MEMORIES THAT LAST FOREVER!

Even the most important moments in your life will begin to fade over time.

Luckily, Mini Scrapbook helps you keep those memories alive forever.

Our keychains are beautiful time capsules that is filled with love that you can carry everywhere you go.

 

HOW TO ORDER

1. Choose the ScrapBook you prefer, the options are the 8-page Scrapbook or the 16-page Scrapbook.

2. Upload photos by clicking on the "Upload your Images here" button located above the "Add to Cart" button.

3. Proceed to payment and enjoy your wonderful keychain!

For any problems or information please feel free to contact us via email at infominiscrapbook@gmail.com or via Whatsapp by clicking on the button below right.

 

OVER 12 THOUSAND PARCELS SHIPPED IN 2021


Mini ScrapBook is an online store born in November 2020, we have only managed to ship 12100+ parcels across the US in 2021!

In 2022 we have already sold out for 6 consecutive months and we can proudly say that it is the most viral and purchased keychain on TikTok.

You don't need to say much when you have thousands of customers speaking for you. Check out some satisfied customers here 😁


 

MINI SCRAPBOOK™ AND ITS BENEFITS:


For us, the customer is at the top of our priority list, which is why we offer benefits such as:

🔐 Secure payment: Mini ScrapBook™ offers its customers the ability to pay for the product in a totally secure way. In fact, this site is protected with SSL (secure socket layer) encryption, the highest security standard on the Internet.

🚚 Trackable and Insured shipping: We rely on FEDEX for shipping service and any package will be delivered in 7-14 days with real-time trackable shipping via the tracking code that will be provided to you via email.


📞 Customer service available 7 days a week: We have a dedicated customer service team ready to respond to your every need. Weekends included.

🔄 60-day money back guarantee: Have you had problems with our product or are you not satisfied? Fill out the form in the "Contact Us" section, we will be glad to help you.

❓ Doubts? Questions? Feel free to contact us at infominiscrapbook@gmail.com

Mini ScapBook™ is now a family and looking forward to welcoming you, below are just some of the reviews our customers have left us.