Founded in 2018, KuKirin is a global leader in electric scooters, recognized for its innovative design, exceptional quality, and customer-centric service. Combining high performance, safety, and sustainability, KuKirin is committed to delivering durable and reliable mobility solutions. With strict quality standards, advanced technology, and a professional after-sales network, we ensure riders worldwide enjoy the convenience and joy of safe, eco-friendly urban commuting.
👍 Like KuKirin Electric Scooter Facebook homepage to join the new trend of green travel! The latest activities, user stories, riding experiences, and share every wonderful journey with you! 🛴✨
👥 Join KuKirin Electric Scooter Facebook group to chat about riding fun with riders around the world! Share experiences, get support, participate in exclusive events, and skate out a wonderful life together! 🛴💬
${function(){
let content = 'Register as a member and enjoy the benefits immediately.';
const { benefits = [] } = data.memberDetail?.current_tier || {};
let pointBenefits = benefits.filter((benefit) => {
return benefit.trigger_type === 'upgrade' && benefit.benefit_type === 'point';
});
let discountCodeBenefits = benefits.filter((benefit) => {
return benefit.trigger_type === 'upgrade' && benefit.benefit_type === 'discount_code';
});
let discountCodeName = '';
let discountCodeType = '';
if(discountCodeBenefits.length > 0) {
let benefit = discountCodeBenefits[0];
const percentageBenefits = discountCodeBenefits.filter((benefit) => {
return benefit.reward?.discount_code_activity.discount_type === 'percentage';
});
const fixedAmountBenefits = discountCodeBenefits.filter((benefit) => {
return benefit.reward?.discount_code_activity.discount_type === 'fixed_amount';
});
const buyXGetYBenefits = discountCodeBenefits.filter((benefit) => {
return benefit.reward?.discount_code_activity.discount_type === 'buy_x_get_y';
});
const freeShippingBenefits = discountCodeBenefits.filter((benefit) => {
return benefit.reward?.discount_code_activity.discount_type === 'free_shipping';
});
if (percentageBenefits.length > 0) {
benefit = percentageBenefits.reduce((accumulator, current) => {
return +accumulator.reward?.discount_code_activity.discount_value > +current.reward?.discount_code_activity.discount_value ? accumulator : current;
}, percentageBenefits[0]);
discountCodeType = 'percentage';
discountCodeName = `${benefit.reward?.discount_code_activity.discount_value}% OFF`;
} else if (fixedAmountBenefits.length > 0) {
benefit = fixedAmountBenefits.reduce((accumulator, current) => {
return +accumulator.reward?.discount_code_activity.discount_value > +current.reward?.discount_code_activity.discount_value ? accumulator : current;
}, fixedAmountBenefits[0]);
discountCodeType = 'fixed_amount';
discountCodeName = ``;
} else if (buyXGetYBenefits.length > 0) {
let buyXGetYFreeBenefits = buyXGetYBenefits.filter(benefit => benefit.reward?.discount_code_activity.obtain_product.obtain_type === 'free');
let buyXGetYPercentageBenefits = buyXGetYBenefits.filter(benefit => benefit.reward?.discount_code_activity.obtain_product.obtain_type === 'percentage');
let buyXGetYFixedAmountBenefits = buyXGetYBenefits.filter(benefit => benefit.reward?.discount_code_activity.obtain_product.obtain_type === 'fixed_amount');
if(buyXGetYFreeBenefits.length > 0) {
benefit = buyXGetYFreeBenefits[0];
if(benefit.reward?.discount_code_activity.prerequisite_type === 'subtotal') {
discountCodeName = `Buy Get ${benefit.reward?.discount_code_activity.obtain_product.product_count} Free`;
}else if (benefit.reward?.discount_code_activity.prerequisite_type === 'quantity') {
discountCodeName = `Buy ${benefit.reward?.discount_code_activity.prerequisite_value} Get ${benefit.reward?.discount_code_activity.obtain_product.product_count} Free`;
}
} else if (buyXGetYPercentageBenefits.length > 0) {
benefit = buyXGetYPercentageBenefits.reduce((accumulator, current) => {
return +accumulator.reward?.discount_code_activity.obtain_product.obtain_value > +current.reward?.discount_code_activity.obtain_product.obtain_value ? accumulator : current;
}, buyXGetYPercentageBenefits[0]);
discountCodeName = `${benefit.reward?.discount_code_activity.obtain_product.obtain_value}% OFF`;
}else if (buyXGetYFixedAmountBenefits.length > 0) {
benefit = buyXGetYFixedAmountBenefits.reduce((accumulator, current) => {
return +accumulator.reward?.discount_code_activity.obtain_product.obtain_value > +current.reward?.discount_code_activity.obtain_product.obtain_value ? accumulator : current;
}, buyXGetYFixedAmountBenefits[0]);
discountCodeName = ``;
}
discountCodeType = 'buy_x_get_y';
} else if(freeShippingBenefits.length > 0) {
discountCodeName = ``;
discountCodeType = 'free_shipping';
}
}
if (pointBenefits.length === 0 && discountCodeBenefits.length > 0) {
if(discountCodeType !== 'free_shipping') {
content = `Register to become a member and immediately receive ${discountCodeName}.`;
}else{
content = `Register to become a member and enjoy free shipping on orders`;
}
}
let benefitPointSum = 0;
if(pointBenefits.length > 0) {
benefitPointSum = pointBenefits.reduce((accumulator, benefit) => {
return Number(accumulator) + Number(benefit.reward.point_value);
}, 0);
}
if (pointBenefits.length > 0 && discountCodeBenefits.length === 0) {
content = `Register to become a member and immediately receive `;
}
if (pointBenefits.length > 0 && discountCodeBenefits.length > 0) {
if(discountCodeType !== 'free_shipping') {
content = `Register to become a member and immediately receive ${discountCodeName} and .`;
} else {
content = `Register to become a member and immediately receive free shipping on orders and .`;
}
}
if (pointBenefits.length === 0 && discountCodeBenefits.length === 0) {
const { campaigns } = data.pointPlans || {};
const pointSum = campaigns?.filter(({campaign}) => {
return campaign.event_type === 'become_member';
}).reduce((accumulator, {campaign}) => {
return accumulator + campaign.campaign_rule.reward_points;
}, 0);
if (pointSum > 0) {
content = `Register to become a member and immediately receive `;
}
}
return `
${content}
`;
}()}
${function(){
const { campaign } = data.pointsDeduction || {};
if(!campaign?.campaign_id) {
return '';
}
let content = '';
if(campaign?.max_deduction && campaign?.deduction_rate?.points) {
const points = Math.ceil(Number(campaign.max_deduction) * Number(campaign.deduction_rate.points));
content = `New members can use up to to deduct on each order`;
}else {
const { benefits = [] } = data.memberDetail?.current_tier || {};
let pointBenefits = benefits.filter((benefit) => {
return benefit.trigger_type === 'upgrade' && benefit.benefit_type === 'point';
});
let benefitPointsValue = 0;
if(pointBenefits.length > 0) {
benefitPointsValue = pointBenefits.reduce((accumulator, benefit) => {
return Number(accumulator) + Number(benefit.reward.point_value);
}, 0);
}
const { campaigns } = data.pointPlans || {};
const campaignPointsValue = campaigns?.filter(({campaign}) => {
return campaign.event_type === 'become_member';
}).reduce((accumulator, {campaign}) => {
return accumulator + campaign.campaign_rule.reward_points;
}, 0);
let currentPoints = benefitPointsValue || campaignPointsValue;
if(currentPoints > 0) {
let amount = currentPoints / Number(campaign.deduction_rate.points);
content = `New members can use points to deduct up to on their first order`;
}else {
content = ` can be offset against `;
}
}
return `
${content}
`;
}()}
${function(){
const {discount_type, discount_value, prerequisite_value, prerequisite_type, obtain_product, max_free_shipping} = data.coupon_recommendation?.activity || {};
let value = '';
let unit = '';
if (discount_type === 'fixed_amount') {
value = ``;
}
if (discount_type === 'percentage') {
value = `${parseInt(discount_value)}%`;
unit = `OFF`;
}
if (discount_type === 'free_shipping') {
if (max_free_shipping !== -1) {
value = `
FREESHIPPING`;
unit = `Up to `;
} else {
value = `FREE`;
unit = `SHIPPING`;
}
}
if (discount_type === 'buy_x_get_y') {
const x = prerequisite_value;
const y = obtain_product.product_count;
const obtain_value = obtain_product.obtain_value;
if(obtain_product.obtain_type === 'free') {
value = `FREE`;
unit = `PRODUCT`;
}
if(obtain_product.obtain_type === 'percentage') {
value = `${obtain_value}%`;
unit = `OFF`;
}
if(obtain_product.obtain_type === 'fixed_amount') {
value = ``;
}
}
return `
${value}
${unit}
`;
}()}
${function(){
const {discount_type, prerequisite_value, prerequisite_type, obtain_product} = data.coupon_recommendation?.activity || {};
if (discount_type !== 'buy_x_get_y') {
return `${data.coupon_recommendation?.campaign_name}`;
}
return '';
}()}
${function(){
const {discount_type, prerequisite_value, prerequisite_type, obtain_product} = data.coupon_recommendation?.activity || {};
if (discount_type === 'buy_x_get_y') {
const x = prerequisite_value;
const y = obtain_product.product_count;
const obtain_value = obtain_product.obtain_value;
if(obtain_product.obtain_type === 'free') {
if (prerequisite_type === 'quantity') {
return `Buy ${x} Get ${y} Free`;
} else if (prerequisite_type === 'subtotal') {
return `Buy Get ${y} Free`;
}
}
if(obtain_product.obtain_type === 'percentage') {
if (prerequisite_type === 'quantity') {
return `Buy ${x}, get ${y} at ${obtain_value}% OFF`;
} else if (prerequisite_type === 'subtotal') {
return `Buy , get ${y} at ${obtain_value}% OFF`;
}
}
if(obtain_product.obtain_type === 'fixed_amount') {
if (prerequisite_type === 'quantity') {
return `Buy ${x} get ${y} with off each`;
} else if (prerequisite_type === 'subtotal') {
return `Buy get ${y} with off each`;
}
}
}
return '';
}()}
redemption
Members only
${function(){
const {activity, discount_code} = data.coupon_recommendation || {};
const {discount_type, discount_value, prerequisite_value, prerequisite_type, obtain_product} = activity || {};
let text = '';
if(discount_type === 'percentage') {
if (prerequisite_type === 'none') {
text = `Order now to enjoy ${discount_value}% OFF. Click to copy the discount code: `;
}
if (prerequisite_type === 'quantity') {
text = `Get ${discount_value}% OFF your entire order when you purchase ${parseInt(prerequisite_value)} or more. Click to copy the discount code: `;
}
if (prerequisite_type === 'subtotal') {
text = `Spend to enjoy ${discount_value}% OFF on your entire order. Click to copy the discount code: `;
}
}else if(discount_type === 'fixed_amount') {
if (prerequisite_type === 'none') {
text = `Order now to get an instant discount of . Click to copy the discount code: `;
}
if (prerequisite_type === 'quantity') {
text = `Get an instant discount when you purchase ${parseInt(prerequisite_value)} items. Click to copy the discount code: `;
}
if (prerequisite_type === 'subtotal') {
text = `Spend to get an instant discount of . Click to copy the discount code: `;
}
} else if(discount_type === 'free_shipping') {
if (prerequisite_type === 'none') {
text = `Order now to enjoy free shipping. Click to copy the discount code: `;
}
if (prerequisite_type === 'quantity') {
text = `Free shipping on orders of ${parseInt(prerequisite_value)} items or more. Click to copy the discount code: `;
}
if (prerequisite_type === 'subtotal') {
text = `Spend to enjoy free shipping. Click to copy the discount code: `;
}
} else if(discount_type === 'buy_x_get_y') {
const x = prerequisite_value;
const y = obtain_product.product_count;
const obtain_value = obtain_product.obtain_value;
if(obtain_product.obtain_type === 'free') {
if (prerequisite_type === 'quantity') {
text = `Purchase the current product and enjoy a buy ${x} get ${y} Free offer. Click to copy the discount code: `;
} else if (prerequisite_type === 'subtotal') {
text = `Purchase the current product and enjoy a buy get ${y} Free offer. Click to copy the discount code: `;
}
}
if(obtain_product.obtain_type === 'percentage') {
if (prerequisite_type === 'quantity') {
text = `Purchase ${x} and enjoy an additional ${obtain_value}% OFF when you buy more than ${y}. Click to copy the discount code: `;
} else if (prerequisite_type === 'subtotal') {
text = `Purchase and enjoy an additional ${obtain_value}%% OFF when you buy more than ${y}. Click to copy the discount code: `;
}
}
if(obtain_product.obtain_type === 'fixed_amount') {
if (prerequisite_type === 'quantity') {
text = `Purchase ${x}, and enjoy a discount when you buy an additional ${y}. Click to copy the discount code: `;
} else if (prerequisite_type === 'subtotal') {
text = `Purchase , and enjoy a discount when you buy an additional ${y}. Click to copy the discount code: `;
}
}
}
return `
${text} ${discount_code}
`;
}()}
Members only
${function(){
const {campaign} = data.pointsDeduction || {};
const {deduction_rate, max_deduction} = campaign || {};
const {points, order_amount} = deduction_rate || {};
const {member} = data.memberDetail || {};
const {active_point_amount = 0} = member || {};
const real_amount = active_point_amount / points * order_amount;
if(max_deduction) {
return `Your available points: ( = discount on your order. A maximum of can be deducted on each order)`;
}else{
if(active_point_amount > 0) {
return `Your available points: ( = discount on your order. You can deduct up to when you place your order immediately)`;
}else {
return ` Points can be offset against `;
}
}
}()}
Members only
${function(){
const {activity, discount_code} = data.coupon_recommendation || {};
const {discount_type, discount_value, prerequisite_value, prerequisite_type, obtain_product} = activity || {};
let text = '';
if(discount_type === 'percentage') {
if (prerequisite_type === 'none') {
text = `Order now to enjoy ${discount_value}% OFF. Click to copy the discount code: `;
}
if (prerequisite_type === 'quantity') {
text = `Get ${discount_value}% OFF your entire order when you purchase ${parseInt(prerequisite_value)} or more. Click to copy the discount code: `;
}
if (prerequisite_type === 'subtotal') {
text = `Spend to enjoy ${discount_value}% OFF on your entire order. Click to copy the discount code: `;
}
}else if(discount_type === 'fixed_amount') {
if (prerequisite_type === 'none') {
text = `Order now to get an instant discount of . Click to copy the discount code: `;
}
if (prerequisite_type === 'quantity') {
text = `Get an instant discount when you purchase ${parseInt(prerequisite_value)} items. Click to copy the discount code: `;
}
if (prerequisite_type === 'subtotal') {
text = `Spend to get an instant discount of . Click to copy the discount code: `;
}
} else if(discount_type === 'free_shipping') {
if (prerequisite_type === 'none') {
text = `Order now to enjoy free shipping. Click to copy the discount code: `;
}
if (prerequisite_type === 'quantity') {
text = `Free shipping on orders of ${parseInt(prerequisite_value)} items or more. Click to copy the discount code: `;
}
if (prerequisite_type === 'subtotal') {
text = `Spend to enjoy free shipping. Click to copy the discount code: `;
}
} else if(discount_type === 'buy_x_get_y') {
const x = prerequisite_value;
const y = obtain_product.product_count;
const obtain_value = obtain_product.obtain_value;
if(obtain_product.obtain_type === 'free') {
if (prerequisite_type === 'quantity') {
text = `Purchase the current product and enjoy a buy ${x} get ${y} Free offer. Click to copy the discount code: `;
} else if (prerequisite_type === 'subtotal') {
text = `Purchase the current product and enjoy a buy get ${y} Free offer. Click to copy the discount code: `;
}
}
if(obtain_product.obtain_type === 'percentage') {
if (prerequisite_type === 'quantity') {
text = `Purchase ${x} and enjoy an additional ${obtain_value}% OFF when you buy more than ${y}. Click to copy the discount code: `;
} else if (prerequisite_type === 'subtotal') {
text = `Purchase and enjoy an additional ${obtain_value}%% OFF when you buy more than ${y}. Click to copy the discount code: `;
}
}
if(obtain_product.obtain_type === 'fixed_amount') {
if (prerequisite_type === 'quantity') {
text = `Purchase ${x}, and enjoy a discount when you buy an additional ${y}. Click to copy the discount code: `;
} else if (prerequisite_type === 'subtotal') {
text = `Purchase , and enjoy a discount when you buy an additional ${y}. Click to copy the discount code: `;
}
}
}
return `
${text} ${discount_code}
`;
}()}
${function(){
const {campaign} = data.pointsDeduction || {};
const {deduction_rate, max_deduction} = campaign || {};
const {points, order_amount} = deduction_rate || {};
const {member} = data.memberDetail || {};
const {active_point_amount = 0} = member || {};
const real_amount = active_point_amount / points * order_amount;
if(max_deduction) {
return `Your available points: ( = discount on your order. A maximum of can be deducted on each order)`;
}else{
if(active_point_amount > 0) {
return `Your available points: ( = discount on your order. You can deduct up to when you place your order immediately)`;
}else {
return ` Points can be offset against `;
}
}
}()}
${function(){
const {discount_type, discount_value, prerequisite_value, prerequisite_type, obtain_product, max_free_shipping} = data.coupon_recommendation?.activity || {};
let value = '';
let unit = '';
if (discount_type === 'fixed_amount') {
value = ``;
}
if (discount_type === 'percentage') {
value = `${parseInt(discount_value)}%`;
unit = `OFF`;
}
if (discount_type === 'free_shipping') {
if (max_free_shipping !== -1) {
value = `
FREESHIPPING`;
unit = `Up to `;
} else {
value = `FREE`;
unit = `SHIPPING`;
}
}
if (discount_type === 'buy_x_get_y') {
const x = prerequisite_value;
const y = obtain_product.product_count;
const obtain_value = obtain_product.obtain_value;
if(obtain_product.obtain_type === 'free') {
value = `FREE`;
unit = `PRODUCT`;
}
if(obtain_product.obtain_type === 'percentage') {
value = `${obtain_value}%`;
unit = `OFF`;
}
if(obtain_product.obtain_type === 'fixed_amount') {
value = ``;
}
}
return `
${value}
${unit}
`;
}()}
${function(){
const {discount_type, prerequisite_value, prerequisite_type, obtain_product} = data.coupon_recommendation?.activity || {};
if (discount_type !== 'buy_x_get_y') {
return `${data.coupon_recommendation?.campaign_name}`;
}
return '';
}()}
${function(){
const {discount_type, prerequisite_value, prerequisite_type, obtain_product} = data.coupon_recommendation?.activity || {};
if (discount_type === 'buy_x_get_y') {
const x = prerequisite_value;
const y = obtain_product.product_count;
const obtain_value = obtain_product.obtain_value;
if(obtain_product.obtain_type === 'free') {
if (prerequisite_type === 'quantity') {
return `Buy ${x} Get ${y} Free`;
} else if (prerequisite_type === 'subtotal') {
return `Buy Get ${y} Free`;
}
}
if(obtain_product.obtain_type === 'percentage') {
if (prerequisite_type === 'quantity') {
return `Buy ${x}, get ${y} at ${obtain_value}% OFF`;
} else if (prerequisite_type === 'subtotal') {
return `Buy , get ${y} at ${obtain_value}% OFF`;
}
}
if(obtain_product.obtain_type === 'fixed_amount') {
if (prerequisite_type === 'quantity') {
return `Buy ${x} get ${y} with off each`;
} else if (prerequisite_type === 'subtotal') {
return `Buy get ${y} with off each`;
}
}
}
return '';
}()}
redemption
Members only
${function(){
const {activity, discount_code} = data.coupon_recommendation || {};
const {discount_type, discount_value, prerequisite_value, prerequisite_type, obtain_product} = activity || {};
let text = '';
if(discount_type === 'percentage') {
if (prerequisite_type === 'none') {
text = `Order now to enjoy ${discount_value}% OFF. Click to copy the discount code: `;
}
if (prerequisite_type === 'quantity') {
text = `Get ${discount_value}% OFF your entire order when you purchase ${parseInt(prerequisite_value)} or more. Click to copy the discount code: `;
}
if (prerequisite_type === 'subtotal') {
text = `Spend to enjoy ${discount_value}% OFF on your entire order. Click to copy the discount code: `;
}
}else if(discount_type === 'fixed_amount') {
if (prerequisite_type === 'none') {
text = `Order now to get an instant discount of . Click to copy the discount code: `;
}
if (prerequisite_type === 'quantity') {
text = `Get an instant discount when you purchase ${parseInt(prerequisite_value)} items. Click to copy the discount code: `;
}
if (prerequisite_type === 'subtotal') {
text = `Spend to get an instant discount of . Click to copy the discount code: `;
}
} else if(discount_type === 'free_shipping') {
if (prerequisite_type === 'none') {
text = `Order now to enjoy free shipping. Click to copy the discount code: `;
}
if (prerequisite_type === 'quantity') {
text = `Free shipping on orders of ${parseInt(prerequisite_value)} items or more. Click to copy the discount code: `;
}
if (prerequisite_type === 'subtotal') {
text = `Spend to enjoy free shipping. Click to copy the discount code: `;
}
} else if(discount_type === 'buy_x_get_y') {
const x = prerequisite_value;
const y = obtain_product.product_count;
const obtain_value = obtain_product.obtain_value;
if(obtain_product.obtain_type === 'free') {
if (prerequisite_type === 'quantity') {
text = `Purchase the current product and enjoy a buy ${x} get ${y} Free offer. Click to copy the discount code: `;
} else if (prerequisite_type === 'subtotal') {
text = `Purchase the current product and enjoy a buy get ${y} Free offer. Click to copy the discount code: `;
}
}
if(obtain_product.obtain_type === 'percentage') {
if (prerequisite_type === 'quantity') {
text = `Purchase ${x} and enjoy an additional ${obtain_value}% OFF when you buy more than ${y}. Click to copy the discount code: `;
} else if (prerequisite_type === 'subtotal') {
text = `Purchase and enjoy an additional ${obtain_value}%% OFF when you buy more than ${y}. Click to copy the discount code: `;
}
}
if(obtain_product.obtain_type === 'fixed_amount') {
if (prerequisite_type === 'quantity') {
text = `Purchase ${x}, and enjoy a discount when you buy an additional ${y}. Click to copy the discount code: `;
} else if (prerequisite_type === 'subtotal') {
text = `Purchase , and enjoy a discount when you buy an additional ${y}. Click to copy the discount code: `;
}
}
}
return `
${text} ${discount_code}
`;
}()}
Members only
${function(){
const {campaign} = data.pointsDeduction || {};
const {deduction_rate, max_deduction} = campaign || {};
const {points, order_amount} = deduction_rate || {};
const {member} = data.memberDetail || {};
const {active_point_amount = 0} = member || {};
const real_amount = active_point_amount / points * order_amount;
if(max_deduction) {
return `Your available points: ( = discount on your order. A maximum of can be deducted on each order)`;
}else{
if(active_point_amount > 0) {
return `Your available points: ( = discount on your order. You can deduct up to when you place your order immediately)`;
}else {
return ` Points can be offset against `;
}
}
}()}
Members only
${function(){
const {activity, discount_code} = data.coupon_recommendation || {};
const {discount_type, discount_value, prerequisite_value, prerequisite_type, obtain_product} = activity || {};
let text = '';
if(discount_type === 'percentage') {
if (prerequisite_type === 'none') {
text = `Order now to enjoy ${discount_value}% OFF. Click to copy the discount code: `;
}
if (prerequisite_type === 'quantity') {
text = `Get ${discount_value}% OFF your entire order when you purchase ${parseInt(prerequisite_value)} or more. Click to copy the discount code: `;
}
if (prerequisite_type === 'subtotal') {
text = `Spend to enjoy ${discount_value}% OFF on your entire order. Click to copy the discount code: `;
}
}else if(discount_type === 'fixed_amount') {
if (prerequisite_type === 'none') {
text = `Order now to get an instant discount of . Click to copy the discount code: `;
}
if (prerequisite_type === 'quantity') {
text = `Get an instant discount when you purchase ${parseInt(prerequisite_value)} items. Click to copy the discount code: `;
}
if (prerequisite_type === 'subtotal') {
text = `Spend to get an instant discount of . Click to copy the discount code: `;
}
} else if(discount_type === 'free_shipping') {
if (prerequisite_type === 'none') {
text = `Order now to enjoy free shipping. Click to copy the discount code: `;
}
if (prerequisite_type === 'quantity') {
text = `Free shipping on orders of ${parseInt(prerequisite_value)} items or more. Click to copy the discount code: `;
}
if (prerequisite_type === 'subtotal') {
text = `Spend to enjoy free shipping. Click to copy the discount code: `;
}
} else if(discount_type === 'buy_x_get_y') {
const x = prerequisite_value;
const y = obtain_product.product_count;
const obtain_value = obtain_product.obtain_value;
if(obtain_product.obtain_type === 'free') {
if (prerequisite_type === 'quantity') {
text = `Purchase the current product and enjoy a buy ${x} get ${y} Free offer. Click to copy the discount code: `;
} else if (prerequisite_type === 'subtotal') {
text = `Purchase the current product and enjoy a buy get ${y} Free offer. Click to copy the discount code: `;
}
}
if(obtain_product.obtain_type === 'percentage') {
if (prerequisite_type === 'quantity') {
text = `Purchase ${x} and enjoy an additional ${obtain_value}% OFF when you buy more than ${y}. Click to copy the discount code: `;
} else if (prerequisite_type === 'subtotal') {
text = `Purchase and enjoy an additional ${obtain_value}%% OFF when you buy more than ${y}. Click to copy the discount code: `;
}
}
if(obtain_product.obtain_type === 'fixed_amount') {
if (prerequisite_type === 'quantity') {
text = `Purchase ${x}, and enjoy a discount when you buy an additional ${y}. Click to copy the discount code: `;
} else if (prerequisite_type === 'subtotal') {
text = `Purchase , and enjoy a discount when you buy an additional ${y}. Click to copy the discount code: `;
}
}
}
return `
${text} ${discount_code}
`;
}()}
${function(){
const {campaign} = data.pointsDeduction || {};
const {deduction_rate, max_deduction} = campaign || {};
const {points, order_amount} = deduction_rate || {};
const {member} = data.memberDetail || {};
const {active_point_amount = 0} = member || {};
const real_amount = active_point_amount / points * order_amount;
if(max_deduction) {
return `Your available points: ( = discount on your order. A maximum of can be deducted on each order)`;
}else{
if(active_point_amount > 0) {
return `Your available points: ( = discount on your order. You can deduct up to when you place your order immediately)`;
}else {
return ` Points can be offset against `;
}
}
}()}
Members only
Get discount code
Congratulations! You have received a discount code
Enjoy discounts when paying for your order
${function(){
const {discount_type, discount_value, prerequisite_value, prerequisite_type, obtain_product, max_free_shipping} = data.coupon_recommendation?.activity || {};
let value = '';
let unit = '';
if (discount_type === 'fixed_amount') {
value = ``;
}
if (discount_type === 'percentage') {
value = `${parseInt(discount_value)}%`;
unit = `OFF`;
}
if (discount_type === 'free_shipping') {
if (max_free_shipping !== -1) {
value = `
FREESHIPPING`;
unit = `Up to `;
} else {
value = `FREE`;
unit = `SHIPPING`;
}
}
if (discount_type === 'buy_x_get_y') {
const x = prerequisite_value;
const y = obtain_product.product_count;
const obtain_value = obtain_product.obtain_value;
if(obtain_product.obtain_type === 'free') {
value = `FREE`;
unit = `PRODUCT`;
}
if(obtain_product.obtain_type === 'percentage') {
value = `${obtain_value}%`;
unit = `OFF`;
}
if(obtain_product.obtain_type === 'fixed_amount') {
value = ``;
}
}
return `
${value}
${unit}
`;
}()}
${function(){
switch(data.status || data) {
case 'COUPON_RECEIVE_INSUFFICIENT_POINTS_ERROR': return `
Insufficient
`;
case 'SHOW_LOGIN_TIP':
case 'UNAUTHORIZED':
return `You have not yet joined as a member or logged into your account`;
case 'COUPON_RECEIVE_NOT_IN_TIME_ERROR':
case 'COUPON_NOT_FOUND_ERROR':
case 'CAMPAIGN_NOT_FOUND_ERROR': return `Points benefit does not exist. Please refresh the page`;
case 'COUPON_RECEIVE_NOT_ELIGIBLE_ERROR':
case 'COUPON_RECEIVE_UPPER_LIMIT_ERROR':
case 'COUPON_RECEIVE_FAILED_ERROR': return `redemption failed. Please refresh the page and try again.`;
case 'COUPON_RECEIVE_NO_STOCK_ERROR': return `The coupon has been redeemed!`;
case 'LOYALTY_SERVER_UNAUTHORIZED': return `Please log in to your account!`;
case 'LOYALTY_SERVER_CUSTOMER_NOT_FOUND_ERROR': return `User error detected. Please refresh the page and try again~`;
case 'INVALID_PHONE_NUMBER_ERROR': return `Please enter a valid phone`;
default: return `The network is abnormal or the system is busy, please refresh the page and try again~`;
}
}()}
${function(){
const earnCampaigns = data[0].campaigns;
const memberDetail = data[1].member;
if (!memberDetail) return '';
const closed = data[2];
const hasBirthDayPlan = earnCampaigns.find((item) => item.campaign.event_type === 'enter_birthday');
const hasPhonePlan = earnCampaigns.find((item) => item.campaign.event_type === 'enter_phone_number');
let content = null;
if (hasBirthDayPlan && hasPhonePlan && !memberDetail.birthday && !memberDetail.phone) {
content=`Complete your phone number and birthday to get . `;
} else if (hasBirthDayPlan && !memberDetail.birthday) {
content=`Fill in your birthday to get `;
} else if (hasPhonePlan && !memberDetail.phone) {
content=`Fill in your phone number to get `;
}
return (!closed && content && memberDetail) ? `
${function(){
let title = data.campaign.name;
if (data.campaign.event_type === 'share_link') {
let limit_reward_count = Number(data.campaign.campaign_rule.limit_reward_count);
let participation_times = Number(data.participation_info.participation_times);
if (limit_reward_count > 1) {
title = `${title} (${limit_reward_count - participation_times}/${limit_reward_count})`;
}
}
return title;
}()}
${function(){
if (data.campaign.event_type === 'successful_order') {
return `
${function(){
const formatTimeStr = (execution_schedule) => {
const { type, effective_started_at, effective_ended_at, months, days } = execution_schedule;
if (type === 'time_range' && !(effective_started_at && effective_ended_at)) {
return 'Valid for long term';
}
if (type === 'time_range' && effective_started_at && effective_ended_at) {
return `
-
`
}
if (type === 'weekly') {
const time = days.map((d) => {
switch(d) {
case "1": return "Monday";
case "2": return "Tuesday";
case "3": return "Wednesday";
case "4": return "Thursday";
case "5": return "Friday";
case "6": return "Saturday";
case "0": return "Sunday";
}
});
return `Effective ${time} (Weekly)`;
}
if (type === 'monthly') {
const isFullMonth = months.length === 12;
const monthStr = months.map((value) => {
switch(value) {
case "1": return "January";
case "2": return "February";
case "3": return "March";
case "4": return "April";
case "5": return "May";
case "6": return "June";
case "7": return "July";
case "8": return "August";
case "9": return "September";
case "10": return "October";
case "11": return "November";
case "12": return "December";
}
}).join(' ');
const dayStr = days.map((value) => {
switch(value) {
case "1": return "1st";
case "2": return "2nd";
case "3": return "3rd";
case "4": return "4th";
case "5": return "5th";
case "6": return "6th";
case "7": return "7th";
case "8": return "8th";
case "9": return "9th";
case "10": return "10th";
case "11": return "11th";
case "12": return "12th";
case "13": return "13th";
case "14": return "14th";
case "15": return "15th";
case "16": return "16th";
case "17": return "17th";
case "18": return "18th";
case "19": return "19th";
case "20": return "20th";
case "21": return "21st";
case "22": return "22nd";
case "23": return "23rd";
case "24": return "24th";
case "25": return "25th";
case "26": return "26th";
case "27": return "27th";
case "28": return "28th";
case "29": return "29th";
case "30": return "30th";
case "31": return "31st";
}
}).join(' ');
if (isFullMonth) return `Effective ${dayStr} (Monthly)`; // 每月
return `Effective ${dayStr} (Valid only in ${monthStr})`;
}
};
return formatTimeStr(data.campaign.execution_schedule);
}()}
${function(){
if (data.campaign.campaign_rule.order_condition?.min_order_paid === "0") {
return `Order payment of any amount`
} else {
return `Order payment amount ()`
}
}()}
Purchase any item with order amount
The order contains:
Available :
${function(){
return new Intl.NumberFormat().format(data.point.active_amount)
}()}
Frozen :
${function(){
return new Intl.NumberFormat().format(data.point.frozen_amount)
}()}
${function(){
let date = 'Never expires';
if (data.expired_at) {
date = ``;
}
return `Valid until: ${date}`;
}()}
${function(){
const order_id = data.data.order_number || data.data.order_id || '';
const platformMap = {
'facebook': 'Facebook',
'x': 'X (Twitter)',
'pinterest': 'Pinterest'
};
const share_platform = platformMap[data.data.share_platform] || '';
switch(data.resource_type) {
case 'become_member': return `Bonus for joining the club.`;
case 'enter_phone_number': return `Bonus for completing mobile phone filling`;
case 'enter_birthday': return `Bonus for completing birthday filling`;
case 'successful_order': return `Bonus for completing payment of order ${order_id}`;
case 'order_returned': return `Deduction of for refund of order ${order_id} `;
case 'discount_code_received': return `Deduction of for redeeming ${data.data.campaign_name} benefit`;
case 'coupon_received': return `Deduction of for redeeming ${data.data.coupon_title} coupon`;
case 'expired': return `Expired`;
case 'upgrade_benefit': return `Bonus for member benefits`;
case 'periodic_benefit': return `Bonus for member benefits`;
case 'birthday_benefit': return `Bonus for birthday benefits`;
case 'import_member_points': return `Manual adjustment of points`;
case 'deduction': return `Redeem for off order ${order_id}`;
case 'deduction_returned': return `Refund for order ${order_id}`;
case 'member_migrate': return `System upgrade updates balance`;
case 'share_link': return `Share ${share_platform} reward `;
default: '';
}
}()}
${function(){
const {discount_type, obtain_product} = coupon.campaign.reward.discount_code_activity || {};
let value = '';
let unit = '';
if (discount_type === 'fixed_amount' || obtain_product?.obtain_type === 'fixed_amount') {
return `
`;
}
if (discount_type === 'percentage' || obtain_product?.obtain_type === 'percentage') {
return `
`;
}
if (discount_type === 'buy_x_get_y' && obtain_product?.obtain_type === 'free') {
return `
`;
}
if (discount_type === 'free_shipping') {
return `
`;
}
}()}
${function(){
const {discount_type, prerequisite_value, prerequisite_type, obtain_product} = coupon.campaign.reward.discount_code_activity || {};
if (discount_type !== 'buy_x_get_y') {
return `${coupon.campaign.name}`;
}
return '';
}()}
${function(){
const {discount_type, prerequisite_value, prerequisite_type, obtain_product} = coupon.campaign.reward.discount_code_activity || {};
if (discount_type === 'buy_x_get_y') {
const x = prerequisite_value;
const y = obtain_product.product_count;
const obtain_value = obtain_product.obtain_value;
if(obtain_product.obtain_type === 'free') {
if (prerequisite_type === 'quantity') {
return `Buy ${x} Get ${y} Free`;
} else if (prerequisite_type === 'subtotal') {
return `Buy Get ${y} Free`;
}
}
if(obtain_product.obtain_type === 'percentage') {
if (prerequisite_type === 'quantity') {
return `Buy ${x}, get ${y} at ${obtain_value}% OFF`;
} else if (prerequisite_type === 'subtotal') {
return `Buy , get ${y} at ${obtain_value}% OFF`;
}
}
if(obtain_product.obtain_type === 'fixed_amount') {
if (prerequisite_type === 'quantity') {
return `Buy ${x} get ${y} with off each`;
} else if (prerequisite_type === 'subtotal') {
return `Buy get ${y} with off each`;
}
}
}
return '';
}()}
`;
}()}
Get discount code
${function(){
const {discount_type, discount_value, prerequisite_value, prerequisite_type, obtain_product, max_free_shipping} = data[0].campaign?.reward.discount_code_activity || {};
let value = '';
let unit = '';
if (discount_type === 'fixed_amount') {
value = ``;
}
if (discount_type === 'percentage') {
value = `${parseInt(discount_value)}%`;
unit = `OFF`;
}
if (discount_type === 'free_shipping') {
if (max_free_shipping !== -1) {
value = `
FREESHIPPING`;
unit = `Up to `;
} else {
value = `FREE`;
unit = `SHIPPING`;
}
}
if (discount_type === 'buy_x_get_y') {
const x = prerequisite_value;
const y = obtain_product.product_count;
const obtain_value = obtain_product.obtain_value;
if(obtain_product.obtain_type === 'free') {
value = `FREE`;
unit = `PRODUCT`;
}
if(obtain_product.obtain_type === 'percentage') {
value = `${obtain_value}%`;
unit = `OFF`;
}
if(obtain_product.obtain_type === 'fixed_amount') {
value = ``;
}
}
return `
${value}
${unit}
`;
}()}
${data[0].campaign?.name}
${function(){
const { prerequisite_type, prerequisite_value } = data[0].campaign?.reward.discount_code_activity || {};
if (prerequisite_type === 'none') {
return `No threshold`;
}
if (prerequisite_type === 'quantity') {
return `The order is available when it contains at least ${parseInt(prerequisite_value)} items`;
}
if (prerequisite_type === 'subtotal') {
return `Available when the order amount exceeds `;
}
}()}
It will cost to redeem the coupon. Are you sure you want to redeem it?
Get discount code
Congratulations! You have received a discount code
Available when paying for an order
${function(){
const {discount_type, discount_value, prerequisite_value, prerequisite_type, obtain_product, max_free_shipping} = data[0].campaign?.reward.discount_code_activity || {};
let value = '';
let unit = '';
if (discount_type === 'fixed_amount') {
value = ``;
}
if (discount_type === 'percentage') {
value = `${parseInt(discount_value)}%`;
unit = `OFF`;
}
if (discount_type === 'free_shipping') {
if (max_free_shipping !== -1) {
value = `
FREESHIPPING`;
unit = `Up to `;
} else {
value = `FREE`;
unit = `SHIPPING`;
}
}
if (discount_type === 'buy_x_get_y') {
const x = prerequisite_value;
const y = obtain_product.product_count;
const obtain_value = obtain_product.obtain_value;
if(obtain_product.obtain_type === 'free') {
value = `FREE`;
unit = `PRODUCT`;
}
if(obtain_product.obtain_type === 'percentage') {
value = `${obtain_value}%`;
unit = `OFF`;
}
if(obtain_product.obtain_type === 'fixed_amount') {
value = ``;
}
}
return `
${value}
${unit}
`;
}()}
Discount
${function(){
const { discount_code_activity } = data[0].campaign?.reward || data[0].benefit?.reward || {};
const { discount_type, obtain_product, discount_value } = discount_code_activity;
if (discount_type === 'fixed_amount') {
return `
`
}
if (discount_type === 'percentage') {
return `
${parseInt(discount_value)}% OFF
`
}
if (discount_type === 'free_shipping') {
return `
FREE SHIPPING
`
}
return '';
}()}
${function(){
const {discount_type, prerequisite_value, prerequisite_type, obtain_product} = data[0].campaign?.reward.discount_code_activity || data[0].benefit?.reward.discount_code_activity || {};
if (discount_type === 'buy_x_get_y') {
const x = prerequisite_value;
const y = obtain_product.product_count;
const obtain_value = obtain_product.obtain_value;
if(obtain_product.obtain_type === 'free') {
if (prerequisite_type === 'quantity') {
return `Buy ${x} Get ${y} Free`;
} else if (prerequisite_type === 'subtotal') {
return `Buy Get ${y} Free`;
}
}
if(obtain_product.obtain_type === 'percentage') {
if (prerequisite_type === 'quantity') {
return `Buy ${x}, get ${y} at ${obtain_value}% OFF`;
} else if (prerequisite_type === 'subtotal') {
return `Buy , get ${y} at ${obtain_value}% OFF`;
}
}
if(obtain_product.obtain_type === 'fixed_amount') {
if (prerequisite_type === 'quantity') {
return `Buy ${x} get ${y} with off each`;
} else if (prerequisite_type === 'subtotal') {
return `Buy get ${y} with off each`;
}
}
}
return '';
}()}
${function(){
const { prerequisite_type, prerequisite_value, discount_type, obtain_product } = data[0].campaign?.reward.discount_code_activity || data[0].benefit?.reward.discount_code_activity || {};
if (discount_type === 'buy_x_get_y') {
let x_content = '';
let y_content = '';
const x = prerequisite_value;
const {obtain_value, obtain_type} = obtain_product;
if (prerequisite_type === 'quantity') {
x_content = `Purchase the following items for a total of ${x} items`;
} else if (prerequisite_type === 'subtotal') {
x_content = `Purchase the following items for a total of `;
}
if (obtain_type === 'free') {
y_content = `Get for free`;
} else if (obtain_type === 'percentage') {
y_content = `${obtain_value}% OFF on the purchase of the following items`;
} else if (obtain_type === 'fixed_amount') {
y_content = `The following items are discounted by each`;
}
return `
`;
}
if (prerequisite_type === 'none') {
return `No threshold`;
}
if (prerequisite_type === 'quantity') {
return `The order is available when it contains at least ${parseInt(prerequisite_value)} items`;
}
if (prerequisite_type === 'subtotal') {
return `Available when the order amount exceeds `;
}
}()}
${function(){
const {obtain_type, obtain_value, prerequisite_type, prerequisite_value} = data;
if (prerequisite_type === 'quantity') {
return `Purchase the following items for a total of ${prerequisite_value} items`;
} else if (prerequisite_type === 'subtotal') {
return `Purchase the following items for a total of `;
}
if (obtain_type === 'free') {
return `Get for free`;
} else if (obtain_type === 'percentage') {
return `${obtain_value}% OFF on the purchase of the following items`;
} else if (obtain_type === 'fixed_amount') {
return `The following items are discounted by each`;
}
return `Products participating in the points activity`;
}()}
The minimum discount unit is cents, and the calculated points are rounded up.
Points Refund Policy for Returns:
Full refund: All points returned.
Partial refund: Points refunded proportionally.
Order-only refund: No points refunded.
Points will not be refunded upon return.Selected points are frozen upon order creation and released upon cancellation
Loading...
${function(){
switch(data.status || data) {
case 'COUPON_RECEIVE_INSUFFICIENT_POINTS_ERROR': return `
Insufficient
`;
case 'SHOW_LOGIN_TIP':
case 'UNAUTHORIZED':
return `You have not yet joined as a member or logged into your account`;
case 'COUPON_RECEIVE_NOT_IN_TIME_ERROR':
case 'COUPON_NOT_FOUND_ERROR':
case 'CAMPAIGN_NOT_FOUND_ERROR': return `Points benefit does not exist. Please refresh the page`;
case 'COUPON_RECEIVE_NOT_ELIGIBLE_ERROR':
case 'COUPON_RECEIVE_UPPER_LIMIT_ERROR':
case 'COUPON_RECEIVE_FAILED_ERROR': return `redemption failed. Please refresh the page and try again.`;
case 'COUPON_RECEIVE_NO_STOCK_ERROR': return `The coupon has been redeemed!`;
case 'LOYALTY_SERVER_UNAUTHORIZED': return `Please log in to your account!`;
case 'LOYALTY_SERVER_CUSTOMER_NOT_FOUND_ERROR': return `User error detected. Please refresh the page and try again~`;
case 'INVALID_PHONE_NUMBER_ERROR': return `Please enter a valid phone`;
default: return `The network is abnormal or the system is busy, please refresh the page and try again~`;
}
}()}