${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 = "8b1ae64f-bce2-48cb-b5f7-b043d175c6ea";
// 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 == '0c182b27-8041-4008-bffa-2d149a5115dc' && 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: "0c182b27-8041-4008-bffa-2d149a5115dc",
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: Gold
${data.targetOption}
Quantity
Made to Order
SKU : ws1913927-3
SKU : ${data.variant && data.variant.sku}
Share the love
Description
Elevate your summer style with our Gold Strappy Flat Gladiator Sandals. These sandals boast an intricate strappy design, a comfortable flat sole, and adjustable straps for a customized fit. The versatile gold color effortlessly complements various outfits, making these sandals a must-have addition to your wardrobe. Crafted from durable materials, they promise long-lasting fashion appeal. Step into comfort and style this summer with our Gold Gladiator Sandals.
Handcrafted
US sizing. Fits true to size.
These gold gladiator sandals feature a stylish and intricate strappy design that adds a touch of sophistication to any outfit.
The sandals are designed with a flat sole, making them comfortable for extended wear, whether you're strolling the beach or exploring the city.
The striking gold color of these sandals complements a wide range of outfits, from casual summer dresses to beachwear, making them a versatile addition to your wardrobe.
The adjustable straps ensure a secure and customized fit, allowing you to comfortably wear these sandals all day long.
These sandals are crafted from high-quality materials to ensure durability, so you can enjoy their fashionable look for multiple seasons.
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?