third voucher
parent
dcddfd9b24
commit
24f0ee76c3
|
@ -8,25 +8,31 @@
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="../../groupsData/shx-order-voucher-codes/backPage.css"
|
href="../../groupsData/shx-order-voucher-codes/backPage.css"
|
||||||
/>
|
/>
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
||||||
<link
|
|
||||||
href="https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap"
|
|
||||||
rel="stylesheet"
|
|
||||||
/>
|
|
||||||
<style>
|
<style>
|
||||||
body {
|
|
||||||
font-family: "Outfit";
|
|
||||||
}
|
|
||||||
|
|
||||||
@page {
|
@page {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
size: A5 landscape;
|
size: 210mm 148mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Outfit";
|
||||||
|
src: url("../../groupsData/static/Outfit-VariableFont_wght.ttf");
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
font-family: "Outfit";
|
||||||
|
transform: scale(1);
|
||||||
|
transform-origin: 0 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<div style="height: 100vh; width: 100vw">
|
||||||
<div
|
<div
|
||||||
style="
|
style="
|
||||||
background-image: url(../../groupsData/shx-order-voucher-codes/backPageLogo.svg);
|
background-image: url(../../groupsData/shx-order-voucher-codes/backPageLogo.svg);
|
||||||
|
@ -34,13 +40,17 @@
|
||||||
background-size: 800px;
|
background-size: 800px;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
|
padding-top: 9px;
|
||||||
"
|
"
|
||||||
></div>
|
></div>
|
||||||
|
|
||||||
<div style="display: flex; justify-content: center; padding-top: 60px">
|
<div style="display: flex; justify-content: center">
|
||||||
<div style="display: flex">
|
<div style="display: flex; transform: scale(0.8)">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="container-background first-item"></div>
|
<img
|
||||||
|
class="container-background"
|
||||||
|
src="../../groupsData/shx-order-voucher-codes/background.svg"
|
||||||
|
/>
|
||||||
|
|
||||||
<div class="container-header">
|
<div class="container-header">
|
||||||
<p><span class="percentage">10 %</span> auf Alles</p>
|
<p><span class="percentage">10 %</span> auf Alles</p>
|
||||||
|
@ -77,7 +87,10 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="container-background second-item"></div>
|
<img
|
||||||
|
class="container-background"
|
||||||
|
src="../../groupsData/shx-order-voucher-codes/background.svg"
|
||||||
|
/>
|
||||||
|
|
||||||
<div class="container-header">
|
<div class="container-header">
|
||||||
<p><span class="percentage">5 €</span> auf Alles</p>
|
<p><span class="percentage">5 €</span> auf Alles</p>
|
||||||
|
@ -118,8 +131,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container" style="display: SHOW_THIRD_VOUCHER">
|
||||||
<div class="container-background third-item"></div>
|
<img
|
||||||
|
class="container-background"
|
||||||
|
src="../../groupsData/shx-order-voucher-codes/background.svg"
|
||||||
|
/>
|
||||||
|
|
||||||
<div class="container-header">
|
<div class="container-header">
|
||||||
<p><span class="percentage">10 €</span> auf Alles</p>
|
<p><span class="percentage">10 €</span> auf Alles</p>
|
||||||
|
@ -169,11 +185,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="padding-top: 80px; padding-left: 40px">
|
<div style="padding-top: 40px; padding-left: 40px">
|
||||||
<span style="font-size: 10px; color: #666666"
|
<span style="font-size: 10px; color: #666666"
|
||||||
>*Die Angaben basieren jediglich auf Schätzungen. Die Verifizierung kann
|
>*Die Angaben basieren jediglich auf Schätzungen. Die Verifizierung
|
||||||
bis zu 72 Stunden dauern, bis der Gutschein freigeschaltet wird.</span
|
kann bis zu 72 Stunden dauern, bis der Gutschein freigeschaltet
|
||||||
|
wird.</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -4,21 +4,23 @@
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Document</title>
|
<title>Document</title>
|
||||||
<link
|
|
||||||
href="https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap"
|
|
||||||
rel="stylesheet"
|
|
||||||
/>
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
font-family: "Outfit";
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
<style>
|
||||||
@page {
|
@page {
|
||||||
margin: 0 50px 0 50px;
|
margin: 0 50px 0 50px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
size: A5 landscape;
|
size: A5 landscape;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Outfit";
|
||||||
|
src: url("../../groupsData/static/Outfit-VariableFont_wght.ttf");
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: "Outfit";
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body style="height: 550px; position: relative">
|
<body style="height: 550px; position: relative">
|
||||||
|
|
|
@ -64,6 +64,20 @@ def CreateCrmCustomer():
|
||||||
return response.json()["Id"]
|
return response.json()["Id"]
|
||||||
|
|
||||||
|
|
||||||
|
def show_third_voucher(show):
|
||||||
|
with open("backPage.html", "r") as file:
|
||||||
|
html = file.read()
|
||||||
|
|
||||||
|
if show:
|
||||||
|
print("Showing third voucher")
|
||||||
|
html = html.replace("SHOW_THIRD_VOUCHER", "block")
|
||||||
|
else:
|
||||||
|
print("Not showing third voucher")
|
||||||
|
html = html.replace("SHOW_THIRD_VOUCHER", "none")
|
||||||
|
|
||||||
|
with open("backPage.html", "w") as file:
|
||||||
|
file.write(html)
|
||||||
|
|
||||||
def CheckIfCrmCustomerExists():
|
def CheckIfCrmCustomerExists():
|
||||||
print(f"Checking if customer exists: {customerEmail}")
|
print(f"Checking if customer exists: {customerEmail}")
|
||||||
|
|
||||||
|
@ -80,10 +94,14 @@ def CheckIfCrmCustomerExists():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
customerId = ""
|
customerId = ""
|
||||||
|
# only on first purchase we show the third voucher
|
||||||
|
thirdVoucher = False
|
||||||
|
|
||||||
if response.json() == []:
|
if response.json() == []:
|
||||||
print("Customer not found")
|
print("Customer not found")
|
||||||
customerId = CreateCrmCustomer()
|
customerId = CreateCrmCustomer()
|
||||||
|
|
||||||
|
thirdVoucher = True
|
||||||
else:
|
else:
|
||||||
if len(response.json()) > 1:
|
if len(response.json()) > 1:
|
||||||
print("Multiple customers found. Don't know which one to use")
|
print("Multiple customers found. Don't know which one to use")
|
||||||
|
@ -91,11 +109,12 @@ def CheckIfCrmCustomerExists():
|
||||||
|
|
||||||
customerId = response.json()[0]["Id"]
|
customerId = response.json()[0]["Id"]
|
||||||
|
|
||||||
CreateCrmActivityLink(customerId=customerId)
|
show_third_voucher(thirdVoucher)
|
||||||
|
CreateCrmActivityLink(customerId=customerId, thirdVoucher=thirdVoucher)
|
||||||
GetCustomerActivityLinks(customerId=customerId)
|
GetCustomerActivityLinks(customerId=customerId)
|
||||||
|
|
||||||
|
|
||||||
def CreateCrmActivityLink(customerId):
|
def CreateCrmActivityLink(customerId, thirdVoucher):
|
||||||
print(f"Creating CRM activity link for customer {customerId}")
|
print(f"Creating CRM activity link for customer {customerId}")
|
||||||
|
|
||||||
def req(type, url):
|
def req(type, url):
|
||||||
|
@ -118,6 +137,8 @@ def CreateCrmActivityLink(customerId):
|
||||||
|
|
||||||
req("10 % Gutschein", f"https://shinnex.de/discount/{discountCode}{utm}")
|
req("10 % Gutschein", f"https://shinnex.de/discount/{discountCode}{utm}")
|
||||||
req("5 € Gutschein", f"{productUrl}{utm}")
|
req("5 € Gutschein", f"{productUrl}{utm}")
|
||||||
|
|
||||||
|
if thirdVoucher:
|
||||||
req("10 € Gutschein", f"https://docs.google.com/forms/d/e/1FAIpQLSd2GXFbidzazuQnh_Lf2mgeA1npuwHkWjsdmjrxDmSkDQTfew/viewform?entry.347359844={orderId}")
|
req("10 € Gutschein", f"https://docs.google.com/forms/d/e/1FAIpQLSd2GXFbidzazuQnh_Lf2mgeA1npuwHkWjsdmjrxDmSkDQTfew/viewform?entry.347359844={orderId}")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
margin-right: 12px;
|
margin-right: 12px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container:last-child {
|
.container:last-child {
|
||||||
|
@ -12,28 +13,12 @@
|
||||||
|
|
||||||
.container-background {
|
.container-background {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 50%;
|
||||||
width: 330px;
|
left: 50%;
|
||||||
height: 600px;
|
width: 200px;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
background-image: url(background.svg);
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: center;
|
|
||||||
background-size: 50%;
|
|
||||||
opacity: 0.1;
|
opacity: 0.1;
|
||||||
top: 25px;
|
transform: translate(-50%, -50%);
|
||||||
}
|
|
||||||
|
|
||||||
.container-background.first-item {
|
|
||||||
left: 35px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container-background.second-item {
|
|
||||||
left: 325px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container-background.third-item {
|
|
||||||
left: 610px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.container-header {
|
.container-header {
|
||||||
|
|
Loading…
Reference in New Issue