addSpecialOffer
addSpecialOffer(specialOffer: SpecialOffer)
Parameters
Name | Type | Description |
---|---|---|
specialOffer | SpecialOffer | Parameters of the added special offer |
Description
Function adds a single special offer.
Example
NetDecor.v3.shop.addSpecialOffer(
{
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
}
]
}
)