Commit c8c6308b authored by Malcolm Blaney's avatar Malcolm Blaney

Fixed some formatting problems.

parent b20fd401
Pipeline #4603196 failed with stage
in 1 minute and 53 seconds
......@@ -355,10 +355,10 @@ class Cart extends Base {
'"cart-display-item","","<h2>!name</h2><img src="!image">'.
'!description',
'"cart-email","","To !first !last<br>Thank you for your '.
'order!The following is a confirmation of your order and'.
'contact details:<br><br>Items: !items<br>Total: $!amount'.
'<br><br>Email: !email<br>Address:<br>!address<br>!city<br>'.
'!postcode<br>!state<br>!country<br><br>"'];
'order!The following is a confirmation of your purchases '.
'and contact details:<br><br>Items: !items<br><b>Total: '.
'$!amount</b><br><br>Email: !email<br>Address:<br>!address'.
'<br>!city<br>!postcode<br>!state<br>!country<br><br>"'];
$this->AddTemplate($template);
$site_style = ['"","#cart-summary","margin-bottom","40px"',
......@@ -633,13 +633,13 @@ class Cart extends Base {
'Thanks for your purchase!<br>'.
'For your reference, the order number is: '.$order_id.'<br><br>'.
'<button>dismiss</button></div>';
$this->SendEmail('Confirmation of order number '.$order_id,
$this->SendEmail('Confirmation for order number '.$order_id,
$message.'Payment made using PayPal.', $email);
}
else if ($_GET['payment'] === 'credit') {
$gateway = $this->Gateway('credit');
if ($gateway === true) {
$this->SendEmail('Confirmation of order number '.$order_id,
$this->SendEmail('Confirmation for order number '.$order_id,
$message.'Payment made using Credit Card.', $email);
$gateway = 'Thanks your payment has been processed.';
}
......@@ -996,12 +996,11 @@ class Cart extends Base {
'/!country/'];
$replacements = [$items, $amount, $first, $last, $email, $address,
$postcode, $city, $state, $country];
$email_text =
$mysqli->escape_string($this->Substitute('cart-email', $patterns,
$replacements));
$us_email_text = $this->Substitute('cart-email', $patterns, $replacements);
$query = 'INSERT INTO cart_order (user, email, description, method, '.
'timestamp) VALUES ("'.$this->owner.'", "'.$email.'", '.
'"'.$email_text.'", "'.$method.'", '.time().')';
'"'.$mysqli->escape_string($us_email_text).'", "'.$method.'", '.
time().')';
if (!$mysqli->query($query)) {
$this->Log('Cart->Payment 3: '.$mysqli->error);
}
......@@ -1015,9 +1014,9 @@ class Cart extends Base {
if ($method === 'pickup') {
$order_id = $_SESSION['cart-order-id'];
$this->SendEmail('Confirmation of order number '.$order_id, $email_text.
'Your order will be available to pick up from: '.
$description, $email);
$this->SendEmail('Confirmation for order number '.$order_id,
$us_email_text.'Your order will be available to pick '.
'up from: '.$description, $email);
return $order_id;
}
if ($method === 'paypal') {
......
......@@ -350,9 +350,10 @@ $us_description =
"the following to show where items will be sent: !first, !last, ".
"!address, !postcode, !city, !state, !country, !description.",
"cart-email" => "The full text of the email that will be sent to the ".
"site owner when a purchase has been processed. Substitutes: !host, ".
"!items, !amount, !first, !last, !email, !address, !postcode, ".
"!city, !state, !country, !description.",
"customer, confirming their order. It will also be sent to the admin ".
"email address set in the cart checkout settings. Substitutes: !items, ".
"!amount, !first, !last, !email, !address, !postcode, !city, !state, ".
"!country.",
"cart-description-label" => "A label for the input option set in ".
"the 'cart-description-input' template.",
"cart-description-input" => "A configurable input option added to ".
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment