${function() {
if (data === undefined || typeof data !== 'string' || data == '') return '';
const searchEmpty = ("Your search for \"{test}\" did not yield any results.").replace('{test}', data);
return `
/**
* Custom discount code component that handles displaying and managing discount codes
* @extends {SPZ.BaseElement}
*/
class SpzCustomDiscountCode extends SPZ.BaseElement {
constructor(element) {
super(element);
// API endpoint for fetching discount codes
this.getDiscountCodeApi = "\/api\/storefront\/promotion\/code\/list";
// Debounce timer for resize events
this.timer = null;
// Current variant ID
this.variantId = "e53e2580-d7e9-4772-a98c-afc8c8c30cb2";
// Store discount code data
this.discountCodeData = {}
}
/**
* Check if layout is supported
* @param {string} layout - Layout type
* @return {boolean}
*/
isLayoutSupported(layout) {
return layout == SPZCore.Layout.LOGIC;
}
/**
* Initialize component after build
*/
buildCallback() {
this.templates_ = SPZServices.templatesForDoc();
this.viewport_ = this.getViewport();
// Bind methods to maintain context
this.render = this.render.bind(this);
this.resize = this.resize.bind(this);
this.switchVariant = this.switchVariant.bind(this);
}
/**
* Setup component when mounted
*/
mountCallback() {
this.getData();
// Add event listeners
this.viewport_.onResize(this.resize);
this.win.document.addEventListener('dj.variantChange', this.switchVariant);
}
/**
* Cleanup when component is unmounted
*/
unmountCallback() {
this.viewport_.removeResize(this.resize);
this.win.document.removeEventListener('dj.variantChange', this.switchVariant);
// 清除定时器
if (this.timer) {
clearTimeout(this.timer);
this.timer = null;
}
}
/**
* Handle resize events with debouncing
*/
resize() {
if (this.timer) {
clearTimeout(this.timer)
this.timer = null;
}
this.timer = setTimeout(() => {
if (appDiscountUtils.inProductBody(this.element)) {
this.render();
} else {
this.renderSkeleton();
}
}, 200);
}
/**
* Handle variant changes
* @param {Event} event - Variant change event
*/
switchVariant(event) {
const variant = event.detail.selected;
if (variant.product_id == '07be1a92-62aa-42b1-89e1-15505e0f67dc' && variant.id != this.variantId) {
this.variantId = variant.id;
this.getData();
}
}
/**
* Fetch discount code data from API
*/
getData() {
if (appDiscountUtils.inProductBody(this.element)) {
const reqBody = {
product_id: "07be1a92-62aa-42b1-89e1-15505e0f67dc",
variant_id: this.variantId,
product_type: "",
}
if (!reqBody.product_id || !reqBody.variant_id) return;
this.discountCodeData = {};
this.win.fetch(this.getDiscountCodeApi, {
method: "POST",
body: JSON.stringify(reqBody),
headers: {
"Content-Type": "application/json"
}
}).then(async (response) => {
if (response.ok) {
let data = await response.json();
if (data.list && data.list.length > 0) {
data.list[0].product_setting.template_config = JSON.parse(data.list[0].product_setting.template_config);
// Format timestamps to local timezone
const zone = this.win.SHOPLAZZA.shop.time_zone;
data.list = data.list.map(item => {
if(+item.ends_at !== -1) {
item.ends_at = appDiscountUtils.convertTimestampToFormat(+item.ends_at, zone);
}
item.starts_at = appDiscountUtils.convertTimestampToFormat(+item.starts_at, zone);
return item;
});
}
this.discountCodeData = data;
this.render();
} else {
this.clearDom();
}
}).catch(err => {
console.error("discount_code", err)
this.clearDom();
});
} else {
this.renderSkeleton();
}
}
/**
* Clear component DOM except template
*/
clearDom() {
const children = this.element.querySelector('*:not(template)');
children && SPZCore.Dom.removeElement(children);
}
/**
* Render discount codes with formatted dates
*/
render() {
// Render using discount code model
SPZ.whenApiDefined(document.querySelector('#spz_custom_discount_code_model')).then(renderApi => {
renderApi.doRender_({
discountCodeData: this.discountCodeData
})
}).catch(err => {
this.clearDom();
})
}
renderSkeleton() {
// Render template for non-product pages
this.templates_
.findAndRenderTemplate(this.element, {
isMobile: appDiscountUtils.judgeMobile()
})
.then((el) => {
this.clearDom();
this.element.appendChild(el);
})
.catch(err => {
this.clearDom();
});
}
}
// Register custom element
SPZ.defineElement('spz-custom-discount-code', SpzCustomDiscountCode);
Size:
${data.value}
Color: Black
${data.targetOption}
Quantity
Made to Order
SKU : ws1909701-3
SKU : ${data.variant && data.variant.sku}
Share the love
Description
Classic Design: These loafers feature a timeless black-and-white color scheme, making them versatile and suitable for various outfits and occasions.
Round Toe: The round-toe design provides ample room and comfort for your toes, allowing for extended wear without discomfort.
Comfortable Flats: These loafers are designed with comfort in mind, featuring a flat sole that provides stability and support for all-day wear.
Quality Materials: Crafted from high-quality materials, these flats are durable and built to last, ensuring long-term value for your footwear collection.
Stylish Versatility: Their chic and minimalist design makes these loafers perfect for both casual and semi-formal settings, allowing you to effortlessly elevate your style.
Heel height: Flat Color: Black and White Handcrafted US sizing. Fits true to size.
Discover timeless style and comfort with our Black and White Loafers for Women. These comfortable flats feature a classic round-toe design and are crafted from high-quality materials for lasting durability. Their versatile black and white color scheme ensures they complement a wide range of outfits, making them an essential addition to your footwear collection. Whether you're heading to the office or a casual outing, these stylish loafers will keep you looking and feeling great all day long.
Refund and Exchange Policy
Refund and Exchange Policy
Exchange
Refund
Condition
1. Within 30 days from the delivered date. 2. Original New
1. Before returning the package to us for any reason, please email your request to support@fsjshoes.com. In the email please include 1/ order number 2/ items requesting to be returned and 3/ reason for return.
2. When your return request has been approved, please write your order number on a piece of white paper and put it inside the shipping package.
3. Please retain a receipt/proof of postage from your local post office and email the tracking number to us.
The Shipping Fee
Borne by us
Borne by buyer
Processing Time
We will prepare the new items that you exchange and deliver them within 3 days after we receive you exchange parcel.
Within 3 working days after we receive your returning parcel
Address
No.516 5th Floor,Ist Build.,No.666, Middle Section of Tianfu Avenue, High-tech Zone, Chengdu, China
Note: This address is not a return address, please contact customer service to obtain the return address.
Size Chart
Measuring Guide
1. Measure your foot and legs
2. Measure your boots
Recently viewed
${data.map(data => `
`).join('')}
${data.map(data => `
`).join('')}
Reviews
No reviews yet, why don't you leave the first review?