basic order view

This commit is contained in:
2025-03-07 16:16:23 +01:00
parent 974b95b244
commit ac8b0339c3
6 changed files with 916 additions and 28 deletions

View File

@@ -147,14 +147,20 @@ func (rc *cartItemController) NewOrderFromForm(ctx *gin.Context) (models.Order,
token := GenerateToken() token := GenerateToken()
email := ctx.PostForm("email") email := ctx.PostForm("email")
comment := ctx.PostForm("comment") comment := ctx.PostForm("comment")
firstName := ctx.PostForm("firstName")
lastName := ctx.PostForm("lastName")
address := ctx.PostForm("address")
postalCode := ctx.PostForm("postalCode")
city := ctx.PostForm("city")
country := ctx.PostForm("country")
shippingStr := ctx.PostForm("shippingMethod") shippingStr := ctx.PostForm("shippingMethod")
address, err := rc.NewAddressFromForm(ctx) //address, err := rc.NewAddressFromForm(ctx)
if shippingStr != "pickup" { //if shippingStr != "pickup" {
if err != nil { // if err != nil {
return models.Order{}, fmt.Errorf("Invalid address information.") // return models.Order{}, fmt.Errorf("Invalid address information.")
} // }
} //}
var shipping models.Shipping var shipping models.Shipping
for _, shippingMethod := range GetShippingMethods() { for _, shippingMethod := range GetShippingMethods() {
@@ -168,6 +174,8 @@ func (rc *cartItemController) NewOrderFromForm(ctx *gin.Context) (models.Order,
} }
cartItems, err := repositories.CartItems.GetAllBySession(sessionId) cartItems, err := repositories.CartItems.GetAllBySession(sessionId)
fmt.Println(sessionId)
fmt.Println(cartItems)
if err != nil { if err != nil {
return models.Order{}, err return models.Order{}, err
@@ -179,8 +187,13 @@ func (rc *cartItemController) NewOrderFromForm(ctx *gin.Context) (models.Order,
Token: token, Token: token,
Email: email, Email: email,
Comment: comment, Comment: comment,
FirstName: firstName,
LastName: lastName,
Address: address, Address: address,
Shipping: shipping, PostalCode: postalCode,
City: city,
Country: country,
Shipping: shipping.Id,
CartItems: cartItems, CartItems: cartItems,
} }
@@ -363,13 +376,33 @@ func (rc *cartItemController) CheckoutHandler(c *gin.Context) {
return return
} }
var shipping models.Shipping
for _, shippingMethod := range GetShippingMethods() {
if shippingMethod.Id == order.Shipping {
shipping = shippingMethod
}
}
priceProducts := 0.0
for _, cartItem := range order.CartItems {
priceProducts += (float64(cartItem.Quantity) * cartItem.ItemVariant.Price)
}
priceTotal := priceProducts + shipping.Price
data := CreateSessionData(c, gin.H{ data := CreateSessionData(c, gin.H{
"error": "", "error": "",
"success": "", "success": "",
"order": order, "order": order,
"askAddress": (order.Shipping != "pickup"),
"isPreview": true, "isPreview": true,
"shipping": shipping,
"priceProducts": fmt.Sprintf("%.2f", priceProducts), //round 2 decimals
"priceTotal": fmt.Sprintf("%.2f", priceTotal), //round 2 decimals
}) })
fmt.Println(order)
c.HTML(http.StatusOK, "order.html", data) c.HTML(http.StatusOK, "order.html", data)
} }

View File

