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 b42edc6..86e2d06 100644 --- a/api/send_mail.php +++ b/api/send_mail.php @@ -18,7 +18,7 @@ function sendEmail($toEmail, $toName, $subject, $body, $from = 'ordini') { $mail->SMTPSecure = "ssl"; $mail->Port = 465; - $mail->setFrom($from.'@iolovolio.com', 'IoLovOlio'); + $mail->setFrom('ordini@iolovolio.com', 'IoLovOlio'); $mail->addAddress(trim($toEmail), "$toName"); $mail->isHTML(true); diff --git a/components/checkout/checkout.js b/components/checkout/checkout.js index eeb7e7a..bcd9bba 100644 --- a/components/checkout/checkout.js +++ b/components/checkout/checkout.js @@ -187,6 +187,13 @@ $(document).ready( () => { onApprove: (data, actions) => { return actions.order.capture().then( (details) => { console.log('Transaction completed by ', details, `${ENV.PP_RETURN}?token=${data.orderID}`) + sessionStorage.setItem('order', JSON.stringify({ + profile: profile, + cartItems: cartItems, + token: data.orderID, + uid: uid, + amount: amount + })) window.location = `${ENV.PP_RETURN}?token=${data.orderID}` }) } diff --git a/components/passwordRecovery/passwordRecovery.html b/components/passwordRecovery/passwordRecovery.html index aec3ae0..b8976da 100644 --- a/components/passwordRecovery/passwordRecovery.html +++ b/components/passwordRecovery/passwordRecovery.html @@ -8,7 +8,7 @@ $query = "SELECT * FROM `users` WHERE email = '".trim($_POST['reset_usr'])."'"; $q = mysqli_query($conn, $query); if(mysqli_affected_rows($conn)) { - $new_password = base_convert(date('Y-m-d H:i:s'), 10, 36); + $new_password = base_convert(date('Y-m-d H:i:s'), 10, 36).rand(1,99)."+"; $user = mysqli_fetch_array($q); $query = "UPDATE `users` SET `password` = '".md5($new_password)."' WHERE id = '".$user['id']."'"; 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; + } }