In Cosmetics Global, Paris, France
Ready for in-cosmetics Global? We are definitely! Our Personal Care team is happy to meet you on 5-7 April 2022 at booth M30. Discover our newly created Simplience concept – the science of simplicity – and get inspired by our innovative and sustainable ingredients. The smart way of formulating nice and luxurious cosmetics.
0) {
$(".ason-roll").height(divHeight - interval);
$(".ason-roll").css("overflow-y", "scroll");
}
}else {
if($(".js-logout").length!=0){
alert("Try again later!");
}
else{
window.location.href = "/login";
}
}
},
})
var productName = $("#pimProductNamePopup").val();
var productCode = $("#productCodePopup").val();
dataLayer.push({
'event': 'GA-event',
'eventDetail': {
'category': 'Sample',
'action': 'Click sample request on product detail page',
'label': 'Sample - Click sample request on product detail page'
},
'activity': {
'actionField': {
'step': 1
},
'product': {
'code': productCode,
'name': productName
}
},
'userId': '',
'country': '',
'userName': 'Anonymous'
});
}
function submitplpForm(obj) {
var productCode = $.trim($("#productCodePopup").val());
var sampleSize = $.trim($("#plpsampleSize").val());
console.log("productCode : " +productCode + " - "+ sampleSize);
var note = $.trim($("#description").val());
var url="/vi/send/order/sample";
var targetUrl="/vi/sample/samplesuccess/";
console.log("validplpFormParam : " + validplpFormParam(sampleSize,note));
if(validplpFormParam(sampleSize,note)){
$('#cover-spin').show();
$(obj).css("pointer-events","none");
$.ajax({
url: url,
type:"POST",
data: {"productCode": productCode,"sampleSize":sampleSize,"note":note},
success:function(data) {
console.log(data)
if(data !="fail"){
// document.getElementById('popup').style.display='none';
// document.getElementById('success').style.display='block';
$('#plpsampleSize').val("");
$('#description').val("");
$(".sample-request").addClass("undis")
$(obj).css("pointer-events","");
window.location.href=targetUrl+data;
$('#cover-spin').hide();
}else{
console.log("error");
$('#cover-spin').hide();
}
}
})
}
var productName = $("#pimProductNamePopup").val();
dataLayer.push({
'event': 'GA-event',
'eventDetail': {
'category': 'Sample',
'action': 'Submit sample request',
'label': 'Sample - Submit sample request'
},
'activity': {
'actionField': {
'step': 2
},
'product': {
'code': productCode,
'name': productName
}
},
'userId': '',
'country': '',
'userName': 'Anonymous'
});
}
// var btn = document.getElementById("close");
// btn.onclick = function(){
// document.getElementById('popup').style.display='none';
//
// $('#cboxOverlay').hide().css('opacity','0');
//
// }
var success = document.getElementById("closeSuccess");
success.onclick = function(){
document.getElementById('success').style.display='none';
$('#cboxOverlay').hide().css('opacity','0');
}
function validplpFormParam(sampleSize,note) {
var thiz = this;
var flag = true;
if (!thiz.check(sampleSize, "empty")) {
$('#plpsampleSize').addClass('sample-error-input');
flag = false;
} else if (!thiz.check(note, "empty")) {
$('#description').addClass('sample-error-input');
$('#plpsampleSize').removeClass('sample-error-input');
flag = false;
}
if(flag){
$('#plpsampleSize').removeClass('sample-error-input');
$('#description').removeClass('sample-error-input');
}
return flag;
};
function check(value, type) {
var thiz = this;
if (type == "empty") {
if (thiz.isNull(value)) {
return false;
} else {
return true;
}
}
return true;
};
function isNull(str) {
if (str == null || str == "" || str == undefined) {
return true;
} else {
return false;
}
};
function closeSampleRequestPopup(){
$(".plp-sample-request").addClass("undis");
var productName = $("#pimProductNamePopup").val();
var productCode = $("#productCodePopup").val();
dataLayer.push({
'event': 'GA-event',
'eventDetail': {
'category': 'Sample',
'action': 'Close sample request',
'label': 'Sample - Close sample request'
},
'activity': {
'actionField': {
'step': 2
},
'product': {
'code': productCode,
'name': productName
}
},
'userId': '',
'country': '',
'userName': 'Anonymous'
});
}