php voting script
Budget: $30 – $250 USD
we need a script that will allow customers to vote for discontinued products
They will be prompted to enter their email address
if entered their votes will be recorded with the email in klaviyo
eg.
function set_vote(design,type,email) {
//alert(day +'/'+month+'/'+year);
console.log('design is ' + design);
_learnq.push(['identify', {
'$email': email
}]);
var design_property = {};
var design_property_name = 'design_' + design;
design_property[design_property_name] = type;
_learnq.push(['identify', design_property]);
build_vote_cookie(design,type,email);
}
but we will also anonymously record votes in a DB regardless.
will need some checking to avoid duplicate votes where possible
They will be prompted to enter their email address
if entered their votes will be recorded with the email in klaviyo
eg.
function set_vote(design,type,email) {
//alert(day +'/'+month+'/'+year);
console.log('design is ' + design);
_learnq.push(['identify', {
'$email': email
}]);
var design_property = {};
var design_property_name = 'design_' + design;
design_property[design_property_name] = type;
_learnq.push(['identify', design_property]);
build_vote_cookie(design,type,email);
}
but we will also anonymously record votes in a DB regardless.
will need some checking to avoid duplicate votes where possible