third voucher
parent
dcddfd9b24
commit
24f0ee76c3
|
@ -8,172 +8,190 @@
|
|||
rel="stylesheet"
|
||||
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>
|
||||
body {
|
||||
font-family: "Outfit";
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 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>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div
|
||||
style="
|
||||
background-image: url(../../groupsData/shx-order-voucher-codes/backPageLogo.svg);
|
||||
height: 80px;
|
||||
background-size: 800px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
"
|
||||
></div>
|
||||
|
||||
<div style="display: flex; justify-content: center; padding-top: 60px">
|
||||
<div style="display: flex">
|
||||
<div class="container">
|
||||
<div class="container-background first-item"></div>
|
||||
|
||||
<div class="container-header">
|
||||
<p><span class="percentage">10 %</span> auf Alles</p>
|
||||
<div style="height: 100vh; width: 100vw">
|
||||
<div
|
||||
style="
|
||||
background-image: url(../../groupsData/shx-order-voucher-codes/backPageLogo.svg);
|
||||
height: 80px;
|
||||
background-size: 800px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
padding-top: 9px;
|
||||
"
|
||||
></div>
|
||||
|
||||
<div style="display: flex; justify-content: center">
|
||||
<div style="display: flex; transform: scale(0.8)">
|
||||
<div class="container">
|
||||
<img
|
||||
loading="lazy"
|
||||
height="28px"
|
||||
alt=""
|
||||
src="../../groupsData/shx-order-voucher-codes/icon_lock_open.svg"
|
||||
class="container-background"
|
||||
src="../../groupsData/shx-order-voucher-codes/background.svg"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="container-action">
|
||||
<img class="image-11-icon" alt="" src="./10percent.png" />
|
||||
<div class="container-header">
|
||||
<p><span class="percentage">10 %</span> auf Alles</p>
|
||||
|
||||
<div>
|
||||
<div class="status-box">
|
||||
<span class="open">Freigeschaltet</span>
|
||||
<img
|
||||
loading="lazy"
|
||||
height="28px"
|
||||
alt=""
|
||||
src="../../groupsData/shx-order-voucher-codes/icon_lock_open.svg"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="container-action">
|
||||
<img class="image-11-icon" alt="" src="./10percent.png" />
|
||||
|
||||
<div>
|
||||
<div class="status-box">
|
||||
<span class="open">Freigeschaltet</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Glückwunsch! Du hast soeben einen Gutschein im Wert von 10 %
|
||||
erhalten!
|
||||
</p>
|
||||
<p style="padding-bottom: 22px">
|
||||
Scanne den QR-Code, um direkt zum Shop zu gelangen.
|
||||
</p>
|
||||
|
||||
<div class="code-box first-item" style="margin-top: 39px">
|
||||
<span>{{DISCOUNT_CODE}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Glückwunsch! Du hast soeben einen Gutschein im Wert von 10 %
|
||||
erhalten!
|
||||
</p>
|
||||
<p style="padding-bottom: 22px">
|
||||
Scanne den QR-Code, um direkt zum Shop zu gelangen.
|
||||
</p>
|
||||
|
||||
<div class="code-box first-item" style="margin-top: 39px">
|
||||
<span>{{DISCOUNT_CODE}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="container-background second-item"></div>
|
||||
|
||||
<div class="container-header">
|
||||
<p><span class="percentage">5 €</span> auf Alles</p>
|
||||
|
||||
<div class="container">
|
||||
<img
|
||||
loading="lazy"
|
||||
height="28px"
|
||||
alt=""
|
||||
src="../../groupsData/shx-order-voucher-codes/icon_lock_closed.svg"
|
||||
class="container-background"
|
||||
src="../../groupsData/shx-order-voucher-codes/background.svg"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="container-action">
|
||||
<img class="image-11-icon" alt="" src="./5euro.png" />
|
||||
<div class="container-header">
|
||||
<p><span class="percentage">5 €</span> auf Alles</p>
|
||||
|
||||
<div>
|
||||
<div class="status-box">
|
||||
<span class="closed">Freischaltbar</span>
|
||||
</div>
|
||||
<div class="time-needed-box">
|
||||
<span>Dauer: 5 Minuten*</span>
|
||||
<img
|
||||
loading="lazy"
|
||||
height="28px"
|
||||
alt=""
|
||||
src="../../groupsData/shx-order-voucher-codes/icon_lock_closed.svg"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="container-action">
|
||||
<img class="image-11-icon" alt="" src="./5euro.png" />
|
||||
|
||||
<div>
|
||||
<div class="status-box">
|
||||
<span class="closed">Freischaltbar</span>
|
||||
</div>
|
||||
<div class="time-needed-box">
|
||||
<span>Dauer: 5 Minuten*</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Bewerte dein gekauftes Produkt in unserem Shop und erhalte einen
|
||||
Gutschein im Wert von 5 €!
|
||||
</p>
|
||||
<p>Scanne den QR-Code, um zu bewerten.</p>
|
||||
|
||||
<div class="minimum-order-value-box" style="margin-top: 37px">
|
||||
<span>Mindestbestellwert beträgt 25 €</span>
|
||||
</div>
|
||||
|
||||
<div class="code-box second-item">
|
||||
<span>********</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Bewerte dein gekauftes Produkt in unserem Shop und erhalte einen
|
||||
Gutschein im Wert von 5 €!
|
||||
</p>
|
||||
<p>Scanne den QR-Code, um zu bewerten.</p>
|
||||
|
||||
<div class="minimum-order-value-box" style="margin-top: 37px">
|
||||
<span>Mindestbestellwert beträgt 25 €</span>
|
||||
</div>
|
||||
|
||||
<div class="code-box second-item">
|
||||
<span>********</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="container-background third-item"></div>
|
||||
|
||||
<div class="container-header">
|
||||
<p><span class="percentage">10 €</span> auf Alles</p>
|
||||
|
||||
<div class="container" style="display: SHOW_THIRD_VOUCHER">
|
||||
<img
|
||||
loading="lazy"
|
||||
height="28px"
|
||||
alt=""
|
||||
src="../../groupsData/shx-order-voucher-codes/icon_lock_closed.svg"
|
||||
class="container-background"
|
||||
src="../../groupsData/shx-order-voucher-codes/background.svg"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="container-action">
|
||||
<img class="image-11-icon" alt="" src="./10euro.png" />
|
||||
<div class="container-header">
|
||||
<p><span class="percentage">10 €</span> auf Alles</p>
|
||||
|
||||
<div>
|
||||
<div class="status-box">
|
||||
<span class="closed">Freischaltbar</span>
|
||||
</div>
|
||||
<div class="time-needed-box">
|
||||
<span>Dauer: 5 Minuten*</span>
|
||||
<img
|
||||
loading="lazy"
|
||||
height="28px"
|
||||
alt=""
|
||||
src="../../groupsData/shx-order-voucher-codes/icon_lock_closed.svg"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="container-action">
|
||||
<img class="image-11-icon" alt="" src="./10euro.png" />
|
||||
|
||||
<div>
|
||||
<div class="status-box">
|
||||
<span class="closed">Freischaltbar</span>
|
||||
</div>
|
||||
<div class="time-needed-box">
|
||||
<span>Dauer: 5 Minuten*</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Erstelle einen Beitrag auf Instagram, markiere und folge
|
||||
<img
|
||||
src="../../groupsData/shx-order-voucher-codes/@shinnex.official.svg"
|
||||
height="13px"
|
||||
style="margin-bottom: 4.1px; vertical-align: middle"
|
||||
/>
|
||||
und erhalte einen Gutschein in Wert von 10 €!
|
||||
</p>
|
||||
<p>
|
||||
Scanne den QR-Code, um deinen geposteten Beitrag zu verifizieren.
|
||||
</p>
|
||||
<p>
|
||||
Erstelle einen Beitrag auf Instagram, markiere und folge
|
||||
<img
|
||||
src="../../groupsData/shx-order-voucher-codes/@shinnex.official.svg"
|
||||
height="13px"
|
||||
style="margin-bottom: 4.1px; vertical-align: middle"
|
||||
/>
|
||||
und erhalte einen Gutschein in Wert von 10 €!
|
||||
</p>
|
||||
<p>
|
||||
Scanne den QR-Code, um deinen geposteten Beitrag zu verifizieren.
|
||||
</p>
|
||||
|
||||
<div class="minimum-order-value-box">
|
||||
<span>Mindestbestellwert beträgt 25 €</span>
|
||||
</div>
|
||||
<div class="minimum-order-value-box">
|
||||
<span>Mindestbestellwert beträgt 25 €</span>
|
||||
</div>
|
||||
|
||||
<div class="code-box third-item">
|
||||
<span>********</span>
|
||||
<div class="code-box third-item">
|
||||
<span>********</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="padding-top: 80px; padding-left: 40px">
|
||||
<span style="font-size: 10px; color: #666666"
|
||||
>*Die Angaben basieren jediglich auf Schätzungen. Die Verifizierung kann
|
||||
bis zu 72 Stunden dauern, bis der Gutschein freigeschaltet wird.</span
|
||||
>
|
||||
<div style="padding-top: 40px; padding-left: 40px">
|
||||
<span style="font-size: 10px; color: #666666"
|
||||
>*Die Angaben basieren jediglich auf Schätzungen. Die Verifizierung
|
||||
kann bis zu 72 Stunden dauern, bis der Gutschein freigeschaltet
|
||||
wird.</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -4,21 +4,23 @@
|
|||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<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 {
|
||||
margin: 0 50px 0 50px;
|
||||
padding: 0;
|
||||
size: A5 landscape;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Outfit";
|
||||
src: url("../../groupsData/static/Outfit-VariableFont_wght.ttf");
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Outfit";
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body style="height: 550px; position: relative">
|
||||
|
|
|
@ -64,6 +64,20 @@ def CreateCrmCustomer():
|
|||
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():
|
||||
print(f"Checking if customer exists: {customerEmail}")
|
||||
|
||||
|
@ -80,10 +94,14 @@ def CheckIfCrmCustomerExists():
|
|||
sys.exit(1)
|
||||
|
||||
customerId = ""
|
||||
# only on first purchase we show the third voucher
|
||||
thirdVoucher = False
|
||||
|
||||
if response.json() == []:
|
||||
print("Customer not found")
|
||||
customerId = CreateCrmCustomer()
|
||||
|
||||
thirdVoucher = True
|
||||
else:
|
||||
if len(response.json()) > 1:
|
||||
print("Multiple customers found. Don't know which one to use")
|
||||
|
@ -91,11 +109,12 @@ def CheckIfCrmCustomerExists():
|
|||
|
||||
customerId = response.json()[0]["Id"]
|
||||
|
||||
CreateCrmActivityLink(customerId=customerId)
|
||||
show_third_voucher(thirdVoucher)
|
||||
CreateCrmActivityLink(customerId=customerId, thirdVoucher=thirdVoucher)
|
||||
GetCustomerActivityLinks(customerId=customerId)
|
||||
|
||||
|
||||
def CreateCrmActivityLink(customerId):
|
||||
def CreateCrmActivityLink(customerId, thirdVoucher):
|
||||
print(f"Creating CRM activity link for customer {customerId}")
|
||||
|
||||
def req(type, url):
|
||||
|
@ -118,7 +137,9 @@ def CreateCrmActivityLink(customerId):
|
|||
|
||||
req("10 % Gutschein", f"https://shinnex.de/discount/{discountCode}{utm}")
|
||||
req("5 € Gutschein", f"{productUrl}{utm}")
|
||||
req("10 € Gutschein", f"https://docs.google.com/forms/d/e/1FAIpQLSd2GXFbidzazuQnh_Lf2mgeA1npuwHkWjsdmjrxDmSkDQTfew/viewform?entry.347359844={orderId}")
|
||||
|
||||
if thirdVoucher:
|
||||
req("10 € Gutschein", f"https://docs.google.com/forms/d/e/1FAIpQLSd2GXFbidzazuQnh_Lf2mgeA1npuwHkWjsdmjrxDmSkDQTfew/viewform?entry.347359844={orderId}")
|
||||
|
||||
|
||||
def create_qrcode(type, id):
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
padding: 12px;
|
||||
border-radius: 20px;
|
||||
margin-right: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.container:last-child {
|
||||
|
@ -12,28 +13,12 @@
|
|||
|
||||
.container-background {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 330px;
|
||||
height: 600px;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 200px;
|
||||
z-index: 2;
|
||||
background-image: url(background.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 50%;
|
||||
opacity: 0.1;
|
||||
top: 25px;
|
||||
}
|
||||
|
||||
.container-background.first-item {
|
||||
left: 35px;
|
||||
}
|
||||
|
||||
.container-background.second-item {
|
||||
left: 325px;
|
||||
}
|
||||
|
||||
.container-background.third-item {
|
||||
left: 610px;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.container-header {
|
||||
|
|
Loading…
Reference in New Issue