@@ -37,9 +37,14 @@ type Order struct {
Token string `json:"token" binding:"required" gorm:"not null"` Token string `json:"token" binding:"required" gorm:"not null"`
Email string `json:"email"` Email string `json:"email"`
Comment string `json:"comment"` Comment string `json:"comment"`
Address AddressInfo `json:"addressinfo"` FirstName string `json:"firstname"`
Shipping Shipping `json:"shipping"` LastName string `json:"lastname"`
CartItems []CartItem `json:"cartitems"` Address string `json:"address"`
PostalCode string `json:"postalcode"`
City string `json:"city"`
Country string `json:"country"`
Shipping string `json:"shipping"`
CartItems []CartItem `json:"cartitems" gorm:"foreignKey:OrderID"`
} }
type CartItem struct { type CartItem struct {
@@ -50,5 +55,5 @@ type CartItem struct {
ItemVariantId uint ItemVariantId uint
ItemVariant ItemVariant `json:"itemvariant" gorm:"foreignKey:ItemVariantId"` //gorm one2one ItemVariant ItemVariant `json:"itemvariant" gorm:"foreignKey:ItemVariantId"` //gorm one2one
Quantity int `json:"quantity" binding:"required"` Quantity int `json:"quantity" binding:"required"`
OrderId uint OrderID uint
} }

View File

@@ -63,7 +63,7 @@ func (t *GORMCartItemRepository) GetById(id string) (models.CartItem, error) {
func (r *GORMCartItemRepository) GetAllBySession(sessionId string) ([]models.CartItem, error) { func (r *GORMCartItemRepository) GetAllBySession(sessionId string) ([]models.CartItem, error) {
var cartItems []models.CartItem var cartItems []models.CartItem
result := r.DB.Preload("ShopItem").Where("session_id = ?", sessionId).Find(&cartItems) result := r.DB.Preload("ShopItem").Preload("ItemVariant").Where("session_id = ?", sessionId).Find(&cartItems)
return cartItems, result.Error return cartItems, result.Error

View File

@@ -107,7 +107,7 @@
} }
/* /*
! tailwindcss v3.4.16 | MIT License | https://tailwindcss.com ! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
*/ */
/* /*
@@ -566,6 +566,14 @@ video {
border-width: 0; border-width: 0;
} }
.invisible {
visibility: hidden;
}
.fixed {
position: fixed;
}
.absolute { .absolute {
position: absolute; position: absolute;
} }
@@ -587,6 +595,26 @@ video {
right: 0px; right: 0px;
} }
.left-0 {
left: 0px;
}
.top-0 {
top: 0px;
}
.z-10 {
z-index: 10;
}
.z-20 {
z-index: 20;
}
.z-50 {
z-index: 50;
}
.col-span-12 { .col-span-12 {
grid-column: span 12 / span 12; grid-column: span 12 / span 12;
} }
@@ -670,14 +698,42 @@ video {
margin-top: 1.5rem; margin-top: 1.5rem;
} }
.-me-0\.5 {
margin-inline-end: -0.125rem;
}
.me-2 {
margin-inline-end: 0.5rem;
}
.ms-2 {
margin-inline-start: 0.5rem;
}
.ms-auto {
margin-inline-start: auto;
}
.block { .block {
display: block; display: block;
} }
.inline-block {
display: inline-block;
}
.flex { .flex {
display: flex; display: flex;
} }
.inline-flex {
display: inline-flex;
}
.table {
display: table;
}
.grid { .grid {
display: grid; display: grid;
} }
@@ -718,6 +774,22 @@ video {
height: 100%; height: 100%;
} }
.h-3 {
height: 0.75rem;
}
.h-\[calc\(100\%-1rem\)\] {
height: calc(100% - 1rem);
}
.h-auto {
height: auto;
}
.max-h-full {
max-height: 100%;
}
.min-h-full { .min-h-full {
min-height: 100%; min-height: 100%;
} }
@@ -746,6 +818,18 @@ video {
width: 100%; width: 100%;
} }
.w-3 {
width: 0.75rem;
}
.w-56 {
width: 14rem;
}
.w-8 {
width: 2rem;
}
.max-w-2xl { .max-w-2xl {
max-width: 42rem; max-width: 42rem;
} }
@@ -762,6 +846,18 @@ video {
max-width: 28rem; max-width: 28rem;
} }
.max-w-3xl {
max-width: 48rem;
}
.max-w-lg {
max-width: 32rem;
}
.max-w-screen-xl {
max-width: 1280px;
}
.flex-1 { .flex-1 {
flex: 1 1 0%; flex: 1 1 0%;
} }
@@ -786,10 +882,18 @@ video {
grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-columns: repeat(12, minmax(0, 1fr));
} }
.grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.flex-col { .flex-col {
flex-direction: column; flex-direction: column;
} }
.items-start {
align-items: flex-start;
}
.items-center { .items-center {
align-items: center; align-items: center;
} }
@@ -810,6 +914,14 @@ video {
gap: 1.25rem; gap: 1.25rem;
} }
.gap-1 {
gap: 0.25rem;
}
.gap-2 {
gap: 0.5rem;
}
.gap-x-6 { .gap-x-6 {
-moz-column-gap: 1.5rem; -moz-column-gap: 1.5rem;
column-gap: 1.5rem; column-gap: 1.5rem;
@@ -847,6 +959,44 @@ video {
margin-bottom: calc(1.5rem * var(--tw-space-y-reverse)); margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
} }
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(1rem * var(--tw-space-y-reverse));
}
.divide-y > :not([hidden]) ~ :not([hidden]) {
--tw-divide-y-reverse: 0;
border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
border-bottom-width: calc(1px * var(--tw-divide-y-reverse));
}
.divide-gray-100 > :not([hidden]) ~ :not([hidden]) {
--tw-divide-opacity: 1;
border-color: rgb(243 244 246 / var(--tw-divide-opacity, 1));
}
.divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
--tw-divide-opacity: 1;
border-color: rgb(229 231 235 / var(--tw-divide-opacity, 1));
}
.overflow-x-auto {
overflow-x: auto;
}
.overflow-y-auto {
overflow-y: auto;
}
.overflow-x-hidden {
overflow-x: hidden;
}
.whitespace-nowrap {
white-space: nowrap;
}
.rounded { .rounded {
border-radius: 0.25rem; border-radius: 0.25rem;
} }
@@ -876,6 +1026,21 @@ video {
border-bottom-left-radius: 0.375rem; border-bottom-left-radius: 0.375rem;
} }
.rounded-e-lg {
border-start-end-radius: 0.5rem;
border-end-end-radius: 0.5rem;
}
.rounded-s-lg {
border-start-start-radius: 0.5rem;
border-end-start-radius: 0.5rem;
}
.rounded-t {
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
}
.border { .border {
border-width: 1px; border-width: 1px;
} }
@@ -888,6 +1053,14 @@ video {
border-bottom-width: 1px; border-bottom-width: 1px;
} }
.border-s-0 {
border-inline-start-width: 0px;
}
.border-t {
border-top-width: 1px;
}
.border-dashed { .border-dashed {
border-style: dashed; border-style: dashed;
} }
@@ -967,6 +1140,10 @@ video {
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
} }
.bg-transparent {
background-color: transparent;
}
.fill-red-50 { .fill-red-50 {
fill: #fef2f2; fill: #fef2f2;
} }
@@ -1051,6 +1228,16 @@ video {
padding-bottom: 2rem; padding-bottom: 2rem;
} }
.px-5 {
padding-left: 1.25rem;
padding-right: 1.25rem;
}
.py-2\.5 {
padding-top: 0.625rem;
padding-bottom: 0.625rem;
}
.pb-3 { .pb-3 {
padding-bottom: 0.75rem; padding-bottom: 0.75rem;
} }
@@ -1075,6 +1262,14 @@ video {
padding-top: 1.25rem; padding-top: 1.25rem;
} }
.pt-4 {
padding-top: 1rem;
}
.text-left {
text-align: left;
}
.text-center { .text-center {
text-align: center; text-align: center;
} }
@@ -1133,6 +1328,11 @@ video {
line-height: 1rem; line-height: 1rem;
} }
.text-xl {
font-size: 1.25rem;
line-height: 1.75rem;
}
.font-bold { .font-bold {
font-weight: 700; font-weight: 700;
} }
@@ -1225,12 +1425,36 @@ video {
color: rgb(255 255 255 / var(--tw-text-opacity, 1)); color: rgb(255 255 255 / var(--tw-text-opacity, 1));
} }
.text-gray-400 {
--tw-text-opacity: 1;
color: rgb(156 163 175 / var(--tw-text-opacity, 1));
}
.underline {
text-decoration-line: underline;
}
.antialiased {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.opacity-0 {
opacity: 0;
}
.shadow-sm { .shadow-sm {
--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
} }
.shadow {
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.shadow-transparent { .shadow-transparent {
--tw-shadow-color: transparent; --tw-shadow-color: transparent;
--tw-shadow: var(--tw-shadow-colored); --tw-shadow: var(--tw-shadow-colored);
@@ -1252,16 +1476,30 @@ video {
outline-color: #d1d5db; outline-color: #d1d5db;
} }
.filter {
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.transition-all { .transition-all {
transition-property: all; transition-property: all;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 150ms; transition-duration: 150ms;
} }
.transition-opacity {
transition-property: opacity;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 150ms;
}
.duration-500 { .duration-500 {
transition-duration: 500ms; transition-duration: 500ms;
} }
.duration-300 {
transition-duration: 300ms;
}
.placeholder\:text-gray-400::-moz-placeholder { .placeholder\:text-gray-400::-moz-placeholder {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(156 163 175 / var(--tw-text-opacity, 1)); color: rgb(156 163 175 / var(--tw-text-opacity, 1));
@@ -1350,6 +1588,16 @@ video {
background-color: rgb(127 29 29 / var(--tw-bg-opacity, 1)); background-color: rgb(127 29 29 / var(--tw-bg-opacity, 1));
} }
.hover\:bg-gray-100:hover {
--tw-bg-opacity: 1;
background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));
}
.hover\:bg-gray-200:hover {
--tw-bg-opacity: 1;
background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));
}
.hover\:text-indigo-500:hover { .hover\:text-indigo-500:hover {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(99 102 241 / var(--tw-text-opacity, 1)); color: rgb(99 102 241 / var(--tw-text-opacity, 1));
@@ -1360,11 +1608,28 @@ video {
color: rgb(255 255 255 / var(--tw-text-opacity, 1)); color: rgb(255 255 255 / var(--tw-text-opacity, 1));
} }
.hover\:text-gray-900:hover {
--tw-text-opacity: 1;
color: rgb(17 24 39 / var(--tw-text-opacity, 1));
}
.hover\:underline:hover {
text-decoration-line: underline;
}
.hover\:no-underline:hover {
text-decoration-line: none;
}
.hover\:shadow-gray-200:hover { .hover\:shadow-gray-200:hover {
--tw-shadow-color: #e5e7eb; --tw-shadow-color: #e5e7eb;
--tw-shadow: var(--tw-shadow-colored); --tw-shadow: var(--tw-shadow-colored);
} }
.focus\:z-10:focus {
z-index: 10;
}
.focus\:border-blue-500:focus { .focus\:border-blue-500:focus {
--tw-border-opacity: 1; --tw-border-opacity: 1;
border-color: rgb(59 130 246 / var(--tw-border-opacity, 1)); border-color: rgb(59 130 246 / var(--tw-border-opacity, 1));
@@ -1397,11 +1662,28 @@ video {
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
} }
.focus\:ring-2:focus {
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.focus\:ring-4:focus {
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.focus\:ring-blue-500:focus { .focus\:ring-blue-500:focus {
--tw-ring-opacity: 1; --tw-ring-opacity: 1;
--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1)); --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1));
} }
.focus\:ring-gray-100:focus {
--tw-ring-opacity: 1;
--tw-ring-color: rgb(243 244 246 / var(--tw-ring-opacity, 1));
}
.focus-visible\:outline:focus-visible { .focus-visible\:outline:focus-visible {
outline-style: solid; outline-style: solid;
} }
@@ -1468,6 +1750,10 @@ video {
inset: auto; inset: auto;
} }
.sm\:col-span-2 {
grid-column: span 2 / span 2;
}
.sm\:mx-auto { .sm\:mx-auto {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@@ -1477,10 +1763,22 @@ video {
margin-left: 1.5rem; margin-left: 1.5rem;
} }
.sm\:mt-0 {
margin-top: 0px;
}
.sm\:mt-8 {
margin-top: 2rem;
}
.sm\:block { .sm\:block {
display: block; display: block;
} }
.sm\:flex {
display: flex;
}
.sm\:hidden { .sm\:hidden {
display: none; display: none;
} }
@@ -1497,6 +1795,10 @@ video {
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
} }
.sm\:items-center {
align-items: center;
}
.sm\:px-6 { .sm\:px-6 {
padding-left: 1.5rem; padding-left: 1.5rem;
padding-right: 1.5rem; padding-right: 1.5rem;
@@ -1520,13 +1822,30 @@ video {
font-size: 0.875rem; font-size: 0.875rem;
line-height: 1.5rem; line-height: 1.5rem;
} }
.sm\:text-2xl {
font-size: 1.5rem;
line-height: 2rem;
}
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.md\:inset-0 {
inset: 0px;
}
.md\:w-\[384px\] {
width: 384px;
}
.md\:flex-1 { .md\:flex-1 {
flex: 1 1 0%; flex: 1 1 0%;
} }
.md\:table-fixed {
table-layout: fixed;
}
.md\:grid-cols-2 { .md\:grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
} }
@@ -1539,10 +1858,23 @@ video {
align-items: center; align-items: center;
} }
.md\:p-5 {
padding: 1.25rem;
}
.md\:px-5 { .md\:px-5 {
padding-left: 1.25rem; padding-left: 1.25rem;
padding-right: 1.25rem; padding-right: 1.25rem;
} }
.md\:py-16 {
padding-top: 4rem;
padding-bottom: 4rem;
}
.md\:pt-5 {
padding-top: 1.25rem;
}
} }
@media (min-width: 1024px) { @media (min-width: 1024px) {
@@ -1608,12 +1940,47 @@ video {
} }
} }
@media (min-width: 1536px) {
.\32xl\:px-0 {
padding-left: 0px;
padding-right: 0px;
}
}
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
.dark\:block {
display: block;
}
.dark\:hidden {
display: none;
}
.dark\:divide-gray-800 > :not([hidden]) ~ :not([hidden]) {
--tw-divide-opacity: 1;
border-color: rgb(31 41 55 / var(--tw-divide-opacity, 1));
}
.dark\:border-gray-600 { .dark\:border-gray-600 {
--tw-border-opacity: 1; --tw-border-opacity: 1;
border-color: rgb(75 85 99 / var(--tw-border-opacity, 1)); border-color: rgb(75 85 99 / var(--tw-border-opacity, 1));
} }
.dark\:border-gray-700 {
--tw-border-opacity: 1;
border-color: rgb(55 65 81 / var(--tw-border-opacity, 1));
}
.dark\:border-gray-800 {
--tw-border-opacity: 1;
border-color: rgb(31 41 55 / var(--tw-border-opacity, 1));
}
.dark\:border-s-gray-700 {
--tw-border-opacity: 1;
border-inline-start-color: rgb(55 65 81 / var(--tw-border-opacity, 1));
}
.dark\:bg-gray-600 { .dark\:bg-gray-600 {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(75 85 99 / var(--tw-bg-opacity, 1)); background-color: rgb(75 85 99 / var(--tw-bg-opacity, 1));
@@ -1634,6 +2001,11 @@ video {
background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1)); background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));
} }
.dark\:bg-gray-900 {
--tw-bg-opacity: 1;
background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1));
}
.dark\:text-gray-300 { .dark\:text-gray-300 {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(209 213 219 / var(--tw-text-opacity, 1)); color: rgb(209 213 219 / var(--tw-text-opacity, 1));
@@ -1649,6 +2021,21 @@ video {
color: rgb(255 255 255 / var(--tw-text-opacity, 1)); color: rgb(255 255 255 / var(--tw-text-opacity, 1));
} }
.dark\:text-gray-200 {
--tw-text-opacity: 1;
color: rgb(229 231 235 / var(--tw-text-opacity, 1));
}
.dark\:text-gray-400 {
--tw-text-opacity: 1;
color: rgb(156 163 175 / var(--tw-text-opacity, 1));
}
.dark\:text-gray-500 {
--tw-text-opacity: 1;
color: rgb(107 114 128 / var(--tw-text-opacity, 1));
}
.dark\:placeholder-gray-400::-moz-placeholder { .dark\:placeholder-gray-400::-moz-placeholder {
--tw-placeholder-opacity: 1; --tw-placeholder-opacity: 1;
color: rgb(156 163 175 / var(--tw-placeholder-opacity, 1)); color: rgb(156 163 175 / var(--tw-placeholder-opacity, 1));
@@ -1659,6 +2046,20 @@ video {
color: rgb(156 163 175 / var(--tw-placeholder-opacity, 1)); color: rgb(156 163 175 / var(--tw-placeholder-opacity, 1));
} }
.dark\:ring-offset-gray-800 {
--tw-ring-offset-color: #1f2937;
}
.dark\:placeholder\:text-gray-400::-moz-placeholder {
--tw-text-opacity: 1;
color: rgb(156 163 175 / var(--tw-text-opacity, 1));
}
.dark\:placeholder\:text-gray-400::placeholder {
--tw-text-opacity: 1;
color: rgb(156 163 175 / var(--tw-text-opacity, 1));
}
.dark\:hover\:bg-gray-600:hover { .dark\:hover\:bg-gray-600:hover {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(75 85 99 / var(--tw-bg-opacity, 1)); background-color: rgb(75 85 99 / var(--tw-bg-opacity, 1));
@@ -1669,6 +2070,11 @@ video {
background-color: rgb(55 65 81 / var(--tw-bg-opacity, 1)); background-color: rgb(55 65 81 / var(--tw-bg-opacity, 1));
} }
.dark\:hover\:text-white:hover {
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}
.dark\:focus\:border-blue-500:focus { .dark\:focus\:border-blue-500:focus {
--tw-border-opacity: 1; --tw-border-opacity: 1;
border-color: rgb(59 130 246 / var(--tw-border-opacity, 1)); border-color: rgb(59 130 246 / var(--tw-border-opacity, 1));
@@ -1678,4 +2084,9 @@ video {
--tw-ring-opacity: 1; --tw-ring-opacity: 1;
--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1)); --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1));
} }
.dark\:focus\:ring-gray-700:focus {
--tw-ring-opacity: 1;
--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity, 1));
}
} }

View File

@@ -8,20 +8,20 @@
<div class="mt-10 sm:mx-auto sm:w-full sm:max-w-sm"> <div class="mt-10 sm:mx-auto sm:w-full sm:max-w-sm">
<form class="space-y-6" action="#" method="POST" enctype="multipart/form-data"> <form class="space-y-6" action="/checkout" method="POST" enctype="multipart/form-data">
<input type="hidden" name="shippingMethod" value="{{ .shippingMethod }}" required> <input type="hidden" name="shippingMethod" value="{{ .shippingMethod }}" required>
{{ if .askAddress }} {{ if .askAddress }}
<div> <div>
<label for="name" class="block text-sm/6 font-medium text-gray-900">First Name</label> <label for="firstName" class="block text-sm/6 font-medium text-gray-900">First Name</label>
<div class="mt-2"> <div class="mt-2">
<input type="text" name="firstname" id="firstname" required class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6"> <input type="text" name="firstName" id="firstName" required class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6">
</div> </div>
</div> </div>
<div> <div>
<label for="lastname" class="block text-sm/6 font-medium text-gray-900">Last Name</label> <label for="lastName" class="block text-sm/6 font-medium text-gray-900">Last Name</label>
<div class="mt-2"> <div class="mt-2">
<input type="text" name="lastname" id="lastname" required class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6"> <input type="text" name="lastName" id="lastName" required class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6">
</div> </div>
</div> </div>
@@ -34,25 +34,25 @@
<div> <div>
<label for="lastname" class="block text-sm/6 font-medium text-gray-900">Postal Code</label> <label for="postalCode" class="block text-sm/6 font-medium text-gray-900">Postal Code</label>
<div class="mt-2"> <div class="mt-2">
<input type="text" name="lastname" id="lastname" required class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6"> <input type="text" name="postalCode" id="postalCode" required class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6">
</div> </div>
</div> </div>
<div> <div>
<label for="lastname" class="block text-sm/6 font-medium text-gray-900">City</label> <label for="city" class="block text-sm/6 font-medium text-gray-900">City</label>
<div class="mt-2"> <div class="mt-2">
<input type="text" name="lastname" id="lastname" required class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6"> <input type="text" name="city" id="city" required class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6">
</div> </div>
</div> </div>
<div> <div>
<label for="lastname" class="block text-sm/6 font-medium text-gray-900">Country</label> <label for="country" class="block text-sm/6 font-medium text-gray-900">Country</label>
<div class="mt-2"> <div class="mt-2">
<input type="text" name="lastname" id="lastname" required class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6"> <input type="text" name="country" id="country" required class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6">
</div> </div>
</div> </div>
@@ -60,17 +60,17 @@
<div> <div>
<label for="lastname" class="block text-sm/6 font-medium text-gray-900">E-Mail</label> <label for="email" class="block text-sm/6 font-medium text-gray-900">E-Mail</label>
<p class="text-sm/8 font-small text-gray-600">Without E-Mail you wont receive an order confirmation.</p> <p class="text-sm/8 font-small text-gray-600">Without E-Mail you wont receive an order confirmation.</p>
<div class="mt-2"> <div class="mt-2">
<input type="email" name="lastname" id="lastname" class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6"> <input type="email" name="email" id="email" class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6">
</div> </div>
</div> </div>
<div> <div>
<label for="description" class="block text-sm/6 font-medium text-gray-900" for="passwordConfirmation">Comment</label> <label for="comment" class="block text-sm/6 font-medium text-gray-900" for="passwordConfirmation">Comment</label>
<textarea id="description" name="description" type="textarea" class="block w-full px-4 py-2 mt-2 text-gray-700 bg-white border border-gray-300 rounded-md dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-500 focus:outline-none focus:ring"></textarea> <textarea id="comment" name="comment" type="textarea" class="block w-full px-4 py-2 mt-2 text-gray-700 bg-white border border-gray-300 rounded-md dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-500 focus:outline-none focus:ring"></textarea>
</div> </div>
<p class="mt-10 text-center text-sm/6 text-red-500"> <p class="mt-10 text-center text-sm/6 text-red-500">

439
views/order.html Normal file
View File

@@ -0,0 +1,439 @@
{{ template "header.html" . }}
<section class="bg-white py-8 antialiased dark:bg-gray-900 md:py-16">
<form action="#" class="mx-auto max-w-screen-xl px-4 2xl:px-0">
<div class="mx-auto max-w-3xl">
<h2 class="text-xl font-semibold text-gray-900 dark:text-white sm:text-2xl">Order summary</h2>
<div class="mt-6 space-y-4 border-b border-t border-gray-200 py-8 dark:border-gray-700 sm:mt-8">
<h4 class="text-lg font-semibold text-gray-900 dark:text-white">Delivery information</h4>
<dl>
<dd class="mt-1 text-base font-normal text-gray-500 dark:text-gray-400">
<p><b>Shipping:</b> {{ .data.shipping.Name }}</p>
{{ if .data.askAddress }}
<p><b>First Name:</b> {{ .data.order.FirstName }}</p>
<p><b>Last Name:</b> {{ .data.order.LastName }}</p>
<p><b>Address:</b> {{ .data.order.Address }}</p>
<p><b>Postal Code:</b> {{ .data.order.PostalCode }}</p>
<p><b>City:</b> {{ .data.order.City }}</p>
<p><b>Country:</b> {{ .data.order.Country }}</p>
{{ end }}
<p><b>Email:</b> {{ .data.order.Email }}</p>
<p><b>Comment:</b> {{ .data.order.Comment }}</p>
</dd>
</dl>
<button type="button" data-modal-target="billingInformationModal" data-modal-toggle="billingInformationModal" class="text-base font-medium text-primary-700 hover:underline dark:text-primary-500">Edit</button>
</div>
<div class="mt-6 sm:mt-8">
<div class="relative overflow-x-auto border-b border-gray-200 dark:border-gray-800">
<table class="w-full text-left font-medium text-gray-900 dark:text-white ">
<tbody class="divide-y divide-gray-200 dark:divide-gray-800">
{{ range .data.order.CartItems }}
<tr>
<td class="whitespace-nowrap py-4">
<div class="flex items-center gap-4">
<a href="#" class="flex items-center aspect-square w-10 h-10 shrink-0">
<img class="h-auto w-full max-h-full dark:hidden" src="https://flowbite.s3.amazonaws.com/blocks/e-commerce/imac-front.svg" alt="imac image" />
<img class="hidden h-auto w-full max-h-full dark:block" src="https://flowbite.s3.amazonaws.com/blocks/e-commerce/imac-front-dark.svg" alt="imac image" />
</a>
<a href="/shopitems/{{ .ShopItem.ID }}" class="hover:underline">{{ .ShopItem.Name }} - {{ .ItemVariant.Name }}</a>
</div>
</td>
<td class="p-4 text-base font-normal text-gray-900 dark:text-white">x{{ .Quantity }}</td>
<td class="p-4 text-right text-base font-bold text-gray-900 dark:text-white">{{ .ItemVariant.Price }}€</td>
</tr>
{{ end }}
</tbody>
</table>
</div>
<div class="mt-4 space-y-6">
<h4 class="text-xl font-semibold text-gray-900 dark:text-white">Order summary</h4>
<div class="space-y-4">
<div class="space-y-2">
<dl class="flex items-center justify-between gap-4">
<dt class="text-gray-500 dark:text-gray-400">Original price</dt>
<dd class="text-base font-medium text-gray-900 dark:text-white">{{ .data.priceProducts }}€</dd>
</dl>
<dl class="flex items-center justify-between gap-4">
<dt class="text-gray-500 dark:text-gray-400">Shipping</dt>
<dd class="text-base font-medium text-gray-900 dark:text-white">{{ .data.shipping.Price }}€</dd>
</dl>
</div>
<dl class="flex items-center justify-between gap-4 border-t border-gray-200 pt-2 dark:border-gray-700">
<dt class="text-lg font-bold text-gray-900 dark:text-white">Total</dt>
<dd class="text-lg font-bold text-gray-900 dark:text-white">{{ .data.priceTotal }}€</dd>
</dl>
</div>
<div class="flex items-start sm:items-center">
<input id="terms-checkbox-2" type="checkbox" value="" class="h-4 w-4 rounded border-gray-300 bg-gray-100 text-primary-600 focus:ring-2 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:ring-offset-gray-800 dark:focus:ring-primary-600" />
<label for="terms-checkbox-2" class="ms-2 text-sm font-medium text-gray-900 dark:text-gray-300"> I agree with the <a href="#" title="" class="text-primary-700 underline hover:no-underline dark:text-primary-500">Terms and Conditions</a> of use of the Flowbite marketplace </label>
</div>
<div class="gap-4 sm:flex sm:items-center">
<button type="button" class="w-full rounded-lg border border-gray-200 bg-white px-5 py-2.5 text-sm font-medium text-gray-900 hover:bg-gray-100 hover:text-primary-700 focus:z-10 focus:outline-none focus:ring-4 focus:ring-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white dark:focus:ring-gray-700">Return to Shopping</button>
<button type="submit" class="mt-4 flex w-full items-center justify-center rounded-lg bg-primary-700 px-5 py-2.5 text-sm font-medium text-white hover:bg-primary-800 focus:outline-none focus:ring-4 focus:ring-primary-300 dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800 sm:mt-0">Send the order</button>
</div>
</div>
</div>
</div>
</form>
</section>
<div id="billingInformationModal" tabindex="-1" aria-hidden="true" class="antialiased fixed left-0 right-0 top-0 z-50 hidden h-[calc(100%-1rem)] max-h-auto w-full max-h-full items-center justify-center overflow-y-auto overflow-x-hidden antialiased md:inset-0">
<div class="relative max-h-auto w-full max-h-full max-w-lg p-4">
<!-- Modal content -->
<div class="relative rounded-lg bg-white shadow dark:bg-gray-800">
<!-- Modal header -->
<div class="flex items-center justify-between rounded-t border-b border-gray-200 p-4 dark:border-gray-700 md:p-5">
<h3 class="text-lg font-semibold text-gray-900 dark:text-white">Billing Information</h3>
<button type="button" class="ms-auto inline-flex h-8 w-8 items-center justify-center rounded-lg bg-transparent text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white" data-modal-toggle="billingInformationModal">
<svg class="h-3 w-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6" />
</svg>
<span class="sr-only">Close modal</span>
</button>
</div>
<!-- Modal body -->
<form class="p-4 md:p-5">
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 mb-5">
<div class="flex items-center gap-4 sm:col-span-2">
<div class="flex items-center">
<input id="company_address_billing_modal" data-collapse-toggle="company-info-container-modal" aria-expanded="false" type="checkbox" value="" name="address-type-modal" class="h-4 w-4 rounded border-gray-300 bg-gray-100 text-primary-600 focus:ring-2 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:ring-offset-gray-800 dark:focus:ring-primary-600" />
<label for="company_address_billing_modal" class="ms-2 text-sm font-medium text-gray-900 dark:text-gray-300"> Order as a company </label>
</div>
</div>
<div class="grid hidden grid-cols-2 gap-4 sm:col-span-2" id="company-info-container-modal">
<div>
<label for="company_name" class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"> Company name </label>
<input type="text" id="company_name" class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder:text-gray-400 dark:focus:border-primary-500 dark:focus:ring-primary-500" placeholder="Flowbite LLC" />
</div>
<div>
<label for="vat_number" class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"> VAT number </label>
<input type="text" id="vat_number" class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder:text-gray-400 dark:focus:border-primary-500 dark:focus:ring-primary-500" placeholder="DE42313253" />
</div>
</div>
<div class="sm:col-span-2">
<div class="mb-2 flex items-center gap-1">
<label for="saved-address-modal" class="block text-sm font-medium text-gray-900 dark:text-white"> Saved Address </label>
<svg data-tooltip-target="saved-address-modal-desc-2" data-tooltip-trigger="hover" class="h-4 w-4 text-gray-400 hover:text-gray-900 dark:text-gray-500 dark:hover:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
<path fill-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm9.408-5.5a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2h-.01ZM10 10a1 1 0 1 0 0 2h1v3h-1a1 1 0 1 0 0 2h4a1 1 0 1 0 0-2h-1v-4a1 1 0 0 0-1-1h-2Z" clip-rule="evenodd" />
</svg>
</div>
<select id="saved-address-modal" class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder:text-gray-400 dark:focus:border-primary-500 dark:focus:ring-primary-500">
<option selected>Choose one of your saved address</option>
<option value="address-1">San Francisco, California, United States, 3454, Scott Street</option>
<option value="address-2">New York, United States, Broadway 10012</option>
</select>
<div id="saved-address-modal-desc-2" role="tooltip" class="tooltip invisible absolute z-10 inline-block rounded-lg bg-gray-900 px-3 py-2 text-sm font-medium text-white opacity-0 shadow-sm transition-opacity duration-300 dark:bg-gray-700">
Choose one of your saved addresses
<div class="tooltip-arrow" data-popper-arrow></div>
</div>
</div>
<div>
<label for="first_name_billing_modal" class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"> First Name* </label>
<input type="text" id="first_name_billing_modal" class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder:text-gray-400 dark:focus:border-primary-500 dark:focus:ring-primary-500" placeholder="Enter your first name" required />
</div>
<div>
<label for="last_name_billing_modal" class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"> Last Name* </label>
<input type="text" id="last_name_billing_modal" class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder:text-gray-400 dark:focus:border-primary-500 dark:focus:ring-primary-500" placeholder="Enter your last name" required />
</div>
<div class="sm:col-span-2">
<label for="phone-input_billing_modal" class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"> Phone Number* </label>
<div class="flex items-center">
<button id="dropdown_phone_input__button_billing_modal" data-dropdown-toggle="dropdown_phone_input_billing_modal" class="z-10 inline-flex shrink-0 items-center rounded-s-lg border border-gray-300 bg-gray-100 px-4 py-2.5 text-center text-sm font-medium text-gray-900 hover:bg-gray-200 focus:outline-none focus:ring-4 focus:ring-gray-100 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-700" type="button">
<svg fill="none" aria-hidden="true" class="me-2 h-4 w-4" viewBox="0 0 20 15">
<rect width="19.6" height="14" y=".5" fill="#fff" rx="2" />
<mask id="a" style="mask-type:luminance" width="20" height="15" x="0" y="0" maskUnits="userSpaceOnUse">
<rect width="19.6" height="14" y=".5" fill="#fff" rx="2" />
</mask>
<g mask="url(#a)">
<path fill="#D02F44" fill-rule="evenodd" d="M19.6.5H0v.933h19.6V.5zm0 1.867H0V3.3h19.6v-.933zM0 4.233h19.6v.934H0v-.934zM19.6 6.1H0v.933h19.6V6.1zM0 7.967h19.6V8.9H0v-.933zm19.6 1.866H0v.934h19.6v-.934zM0 11.7h19.6v.933H0V11.7zm19.6 1.867H0v.933h19.6v-.933z" clip-rule="evenodd" />
<path fill="#46467F" d="M0 .5h8.4v6.533H0z" />
<g filter="url(#filter0_d_343_121520)">
<path
fill="url(#paint0_linear_343_121520)"
fill-rule="evenodd"
d="M1.867 1.9a.467.467 0 11-.934 0 .467.467 0 01.934 0zm1.866 0a.467.467 0 11-.933 0 .467.467 0 01.933 0zm1.4.467a.467.467 0 100-.934.467.467 0 000 .934zM7.467 1.9a.467.467 0 11-.934 0 .467.467 0 01.934 0zM2.333 3.3a.467.467 0 100-.933.467.467 0 000 .933zm2.334-.467a.467.467 0 11-.934 0 .467.467 0 01.934 0zm1.4.467a.467.467 0 100-.933.467.467 0 000 .933zm1.4.467a.467.467 0 11-.934 0 .467.467 0 01.934 0zm-2.334.466a.467.467 0 100-.933.467.467 0 000 .933zm-1.4-.466a.467.467 0 11-.933 0 .467.467 0 01.933 0zM1.4 4.233a.467.467 0 100-.933.467.467 0 000 .933zm1.4.467a.467.467 0 11-.933 0 .467.467 0 01.933 0zm1.4.467a.467.467 0 100-.934.467.467 0 000 .934zM6.533 4.7a.467.467 0 11-.933 0 .467.467 0 01.933 0zM7 6.1a.467.467 0 100-.933.467.467 0 000 .933zm-1.4-.467a.467.467 0 11-.933 0 .467.467 0 01.933 0zM3.267 6.1a.467.467 0 100-.933.467.467 0 000 .933zm-1.4-.467a.467.467 0 11-.934 0 .467.467 0 01.934 0z"
clip-rule="evenodd"
/>
</g>
</g>
<defs>
<linearGradient id="paint0_linear_343_121520" x1=".933" x2=".933" y1="1.433" y2="6.1" gradientUnits="userSpaceOnUse">
<stop stop-color="#fff" />
<stop offset="1" stop-color="#F0F0F0" />
</linearGradient>
<filter id="filter0_d_343_121520" width="6.533" height="5.667" x=".933" y="1.433" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse">
<feFlood flood-opacity="0" result="BackgroundImageFix" />
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" />
<feOffset dy="1" />
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0" />
<feBlend in2="BackgroundImageFix" result="effect1_dropShadow_343_121520" />
<feBlend in="SourceGraphic" in2="effect1_dropShadow_343_121520" result="shape" />
</filter>
</defs>
</svg>
+1
<svg class="-me-0.5 ms-2 h-4 w-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m19 9-7 7-7-7" />
</svg>
</button>
<div id="dropdown_phone_input_billing_modal" class="z-10 hidden w-56 divide-y divide-gray-100 rounded-lg bg-white shadow dark:bg-gray-700">
<ul class="p-2 text-sm font-medium text-gray-700 dark:text-gray-200" aria-labelledby="dropdown_phone_input__button_billing_modal">
<li>
<button type="button" class="inline-flex w-full rounded-md px-3 py-2 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white" role="menuitem">
<span class="inline-flex items-center">
<svg fill="none" aria-hidden="true" class="me-2 h-4 w-4" viewBox="0 0 20 15">
<rect width="19.6" height="14" y=".5" fill="#fff" rx="2" />
<mask id="a" style="mask-type:luminance" width="20" height="15" x="0" y="0" maskUnits="userSpaceOnUse">
<rect width="19.6" height="14" y=".5" fill="#fff" rx="2" />
</mask>
<g mask="url(#a)">
<path fill="#D02F44" fill-rule="evenodd" d="M19.6.5H0v.933h19.6V.5zm0 1.867H0V3.3h19.6v-.933zM0 4.233h19.6v.934H0v-.934zM19.6 6.1H0v.933h19.6V6.1zM0 7.967h19.6V8.9H0v-.933zm19.6 1.866H0v.934h19.6v-.934zM0 11.7h19.6v.933H0V11.7zm19.6 1.867H0v.933h19.6v-.933z" clip-rule="evenodd" />
<path fill="#46467F" d="M0 .5h8.4v6.533H0z" />
<g filter="url(#filter0_d_343_121520)">
<path
fill="url(#paint0_linear_343_121520)"
fill-rule="evenodd"
d="M1.867 1.9a.467.467 0 11-.934 0 .467.467 0 01.934 0zm1.866 0a.467.467 0 11-.933 0 .467.467 0 01.933 0zm1.4.467a.467.467 0 100-.934.467.467 0 000 .934zM7.467 1.9a.467.467 0 11-.934 0 .467.467 0 01.934 0zM2.333 3.3a.467.467 0 100-.933.467.467 0 000 .933zm2.334-.467a.467.467 0 11-.934 0 .467.467 0 01.934 0zm1.4.467a.467.467 0 100-.933.467.467 0 000 .933zm1.4.467a.467.467 0 11-.934 0 .467.467 0 01.934 0zm-2.334.466a.467.467 0 100-.933.467.467 0 000 .933zm-1.4-.466a.467.467 0 11-.933 0 .467.467 0 01.933 0zM1.4 4.233a.467.467 0 100-.933.467.467 0 000 .933zm1.4.467a.467.467 0 11-.933 0 .467.467 0 01.933 0zm1.4.467a.467.467 0 100-.934.467.467 0 000 .934zM6.533 4.7a.467.467 0 11-.933 0 .467.467 0 01.933 0zM7 6.1a.467.467 0 100-.933.467.467 0 000 .933zm-1.4-.467a.467.467 0 11-.933 0 .467.467 0 01.933 0zM3.267 6.1a.467.467 0 100-.933.467.467 0 000 .933zm-1.4-.467a.467.467 0 11-.934 0 .467.467 0 01.934 0z"
clip-rule="evenodd"
/>
</g>
</g>
<defs>
<linearGradient id="paint0_linear_343_121520" x1=".933" x2=".933" y1="1.433" y2="6.1" gradientUnits="userSpaceOnUse">
<stop stop-color="#fff" />
<stop offset="1" stop-color="#F0F0F0" />
</linearGradient>
<filter id="filter0_d_343_121520" width="6.533" height="5.667" x=".933" y="1.433" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse">
<feFlood flood-opacity="0" result="BackgroundImageFix" />
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" />
<feOffset dy="1" />
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0" />
<feBlend in2="BackgroundImageFix" result="effect1_dropShadow_343_121520" />
<feBlend in="SourceGraphic" in2="effect1_dropShadow_343_121520" result="shape" />
</filter>
</defs>
</svg>
United States (+1)
</span>
</button>
</li>
<li>
<button type="button" class="inline-flex w-full rounded-md px-3 py-2 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white" role="menuitem">
<span class="inline-flex items-center">
<svg class="me-2 h-4 w-4" fill="none" viewBox="0 0 20 15">
<rect width="19.6" height="14" y=".5" fill="#fff" rx="2" />
<mask id="a" style="mask-type:luminance" width="20" height="15" x="0" y="0" maskUnits="userSpaceOnUse">
<rect width="19.6" height="14" y=".5" fill="#fff" rx="2" />
</mask>
<g mask="url(#a)">
<path fill="#0A17A7" d="M0 .5h19.6v14H0z" />
<path fill="#fff" fill-rule="evenodd" d="M-.898-.842L7.467 4.8V-.433h4.667V4.8l8.364-5.642L21.542.706l-6.614 4.46H19.6v4.667h-4.672l6.614 4.46-1.044 1.549-8.365-5.642v5.233H7.467V10.2l-8.365 5.642-1.043-1.548 6.613-4.46H0V5.166h4.672L-1.941.706-.898-.842z" clip-rule="evenodd" />
<path stroke="#DB1F35" stroke-linecap="round" stroke-width=".667" d="M13.067 4.933L21.933-.9M14.009 10.088l7.947 5.357M5.604 4.917L-2.686-.67M6.503 10.024l-9.189 6.093" />
<path fill="#E6273E" fill-rule="evenodd" d="M0 8.9h8.4v5.6h2.8V8.9h8.4V6.1h-8.4V.5H8.4v5.6H0v2.8z" clip-rule="evenodd" />
</g>
</svg>
United Kingdom (+44)
</span>
</button>
</li>
<li>
<button type="button" class="inline-flex w-full rounded-md px-3 py-2 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white" role="menuitem">
<span class="inline-flex items-center">
<svg class="me-2 h-4 w-4" fill="none" viewBox="0 0 20 15" xmlns="http://www.w3.org/2000/svg">
<rect width="19.6" height="14" y=".5" fill="#fff" rx="2" />
<mask id="a" style="mask-type:luminance" width="20" height="15" x="0" y="0" maskUnits="userSpaceOnUse">
<rect width="19.6" height="14" y=".5" fill="#fff" rx="2" />
</mask>
<g mask="url(#a)">
<path fill="#0A17A7" d="M0 .5h19.6v14H0z" />
<path fill="#fff" stroke="#fff" stroke-width=".667" d="M0 .167h-.901l.684.586 3.15 2.7v.609L-.194 6.295l-.14.1v1.24l.51-.319L3.83 5.033h.73L7.7 7.276a.488.488 0 00.601-.767L5.467 4.08v-.608l2.987-2.134a.667.667 0 00.28-.543V-.1l-.51.318L4.57 2.5h-.73L.66.229.572.167H0z" />
<path fill="url(#paint0_linear_374_135177)" fill-rule="evenodd" d="M0 2.833V4.7h3.267v2.133c0 .369.298.667.666.667h.534a.667.667 0 00.666-.667V4.7H8.2a.667.667 0 00.667-.667V3.5a.667.667 0 00-.667-.667H5.133V.5H3.267v2.333H0z" clip-rule="evenodd" />
<path fill="url(#paint1_linear_374_135177)" fill-rule="evenodd" d="M0 3.3h3.733V.5h.934v2.8H8.4v.933H4.667v2.8h-.934v-2.8H0V3.3z" clip-rule="evenodd" />
<path
fill="#fff"
fill-rule="evenodd"
d="M4.2 11.933l-.823.433.157-.916-.666-.65.92-.133.412-.834.411.834.92.134-.665.649.157.916-.823-.433zm9.8.7l-.66.194.194-.66-.194-.66.66.193.66-.193-.193.66.193.66-.66-.194zm0-8.866l-.66.193.194-.66-.194-.66.66.193.66-.193-.193.66.193.66-.66-.193zm2.8 2.8l-.66.193.193-.66-.193-.66.66.193.66-.193-.193.66.193.66-.66-.193zm-5.6.933l-.66.193.193-.66-.193-.66.66.194.66-.194-.193.66.193.66-.66-.193zm4.2 1.167l-.33.096.096-.33-.096-.33.33.097.33-.097-.097.33.097.33-.33-.096z"
clip-rule="evenodd"
/>
</g>
<defs>
<linearGradient id="paint0_linear_374_135177" x1="0" x2="0" y1=".5" y2="7.5" gradientUnits="userSpaceOnUse">
<stop stop-color="#fff" />
<stop offset="1" stop-color="#F0F0F0" />
</linearGradient>
<linearGradient id="paint1_linear_374_135177" x1="0" x2="0" y1=".5" y2="7.033" gradientUnits="userSpaceOnUse">
<stop stop-color="#FF2E3B" />
<stop offset="1" stop-color="#FC0D1B" />
</linearGradient>
</defs>
</svg>
Australia (+61)
</span>
</button>
</li>
<li>
<button type="button" class="inline-flex w-full rounded-md px-3 py-2 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white" role="menuitem">
<span class="inline-flex items-center">
<svg class="me-2 h-4 w-4" fill="none" viewBox="0 0 20 15">
<rect width="19.6" height="14" y=".5" fill="#fff" rx="2" />
<mask id="a" style="mask-type:luminance" width="20" height="15" x="0" y="0" maskUnits="userSpaceOnUse">
<rect width="19.6" height="14" y=".5" fill="#fff" rx="2" />
</mask>
<g mask="url(#a)">
<path fill="#262626" fill-rule="evenodd" d="M0 5.167h19.6V.5H0v4.667z" clip-rule="evenodd" />
<g filter="url(#filter0_d_374_135180)">
<path fill="#F01515" fill-rule="evenodd" d="M0 9.833h19.6V5.167H0v4.666z" clip-rule="evenodd" />
</g>
<g filter="url(#filter1_d_374_135180)">
<path fill="#FFD521" fill-rule="evenodd" d="M0 14.5h19.6V9.833H0V14.5z" clip-rule="evenodd" />
</g>
</g>
<defs>
<filter id="filter0_d_374_135180" width="19.6" height="4.667" x="0" y="5.167" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse">
<feFlood flood-opacity="0" result="BackgroundImageFix" />
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" />
<feOffset />
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0" />
<feBlend in2="BackgroundImageFix" result="effect1_dropShadow_374_135180" />
<feBlend in="SourceGraphic" in2="effect1_dropShadow_374_135180" result="shape" />
</filter>
<filter id="filter1_d_374_135180" width="19.6" height="4.667" x="0" y="9.833" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse">
<feFlood flood-opacity="0" result="BackgroundImageFix" />
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" />
<feOffset />
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0" />
<feBlend in2="BackgroundImageFix" result="effect1_dropShadow_374_135180" />
<feBlend in="SourceGraphic" in2="effect1_dropShadow_374_135180" result="shape" />
</filter>
</defs>
</svg>
Germany (+49)
</span>
</button>
</li>
<li>
<button type="button" class="inline-flex w-full rounded-md px-3 py-2 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white" role="menuitem">
<span class="inline-flex items-center">
<svg class="me-2 h-4 w-4" fill="none" viewBox="0 0 20 15">
<rect width="19.1" height="13.5" x=".25" y=".75" fill="#fff" stroke="#F5F5F5" stroke-width=".5" rx="1.75" />
<mask id="a" style="mask-type:luminance" width="20" height="15" x="0" y="0" maskUnits="userSpaceOnUse">
<rect width="19.1" height="13.5" x=".25" y=".75" fill="#fff" stroke="#fff" stroke-width=".5" rx="1.75" />
</mask>
<g mask="url(#a)">
<path fill="#F44653" d="M13.067.5H19.6v14h-6.533z" />
<path fill="#1035BB" fill-rule="evenodd" d="M0 14.5h6.533V.5H0v14z" clip-rule="evenodd" />
</g>
</svg>
France (+33)
</span>
</button>
</li>
<li>
<button type="button" class="inline-flex w-full rounded-md px-3 py-2 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white" role="menuitem">
<span class="inline-flex items-center">
<svg class="me-2 h-4 w-4" fill="none" viewBox="0 0 20 15">
<rect width="19.6" height="14" y=".5" fill="#fff" rx="2" />
<mask id="a" style="mask-type:luminance" width="20" height="15" x="0" y="0" maskUnits="userSpaceOnUse">
<rect width="19.6" height="14" y=".5" fill="#fff" rx="2" />
</mask>
<g mask="url(#a)">
<path fill="#262626" fill-rule="evenodd" d="M0 5.167h19.6V.5H0v4.667z" clip-rule="evenodd" />
<g filter="url(#filter0_d_374_135180)">
<path fill="#F01515" fill-rule="evenodd" d="M0 9.833h19.6V5.167H0v4.666z" clip-rule="evenodd" />
</g>
<g filter="url(#filter1_d_374_135180)">
<path fill="#FFD521" fill-rule="evenodd" d="M0 14.5h19.6V9.833H0V14.5z" clip-rule="evenodd" />
</g>
</g>
<defs>
<filter id="filter0_d_374_135180" width="19.6" height="4.667" x="0" y="5.167" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse">
<feFlood flood-opacity="0" result="BackgroundImageFix" />
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" />
<feOffset />
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0" />
<feBlend in2="BackgroundImageFix" result="effect1_dropShadow_374_135180" />
<feBlend in="SourceGraphic" in2="effect1_dropShadow_374_135180" result="shape" />
</filter>
<filter id="filter1_d_374_135180" width="19.6" height="4.667" x="0" y="9.833" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse">
<feFlood flood-opacity="0" result="BackgroundImageFix" />
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" />
<feOffset />
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0" />
<feBlend in2="BackgroundImageFix" result="effect1_dropShadow_374_135180" />
<feBlend in="SourceGraphic" in2="effect1_dropShadow_374_135180" result="shape" />
</filter>
</defs>
</svg>
Germany (+49)
</span>
</button>
</li>
</ul>
</div>
<div class="relative w-full">
<input type="text" id="phone-input" class="z-20 block w-full rounded-e-lg border border-s-0 border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-600 dark:border-s-gray-700 dark:bg-gray-700 dark:text-white dark:placeholder:text-gray-400 dark:focus:border-primary-500" pattern="[0-9]{3}-[0-9]{3}-[0-9]{4}" placeholder="123-456-7890" required />
</div>
</div>
</div>
<div>
<div class="mb-2 flex items-center gap-2">
<label for="select_country_input_billing_modal" class="block text-sm font-medium text-gray-900 dark:text-white"> Country* </label>
</div>
<select id="select_country_input_billing_modal" class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder:text-gray-400 dark:focus:border-primary-500 dark:focus:ring-primary-500">
<option selected>United States</option>
<option value="AS">Australia</option>
<option value="FR">France</option>
<option value="ES">Spain</option>
<option value="UK">United Kingdom</option>
</select>
</div>
<div>
<div class="mb-2 flex items-center gap-2">
<label for="select_city_input_billing_modal" class="block text-sm font-medium text-gray-900 dark:text-white"> City* </label>
</div>
<select id="select_city_input_billing_modal" class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder:text-gray-400 dark:focus:border-primary-500 dark:focus:ring-primary-500">
<option selected>San Francisco</option>
<option value="NY">New York</option>
<option value="LA">Los Angeles</option>
<option value="CH">Chicago</option>
<option value="HU">Houston</option>
</select>
</div>
<div class="sm:col-span-2">
<label for="address_billing_modal" class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"> Shipping Address* </label>
<textarea id="address_billing_modal" rows="4" class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder:text-gray-400 dark:focus:border-primary-500 dark:focus:ring-primary-500" placeholder="Enter here your address"></textarea>
</div>
</div>
<div class="border-t border-gray-200 pt-4 dark:border-gray-700 md:pt-5">
<button type="submit" class="me-2 inline-flex items-center rounded-lg bg-primary-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-primary-800 focus:outline-none focus:ring-4 focus:ring-primary-300 dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800">Save information</button>
<button type="button" data-modal-toggle="billingInformationModal" class="me-2 rounded-lg border border-gray-200 bg-white px-5 py-2.5 text-sm font-medium text-gray-900 hover:bg-gray-100 hover:text-primary-700 focus:z-10 focus:outline-none focus:ring-4 focus:ring-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white dark:focus:ring-gray-700">Cancel</button>
</div>
</form>
</div>
</div>
</div>
{{ template "footer.html" . }}