Impressions rétro
Imprimez vos photos avec un style rétro! Amusant et une excellente option pour partager.
Ens de 6
3
4
2023
10
4
2023
40
Ens de 12
3
4
2023
10
4
2023
40
Ens de 18
3
4
2022
10
4
2023
40
This is some text inside of a div block.
This is some text inside of a div block.
Prix:
0.00
0.00
Prix:
0.00
// Set default size
$(document).ready(function(){
setTimeout(function(){
$('#3711383')[0].click();
}, 500);
});
// When a size is clicked
$(".size-button").click(function() {
var price = $(this).attr("data-price");
$("#repodata").attr("data-price", price);
var priceInt = parseInt($(this).attr("data-price"));
var priceTxt = String(price);
var priceFixed = (priceTxt + "$");
var imageLink = $(this).attr("data-image-link");
var link = $(this).attr("data-link");
$("#repodata").attr("data-link", link);
var fullName = $(this).attr("data-full-name");
var fullNameEn = $(this).attr("data-full-name-en");
// Set local rebate variables
var rebateVar = $(this).attr("data-special-price");
var rebateVarString = String(rebateVar);
var rebateVarInt = parseInt(rebateVar);
var rebateTxt = (rebateVarString + "% de rabais");
var startFlag = $(this).attr("data-rebate-start-flag");
var rebateEnd = $(this).attr("data-special-end-text");
var endFlag = $(this).attr("data-rebate-end-flag");
var indiRebate = (priceInt - ((rebateVarInt/100)*priceInt));
var rebateFixed = (indiRebate.toFixed(2) + "$");
// Set global rebate variables
var globalEndFlag = $("#repodata").attr("data-global-end-flag");
var globalStartFlag = $("#repodata").attr("data-global-start-flag");
var globalRebateVar = $("#repodata").attr("data-global-rebate");
var globalRebateVarString = String(globalRebateVar);
var globalRebateVarInt = parseInt(globalRebateVar);
var globalRebateTxt = (globalRebateVarString + "% de rabais");
var globalRebate = (priceInt - ((globalRebateVarInt/100)*priceInt));
var globalRebateFixed = (globalRebate.toFixed(2) + "$");
var globalRebateEnd = $("#repodata").attr("data-global-end");
// Check which rebate will apply
if (globalEndFlag == "on" && globalStartFlag == "on") {
$("#regPriceDiv").hide();
$("#rebateDiv").show();
$("#rebPrice").text(priceFixed);
$("#priceRebate").text(globalRebateFixed);
$("#rebateAmount").text(globalRebateTxt);
$("#rebateDate").text(globalRebateEnd);
$("#repodata").attr("data-rebate-flag", "on");
$("#repodata").attr("data-rebate-percentage", globalRebateVar);
}
else if (endFlag == "on" && startFlag == "on") {
$("#regPriceDiv").hide();
$("#rebateDiv").show();
$("#rebPrice").text(priceFixed);
$("#priceRebate").text(rebateFixed);
$("#rebateAmount").text(rebateTxt);
$("#rebateDate").text(rebateEnd);
$("#repodata").attr("data-rebate-flag", "on");
$("#repodata").attr("data-rebate-percentage", rebateVar);
}
else {
$("#rebateDiv").hide();
$("#regPriceDiv").show();
$("#price").text(priceFixed);
$("#repodata").attr("data-rebate-flag", "off");
$("#repodata").attr("data-rebate-percentage", "");
}
// Set HTML changes on the page
var format = $(this).attr("data-name");
$(".size-button").css("border", "none");
$(this).css("border", "1px solid #000");
$("#orderbutton").css("display", "block");
$("#priceColumn").css("display", "inline-block");
$("#sizechosen").html(": " + fullName);
});
// Set final link grabbing info from repo
$("#orderbutton").click(function() {
var key = '<%= cart.sessionId %>';
var link = "https://codex.mydakis.com/#/load/fr/42a36c20-df04-012b-f3ea-00163e08a1c2/";
var productLink = $("#repodata").attr("data-link");
var domain = "/https%3A%2F%2Fimpression.gosselinphoto.ca%2F/page.html/0000/ignored/true?cartPage=cart&qty=1"
var finalUrl = (link + productLink + "/" + key + domain);
$("#orderbutton").attr("href", finalUrl);
});
<% console.log(cart) %>
3
4
2023
10
4
2023
40