setSpecialOffers
setSpecialOffers(specialOffers: SpecialOffer[])
Parameters
Name | Type | Description |
---|---|---|
specialOffer | SpecialOffer | Parameters of the added special offer |
Description
Function adds a list of single special offers to the special offer list and removes previously added offers.
Example
NetDecor.v3.shop.setSpecialOffers(
[
{
id: "Collection name",
description: {
pl: "Promocja na kolekcję netDecor - 30% zniżki",
en: "Promotion on netDecor collection - 30% discount",
de: "Aktion auf der netDecor-Kollektion - 30% Rabatt",
hu: "netDecor kollekció akció - 30% kedvezmény",
cs: "",
sk: "",
ru: "",
ua: ""
},
imageUrl: {
pl: "https://netdecor.cadprojekt.com.pl/logo_promocji.png",//image size 48x48 px
en: "https://netdecor.cadprojekt.com.pl/logo_promocji.png",
de: "https://netdecor.cadprojekt.com.pl/logo_promocji.png",
hu: "https://netdecor.cadprojekt.com.pl/logo_promocji.png",
cs: "https://netdecor.cadprojekt.com.pl/logo_promocji.png",
sk: "https://netdecor.cadprojekt.com.pl/logo_promocji.png",
ru: "https://netdecor.cadprojekt.com.pl/logo_promocji.png",
ua: "https://netdecor.cadprojekt.com.pl/logo_promocji.png",
},
dateBegin: "2023-01-01",//"rrrr-mm-dd"
dateEnd: "2028-12-31",
minCountLocal: 0, //The minimum quantity of products (in this special offer) required to activate the promotion.
minValueLocal: 500.0, //The minimum value of products and subProducts (in this special offer) required to activate the promotion.
minCountGlobal: 2, //The minimum quantity of products (in all special offers) required to activate the promotion.
minValueGlobal: 1000.0, //The minimum value of products and subProducts (in all special offers) required to activate the promotion.
discountFactor: 0.7, //30%
products: [ //The cabinet components that appear in only one special offer, e.g., fronts.
{
id: "100146548",
reducedPrice: 9.99,
last30DaysMinPrice: 11.99
},
{
id: "100146554",
reducedPrice: 14.99,
last30DaysMinPrice: 17.99
},
],
subProducts: [ //The cabinet components that appear in multiple special offers, e.g., cabinets.
{
id: "100147866",
reducedPrice: null,
last30DaysMinPrice: null
},
{
id: "100159974",
reducedPrice: null,
last30DaysMinPrice: null
}
]
},
{
id: "Collection name 2",
description: {
pl: "Promocja na kolekcję netDecor2 - 20% zniżki",
en: "Promotion on netDecor2 collection - 20% discount",
de: "Aktion auf der netDecor2-Kollektion - 20% Rabatt",
hu: "netDecor2 kollekció akció - 20% kedvezmény",
cs: "",
sk: "",
ru: "",
ua: ""
},
imageUrl: {
pl: "https://netdecor.cadprojekt.com.pl/logo_promocji2.png",//image size 48x48 px
en: "https://netdecor.cadprojekt.com.pl/logo_promocji2.png",
de: "https://netdecor.cadprojekt.com.pl/logo_promocji2.png",
hu: "https://netdecor.cadprojekt.com.pl/logo_promocji2.png",
cs: "https://netdecor.cadprojekt.com.pl/logo_promocji2.png",
sk: "https://netdecor.cadprojekt.com.pl/logo_promocji2.png",
ru: "https://netdecor.cadprojekt.com.pl/logo_promocji2.png",
ua: "https://netdecor.cadprojekt.com.pl/logo_promocji2.png",
},
dateBegin: "2023-01-01",//"rrrr-mm-dd"
dateEnd: "2028-12-31",
minCountLocal: 0, //The minimum quantity of products (in this special offer) required to activate the promotion.
minValueLocal: 500.0, //The minimum value of products and subProducts (in this special offer) required to activate the promotion.
minCountGlobal: 2, //The minimum quantity of products (in all special offers) required to activate the promotion.
minValueGlobal: 1000.0, //The minimum value of products and subProducts (in all special offers) required to activate the promotion.
discountFactor: 0.8, //20%
products: [ //The cabinet components that appear in only one special offer, e.g., fronts.
{
id: "200146548",
},
{
id: "200146554",
},
]
}
]
)