diff --git a/api/order_add.php b/api/order_add.php index d456cac..a41a788 100644 --- a/api/order_add.php +++ b/api/order_add.php @@ -61,11 +61,11 @@ if($stmt->execute()) { PRODOTTI ORDINATI:
"; - $body .= ' - Prodotto + $body .= ' + Prodotto Prezzo Quantità - Totale + Totale '; foreach($data->cart as $item) { @@ -74,8 +74,8 @@ if($stmt->execute()) { $stmtp->execute(); $p = $stmtp->fetch(PDO::FETCH_ASSOC); - $body .= ' - '.$p['name'].'
+ $body .= ' + '.$p['name'].'
'.$p['type'].' '.money_format('%.2n', $item->price).' '.$item->qty.' @@ -88,7 +88,7 @@ if($stmt->execute()) { $body .= emailFooter(); - $sent = sendEmail($toEmail, $toName, $subject, $body); + $sent = sendEmail($toEmail, $toName, $subject, $body, 'ordini'); if($sent === true) { http_response_code(200); echo json_encode( diff --git a/api/send_mail.php b/api/send_mail.php index 20b9121..86e2d06 100644 --- a/api/send_mail.php +++ b/api/send_mail.php @@ -4,7 +4,7 @@ use PHPMailer\PHPMailer\SMTP; use PHPMailer\PHPMailer\Exception; require 'vendor/autoload.php'; -function sendEmail($toEmail, $toName, $subject, $body) { +function sendEmail($toEmail, $toName, $subject, $body, $from = 'ordini') { $mail = new PHPMailer(true); diff --git a/api/user_add.php b/api/user_add.php index a550f7f..ca588e2 100644 --- a/api/user_add.php +++ b/api/user_add.php @@ -19,7 +19,6 @@ $data = json_decode(file_get_contents("php://input")); $query = "SELECT * FROM `users` WHERE email = '".trim($data->email)."'"; $stmt = $conn->prepare($query); - $toEmail = trim($data->email); $toName = trim($data->first_name)." ".trim($data->last_name); $subject = 'Iolovolio - Registrazione'; @@ -50,7 +49,7 @@ if($stmt->execute()) { )); } else { - $sent = sendEmail($toEmail, $toName, $subject, $body); + $sent = sendEmail($toEmail, $toName, $subject, $body, 'noreply'); if($sent === true) { $query = "INSERT INTO `users` diff --git a/components/account/account.html b/components/account/account.html index e26b4a6..72c914b 100644 --- a/components/account/account.html +++ b/components/account/account.html @@ -57,7 +57,7 @@
Sei già registrato? - + diff --git a/components/passwordRecovery/passwordRecovery.js b/components/passwordRecovery/passwordRecovery.js new file mode 100644 index 0000000..f8fff3f --- /dev/null +++ b/components/passwordRecovery/passwordRecovery.js @@ -0,0 +1,5 @@ + +$(document).ready( () => { + console.log('Load component - passwordRecovery') + +}) \ No newline at end of file diff --git a/components/passwordRecovery/passwordRecovery.scss b/components/passwordRecovery/passwordRecovery.scss new file mode 100644 index 0000000..cc15e2f --- /dev/null +++ b/components/passwordRecovery/passwordRecovery.scss @@ -0,0 +1,60 @@ +@import "../../src/scss/variables.scss"; +@import "../../src/scss/mixins.scss"; + +.component-passwordRecovery { + padding: 10px 0 40px 0; + min-height: 100vh; + + .message { + color: $white; + background: $brown; + padding: 10px; + margin-bottom: 20px; + @include font-style($font-sans, 'regular', $font-12); + animation: blinker 2s linear 1; + } + + .content { + + .title { + display: block; + @include font-style($font-serif, 400, $font-32); + color: $black; + height: 50px; + } + + .subtitle { + display: block; + @include font-style($font-sans, 700, $font-16); + color: $gray; + height: 40px; + } + + .label { + display: block; + @include font-style($font-sans, 700, $font-16); + color: $gray; + padding: 15px 0 5px 0; + } + + .errors { + display: block; + @include font-style($font-sans, 700, $font-16); + color: $red; + padding: 15px 0 5px 0; + } + + .input { + max-width: 400px; + &.error { + border: 1px solid $red; + } + } + + .submit { + @include font-style($font-serif, 700, $font-16); + } + } +} + + diff --git a/components/sectionHeader/sectionHeader.html b/components/sectionHeader/sectionHeader.html index c5e6794..385a2a5 100644 --- a/components/sectionHeader/sectionHeader.html +++ b/components/sectionHeader/sectionHeader.html @@ -16,6 +16,9 @@ case 'account': $section_label = 'account'; break; + case 'recupera-password': + $section_label = 'recupera password'; + break; case 'acquistare': case 'carrello': case 'checkout': diff --git a/components/thankyou/thankyou.html b/components/thankyou/thankyou.html index 17147a1..5428a57 100644 --- a/components/thankyou/thankyou.html +++ b/components/thankyou/thankyou.html @@ -12,6 +12,13 @@ L'ordine è andato a buon fine. Riceverai un'e-mail all'indirizzo indicato con i dettagli dell'ordine.
Ti ringraziamo per aver acquistato su iolovolio.it + + Vai ai tuoi ordini +
diff --git a/components/thankyou/thankyou.scss b/components/thankyou/thankyou.scss index fa5b363..4e5a929 100644 --- a/components/thankyou/thankyou.scss +++ b/components/thankyou/thankyou.scss @@ -9,4 +9,8 @@ @include font-style($font-sans, 400, $font-18); color: $gray; } + + .goto { + display: inline-block; + } } diff --git a/pages/recupera-password.ejs b/pages/recupera-password.ejs new file mode 100644 index 0000000..1e1f914 --- /dev/null +++ b/pages/recupera-password.ejs @@ -0,0 +1,2 @@ + +${require('../components/passwordRecovery/passwordRecovery.html')} diff --git a/src/scss/main.scss b/src/scss/main.scss index 7589adb..9a09b6e 100644 --- a/src/scss/main.scss +++ b/src/scss/main.scss @@ -25,3 +25,4 @@ @import "./components/checkout/checkout.scss"; @import "./components/thankyou/thankyou.scss"; @import "./components/account/account.scss"; +@import "./components/passwordRecovery/passwordRecovery.scss";