//added russian installer and changed english strings
This commit is contained in:
@@ -123,11 +123,11 @@ class AddressControllerCore extends FrontController
|
||||
|
||||
// Check page token
|
||||
if ($this->context->customer->isLogged() && !$this->isTokenValid())
|
||||
$this->errors[] = Tools::displayError('Invalid token');
|
||||
$this->errors[] = Tools::displayError('Invalid token.');
|
||||
|
||||
// Check phone
|
||||
if (Configuration::get('PS_ONE_PHONE_AT_LEAST') && !Tools::getValue('phone') && !Tools::getValue('phone_mobile'))
|
||||
$this->errors[] = Tools::displayError('You must register at least one phone number');
|
||||
$this->errors[] = Tools::displayError('You must register at least one phone number.');
|
||||
if ($address->id_country)
|
||||
{
|
||||
// Check country
|
||||
@@ -135,7 +135,7 @@ class AddressControllerCore extends FrontController
|
||||
throw new PrestaShopException('Country cannot be loaded with address->id_country');
|
||||
|
||||
if ((int)$country->contains_states && !(int)$address->id_state)
|
||||
$this->errors[] = Tools::displayError('This country requires a state selection.');
|
||||
$this->errors[] = Tools::displayError('This country requires you to chose a State.');
|
||||
|
||||
// US customer: normalize the address
|
||||
if ($address->id_country == Country::getByIso('US'))
|
||||
@@ -154,22 +154,22 @@ class AddressControllerCore extends FrontController
|
||||
{
|
||||
if (!$country->checkZipCode($postcode))
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('Zip/Postal code is invalid. Must be typed as follows: %s'),
|
||||
Tools::displayError('The Zip/Postal code you\'ve entered is invalid. It must follow this format: %s'),
|
||||
str_replace('C', $country->iso_code, str_replace('N', '0', str_replace('L', 'A', $country->zip_code_format)))
|
||||
);
|
||||
}
|
||||
else if ($zip_code_format)
|
||||
$this->errors[] = Tools::displayError('Zip/Postal code is required.');
|
||||
$this->errors[] = Tools::displayError('A Zip / Postal code is required.');
|
||||
else if ($postcode && !preg_match('/^[0-9a-zA-Z -]{4,9}$/ui', $postcode))
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('Zip/Postal code is invalid. Must be typed as follows: %s'),
|
||||
Tools::displayError('The Zip/Postal code you\'ve entered is invalid. It must follow this format: %s'),
|
||||
str_replace('C', $country->iso_code, str_replace('N', '0', str_replace('L', 'A', $country->zip_code_format)))
|
||||
);
|
||||
}
|
||||
|
||||
// Check country DNI
|
||||
if ($country->isNeedDni() && (!Tools::getValue('dni') || !Validate::isDniLite(Tools::getValue('dni'))))
|
||||
$this->errors[] = Tools::displayError('Identification number is incorrect or has already been used.');
|
||||
$this->errors[] = Tools::displayError('The identification number is incorrect or has already been used.');
|
||||
else if (!$country->isNeedDni())
|
||||
$address->dni = null;
|
||||
}
|
||||
@@ -187,7 +187,7 @@ class AddressControllerCore extends FrontController
|
||||
AND id_address != '.(int)$id_address.'
|
||||
AND id_customer = '.(int)$this->context->customer->id.'
|
||||
AND deleted = 0') > 0)
|
||||
$this->errors[] = sprintf(Tools::displayError('The alias "%s" is already used, please chose another one.'), Tools::safeOutput($_POST['alias']));
|
||||
$this->errors[] = sprintf(Tools::displayError('The alias "%s" has already been used. Please select another one.'), Tools::safeOutput($_POST['alias']));
|
||||
}
|
||||
|
||||
// Check the requires fields which are settings in the BO
|
||||
|
||||
@@ -50,7 +50,7 @@ class AddressesControllerCore extends FrontController
|
||||
parent::init();
|
||||
|
||||
if (!Validate::isLoadedObject($this->context->customer))
|
||||
die(Tools::displayError('Customer not found'));
|
||||
die(Tools::displayError('The customer could not be found.'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -266,19 +266,19 @@ class AuthControllerCore extends FrontController
|
||||
$passwd = trim(Tools::getValue('passwd'));
|
||||
$email = trim(Tools::getValue('email'));
|
||||
if (empty($email))
|
||||
$this->errors[] = Tools::displayError('E-mail address required');
|
||||
$this->errors[] = Tools::displayError('An email address required.');
|
||||
elseif (!Validate::isEmail($email))
|
||||
$this->errors[] = Tools::displayError('Invalid e-mail address');
|
||||
$this->errors[] = Tools::displayError('Invalid email address.');
|
||||
elseif (empty($passwd))
|
||||
$this->errors[] = Tools::displayError('Password is required');
|
||||
$this->errors[] = Tools::displayError('Password is required.');
|
||||
elseif (!Validate::isPasswd($passwd))
|
||||
$this->errors[] = Tools::displayError('Invalid password');
|
||||
$this->errors[] = Tools::displayError('Invalid password.');
|
||||
else
|
||||
{
|
||||
$customer = new Customer();
|
||||
$authentication = $customer->getByEmail(trim($email), trim($passwd));
|
||||
if (!$authentication || !$customer->id)
|
||||
$this->errors[] = Tools::displayError('Authentication failed');
|
||||
$this->errors[] = Tools::displayError('Authentication failed.');
|
||||
else
|
||||
{
|
||||
$this->context->cookie->id_compare = isset($this->context->cookie->id_compare) ? $this->context->cookie->id_compare: CompareProduct::getIdCompareByIdCustomer($customer->id);
|
||||
@@ -368,7 +368,7 @@ class AuthControllerCore extends FrontController
|
||||
$this->context->smarty->assign('email_create', 1);
|
||||
// New Guest customer
|
||||
if (!Tools::getValue('is_new_customer', 1) && !Configuration::get('PS_GUEST_CHECKOUT_ENABLED'))
|
||||
$this->errors[] = Tools::displayError('You cannot create a guest account.');
|
||||
$this->errors[] = Tools::displayError('You cannot create a guest account..');
|
||||
if (!Tools::getValue('is_new_customer', 1))
|
||||
$_POST['passwd'] = md5(time()._COOKIE_KEY_);
|
||||
if (isset($_POST['guest_email']) && $_POST['guest_email'])
|
||||
@@ -376,7 +376,7 @@ class AuthControllerCore extends FrontController
|
||||
// Checked the user address in case he changed his email address
|
||||
if (Validate::isEmail($email = Tools::getValue('email')) && !empty($email))
|
||||
if (Customer::customerExists($email))
|
||||
$this->errors[] = Tools::displayError('An account is already registered with this e-mail.', false);
|
||||
$this->errors[] = Tools::displayError('An account using this email address has already been registered.', false);
|
||||
// Preparing customer
|
||||
$customer = new Customer();
|
||||
$_POST['lastname'] = Tools::getValue('customer_lastname');
|
||||
@@ -400,7 +400,7 @@ class AuthControllerCore extends FrontController
|
||||
}
|
||||
|
||||
if ($error_phone)
|
||||
$this->errors[] = Tools::displayError('You must register at least one phone number');
|
||||
$this->errors[] = Tools::displayError('You must register at least one phone number.');
|
||||
|
||||
$this->errors = array_unique(array_merge($this->errors, $customer->validateController()));
|
||||
|
||||
@@ -416,7 +416,7 @@ class AuthControllerCore extends FrontController
|
||||
|
||||
$customer->birthday = (empty($_POST['years']) ? '' : (int)$_POST['years'].'-'.(int)$_POST['months'].'-'.(int)$_POST['days']);
|
||||
if (!Validate::isBirthDate($customer->birthday))
|
||||
$this->errors[] = Tools::displayError('Invalid birthday.');
|
||||
$this->errors[] = Tools::displayError('Invalid date of birth.');
|
||||
|
||||
// New Guest customer
|
||||
$customer->is_guest = (Tools::isSubmit('is_new_customer') ? !Tools::getValue('is_new_customer', 1) : 0);
|
||||
@@ -428,7 +428,7 @@ class AuthControllerCore extends FrontController
|
||||
{
|
||||
if (!$customer->is_guest)
|
||||
if (!$this->sendConfirmationMail($customer))
|
||||
$this->errors[] = Tools::displayError('Cannot send e-mail');
|
||||
$this->errors[] = Tools::displayError('The email cannot be sent.');
|
||||
|
||||
$this->updateContext($customer);
|
||||
|
||||
@@ -461,7 +461,7 @@ class AuthControllerCore extends FrontController
|
||||
Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? url_encode($this->authRedirection) : 'my-account'));
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred while creating your account.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while creating your account..');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,18 +493,18 @@ class AuthControllerCore extends FrontController
|
||||
{
|
||||
if (!$country->checkZipCode($postcode))
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('Zip/Postal code is invalid. Must be typed as follows: %s'),
|
||||
Tools::displayError('The Zip/Postal code you\'ve entered is invalid. It must follow this format: %s'),
|
||||
str_replace('C', $country->iso_code, str_replace('N', '0', str_replace('L', 'A', $country->zip_code_format)))
|
||||
);
|
||||
}
|
||||
elseif ($country->zip_code_format)
|
||||
$this->errors[] = Tools::displayError('Zip/Postal code is required.');
|
||||
$this->errors[] = Tools::displayError('A Zip / Postal code is required.');
|
||||
elseif ($postcode && !preg_match('/^[0-9a-zA-Z -]{4,9}$/ui', $postcode))
|
||||
$this->errors[] = Tools::displayError('Zip/Postal code is invalid.');
|
||||
$this->errors[] = Tools::displayError('The Zip / Postal code is invalid.');
|
||||
}
|
||||
|
||||
if ($country->need_identification_number && (!Tools::getValue('dni') || !Validate::isDniLite(Tools::getValue('dni'))))
|
||||
$this->errors[] = Tools::displayError('Identification number is incorrect or has already been used.');
|
||||
$this->errors[] = Tools::displayError('The identification number is incorrect or has already been used.');
|
||||
elseif (!$country->need_identification_number)
|
||||
$address->dni = null;
|
||||
}
|
||||
@@ -515,13 +515,13 @@ class AuthControllerCore extends FrontController
|
||||
if (!count($this->errors))
|
||||
{
|
||||
if (Customer::customerExists(Tools::getValue('email')))
|
||||
$this->errors[] = Tools::displayError('An account is already registered with this e-mail, please enter your password or request a new one.', false);
|
||||
$this->errors[] = Tools::displayError('An account using this email address has already been registered. Please enter a valid password or request a new one. ', false);
|
||||
if (Tools::isSubmit('newsletter'))
|
||||
$this->processCustomerNewsletter($customer);
|
||||
|
||||
$customer->birthday = (empty($_POST['years']) ? '' : (int)$_POST['years'].'-'.(int)$_POST['months'].'-'.(int)$_POST['days']);
|
||||
if (!Validate::isBirthDate($customer->birthday))
|
||||
$this->errors[] = Tools::displayError('Invalid birthday.');
|
||||
$this->errors[] = Tools::displayError('Invalid date of birth');
|
||||
|
||||
if (!count($this->errors))
|
||||
{
|
||||
@@ -532,7 +532,7 @@ class AuthControllerCore extends FrontController
|
||||
$contains_state = isset($country) && is_object($country) ? (int)$country->contains_states: 0;
|
||||
$id_state = isset($address) && is_object($address) ? (int)$address->id_state: 0;
|
||||
if (Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && $contains_state && !$id_state)
|
||||
$this->errors[] = Tools::displayError('This country requires a state selection.');
|
||||
$this->errors[] = Tools::displayError('This country requires you to chose a State.');
|
||||
else
|
||||
{
|
||||
$customer->active = 1;
|
||||
@@ -542,7 +542,7 @@ class AuthControllerCore extends FrontController
|
||||
else
|
||||
$customer->is_guest = 0;
|
||||
if (!$customer->add())
|
||||
$this->errors[] = Tools::displayError('An error occurred while creating your account.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while creating your account..');
|
||||
else
|
||||
{
|
||||
$address->id_customer = (int)$customer->id;
|
||||
@@ -558,7 +558,7 @@ class AuthControllerCore extends FrontController
|
||||
// we add the guest customer in the default customer group
|
||||
$customer->addGroups(array((int)Configuration::get('PS_CUSTOMER_GROUP')));
|
||||
if (!$this->sendConfirmationMail($customer))
|
||||
$this->errors[] = Tools::displayError('Cannot send e-mail');
|
||||
$this->errors[] = Tools::displayError('The email cannot be sent.');
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -640,10 +640,10 @@ class AuthControllerCore extends FrontController
|
||||
protected function processSubmitCreate()
|
||||
{
|
||||
if (!Validate::isEmail($email = Tools::getValue('email_create')) || empty($email))
|
||||
$this->errors[] = Tools::displayError('Invalid e-mail address');
|
||||
$this->errors[] = Tools::displayError('Invalid email address.');
|
||||
elseif (Customer::customerExists($email))
|
||||
{
|
||||
$this->errors[] = Tools::displayError('An account is already registered with this e-mail, please enter your password or request a new one.', false);
|
||||
$this->errors[] = Tools::displayError('An account using this email address has already been registered. Please enter a valid password or request a new one. ', false);
|
||||
$_POST['email'] = $_POST['email_create'];
|
||||
unset($_POST['email_create']);
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ class CartControllerCore extends FrontController
|
||||
if (!count(Carrier::getAvailableCarrierList(new Product($this->id_product), null, $new_id_address_delivery)))
|
||||
die(Tools::jsonEncode(array(
|
||||
'hasErrors' => true,
|
||||
'error' => Tools::displayError('It\'s not possible to deliver this product to the selected address.', false),
|
||||
'error' => Tools::displayError('It is not possible to deliver this product to the selected address.', false),
|
||||
)));
|
||||
|
||||
$this->context->cart->setProductAddressDelivery(
|
||||
@@ -177,14 +177,14 @@ class CartControllerCore extends FrontController
|
||||
$mode = (Tools::getIsset('update') && $this->id_product) ? 'update' : 'add';
|
||||
|
||||
if ($this->qty == 0)
|
||||
$this->errors[] = Tools::displayError('Null quantity');
|
||||
$this->errors[] = Tools::displayError('Null quantity.');
|
||||
else if (!$this->id_product)
|
||||
$this->errors[] = Tools::displayError('Product not found');
|
||||
|
||||
$product = new Product($this->id_product, true, $this->context->language->id);
|
||||
if (!$product->id || !$product->active)
|
||||
{
|
||||
$this->errors[] = Tools::displayError('Product is no longer available.', false);
|
||||
$this->errors[] = Tools::displayError('This product is no longer available.', false);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ class CartControllerCore extends FrontController
|
||||
if ($this->id_product_attribute)
|
||||
{
|
||||
if (!Product::isAvailableWhenOutOfStock($product->out_of_stock) && !Attribute::checkAttributeQty($this->id_product_attribute, $this->qty))
|
||||
$this->errors[] = Tools::displayError('There is not enough product in stock.');
|
||||
$this->errors[] = Tools::displayError('There isn\'t enough product in stock.');
|
||||
}
|
||||
else if ($product->hasAttributes())
|
||||
{
|
||||
@@ -202,10 +202,10 @@ class CartControllerCore extends FrontController
|
||||
if (!$this->id_product_attribute)
|
||||
Tools::redirectAdmin($this->context->link->getProductLink($product));
|
||||
else if (!Product::isAvailableWhenOutOfStock($product->out_of_stock) && !Attribute::checkAttributeQty($this->id_product_attribute, $this->qty))
|
||||
$this->errors[] = Tools::displayError('There is not enough product in stock.');
|
||||
$this->errors[] = Tools::displayError('There isn\'t enough product in stock.');
|
||||
}
|
||||
else if (!$product->checkQty($this->qty))
|
||||
$this->errors[] = Tools::displayError('There is not enough product in stock.');
|
||||
$this->errors[] = Tools::displayError('There isn\'t enough product in stock.');
|
||||
|
||||
// If no errors, process product addition
|
||||
if (!$this->errors && $mode == 'add')
|
||||
@@ -225,7 +225,7 @@ class CartControllerCore extends FrontController
|
||||
|
||||
// Check customizable fields
|
||||
if (!$product->hasAllRequiredCustomizableFields() && !$this->customization_id)
|
||||
$this->errors[] = Tools::displayError('Please fill in all required fields, then save the customization.');
|
||||
$this->errors[] = Tools::displayError('Please fill in all of the required fields, and then save your customizations.');
|
||||
|
||||
if (!$this->errors)
|
||||
{
|
||||
|
||||
@@ -48,15 +48,15 @@ class ContactControllerCore extends FrontController
|
||||
}
|
||||
$message = Tools::getValue('message'); // Html entities is not usefull, iscleanHtml check there is no bad html tags.
|
||||
if (!($from = trim(Tools::getValue('from'))) || !Validate::isEmail($from))
|
||||
$this->errors[] = Tools::displayError('Invalid e-mail address');
|
||||
$this->errors[] = Tools::displayError('Invalid email address.');
|
||||
else if (!$message)
|
||||
$this->errors[] = Tools::displayError('Message cannot be blank');
|
||||
$this->errors[] = Tools::displayError('The message cannot be blank.');
|
||||
else if (!Validate::isCleanHtml($message))
|
||||
$this->errors[] = Tools::displayError('Invalid message');
|
||||
else if (!($id_contact = (int)(Tools::getValue('id_contact'))) || !(Validate::isLoadedObject($contact = new Contact($id_contact, $this->context->language->id))))
|
||||
$this->errors[] = Tools::displayError('Please select a subject from the list.');
|
||||
$this->errors[] = Tools::displayError('Please select a subject from the list provided. ');
|
||||
else if (!empty($_FILES['fileUpload']['name']) && $_FILES['fileUpload']['error'] != 0)
|
||||
$this->errors[] = Tools::displayError('An error occurred during the file upload');
|
||||
$this->errors[] = Tools::displayError('An error occurred during the file-upload process.');
|
||||
else if (!empty($_FILES['fileUpload']['name']) && !in_array(substr($_FILES['fileUpload']['name'], -4), $extension) && !in_array(substr($_FILES['fileUpload']['name'], -5), $extension))
|
||||
$this->errors[] = Tools::displayError('Bad file extension');
|
||||
else
|
||||
@@ -157,10 +157,10 @@ class ContactControllerCore extends FrontController
|
||||
$cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']);
|
||||
$cm->user_agent = $_SERVER['HTTP_USER_AGENT'];
|
||||
if (!$cm->add())
|
||||
$this->errors[] = Tools::displayError('An error occurred while sending message.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while sending the message.');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred while sending message.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while sending the message.');
|
||||
}
|
||||
|
||||
if (!count($this->errors))
|
||||
@@ -201,7 +201,7 @@ class ContactControllerCore extends FrontController
|
||||
$var_list, $contact->email, $contact->name, $from, ($customer->id ? $customer->firstname.' '.$customer->lastname : ''),
|
||||
$fileAttachment) ||
|
||||
!Mail::Send($this->context->language->id, 'contact_form', $subject, $var_list, $from, null, $contact->email, $contact->name, $fileAttachment))
|
||||
$this->errors[] = Tools::displayError('An error occurred while sending message.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while sending the message.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -296,8 +296,8 @@ class GetFileControllerCore extends FrontController
|
||||
'This file no longer exists.' => Tools::displayError('This file no longer exists.'),
|
||||
'This product has been refunded.' => Tools::displayError('This product has been refunded.'),
|
||||
'The product deadline is in the past.' => Tools::displayError('The product deadline is in the past.'),
|
||||
'Expiration date exceeded' => Tools::displayError('Expiration date has passed, you cannot download this product'),
|
||||
'You have reached the maximum number of allowed downloads.' => Tools::displayError('You have reached the maximum number of allowed downloads.'));
|
||||
'Expiration date exceeded' => Tools::displayError('The product expiration date has passed, preventing you from download this product.'),
|
||||
'You have reached the maximum number of allowed downloads.' => Tools::displayError('You have reached the maximum number of downloads allowed.'));
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
@@ -73,23 +73,23 @@ class GuestTrackingControllerCore extends FrontController
|
||||
$email = Tools::getValue('email');
|
||||
|
||||
if (empty($order_reference) && empty($id_order))
|
||||
$this->errors[] = Tools::displayError('Please provide your Order Reference');
|
||||
$this->errors[] = Tools::displayError('Please provide your order\'s reference number.');
|
||||
else if (empty($email))
|
||||
$this->errors[] = Tools::displayError('Please provide your e-mail address');
|
||||
$this->errors[] = Tools::displayError('Please provide a valid email address.');
|
||||
else if (!Validate::isEmail($email))
|
||||
$this->errors[] = Tools::displayError('Please provide a valid e-mail address');
|
||||
$this->errors[] = Tools::displayError('Please provide a valid email address.');
|
||||
else if (!Customer::customerExists($email, false, false))
|
||||
$this->errors[] = Tools::displayError('There is no account associated with this e-mail address');
|
||||
$this->errors[] = Tools::displayError('There is no account associated with this email address.');
|
||||
else if (Customer::customerExists($email, false, true))
|
||||
{
|
||||
$this->errors[] = Tools::displayError('Your guest account has already been transformed into a customer account.').' '.
|
||||
Tools::displayError('Please login to your customer account to view this order, this section is reserved for guest accounts');
|
||||
Tools::displayError('Please login to your customer account to view this order. This section is reserved for guest accounts.');
|
||||
$this->context->smarty->assign('show_login_link', true);
|
||||
}
|
||||
else if (!count($order_collection))
|
||||
$this->errors[] = Tools::displayError('Invalid Order Reference');
|
||||
$this->errors[] = Tools::displayError('Invalid order reference');
|
||||
else if (!$order_collection->getFirst()->isAssociatedAtGuest($email))
|
||||
$this->errors[] = Tools::displayError('Invalid Order Reference');
|
||||
$this->errors[] = Tools::displayError('Invalid order reference');
|
||||
else
|
||||
{
|
||||
$this->assignOrderTracking($order_collection);
|
||||
@@ -99,10 +99,10 @@ class GuestTrackingControllerCore extends FrontController
|
||||
if (!Validate::isLoadedObject($customer))
|
||||
$this->errors[] = Tools::displayError('Invalid customer');
|
||||
else if (!Tools::getValue('password'))
|
||||
$this->errors[] = Tools::displayError('Invalid password');
|
||||
$this->errors[] = Tools::displayError('Invalid password.');
|
||||
else if (!$customer->transformToCustomer($this->context->language->id, Tools::getValue('password')))
|
||||
// @todo clarify error message
|
||||
$this->errors[] = Tools::displayError('An error occurred while transforming guest to customer.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while transforming a guest into a registered customer.');
|
||||
else
|
||||
$this->context->smarty->assign('transformSuccess', true);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class IdentityControllerCore extends FrontController
|
||||
{
|
||||
if (!@checkdate(Tools::getValue('months'), Tools::getValue('days'), Tools::getValue('years')) &&
|
||||
!(Tools::getValue('months') == '' && Tools::getValue('days') == '' && Tools::getValue('years') == ''))
|
||||
$this->errors[] = Tools::displayError('Invalid date of birth');
|
||||
$this->errors[] = Tools::displayError('Invalid date of birth.');
|
||||
else
|
||||
{
|
||||
$email = trim(Tools::getValue('email'));
|
||||
@@ -60,13 +60,13 @@ class IdentityControllerCore extends FrontController
|
||||
$_POST['old_passwd'] = trim($_POST['old_passwd']);
|
||||
|
||||
if (!Validate::isEmail($email))
|
||||
$this->errors[] = Tools::displayError('This e-mail address is not valid');
|
||||
$this->errors[] = Tools::displayError('This email address is not valid');
|
||||
elseif ($this->customer->email != $email && Customer::customerExists($email, true))
|
||||
$this->errors[] = Tools::displayError('An account is already registered with this e-mail.');
|
||||
$this->errors[] = Tools::displayError('An account using this email address has already been registered.');
|
||||
elseif (empty($_POST['old_passwd']) || (Tools::encrypt($_POST['old_passwd']) != $this->context->cookie->passwd))
|
||||
$this->errors[] = Tools::displayError('Your password is incorrect.');
|
||||
$this->errors[] = Tools::displayError('The password you entered is incorrect.');
|
||||
elseif ($_POST['passwd'] != $_POST['confirmation'])
|
||||
$this->errors[] = Tools::displayError('Password and confirmation do not match');
|
||||
$this->errors[] = Tools::displayError('The password and confirmation do not match.');
|
||||
else
|
||||
{
|
||||
$prev_id_default_group = $this->customer->id_default_group;
|
||||
@@ -98,7 +98,7 @@ class IdentityControllerCore extends FrontController
|
||||
$this->context->smarty->assign('confirmation', 1);
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('Cannot update information');
|
||||
$this->errors[] = Tools::displayError('The information cannot be updated.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ class ManufacturerControllerCore extends FrontController
|
||||
{
|
||||
header('HTTP/1.1 404 Not Found');
|
||||
header('Status: 404 Not Found');
|
||||
$this->errors[] = Tools::displayError('Manufacturer does not exist.');
|
||||
$this->errors[] = Tools::displayError('The manufacturer does not exist.');
|
||||
}
|
||||
else
|
||||
$this->canonicalRedirection();
|
||||
|
||||
@@ -46,7 +46,7 @@ class OrderControllerCore extends ParentOrderController
|
||||
if (!$this->context->cart->checkQuantities())
|
||||
{
|
||||
$this->step = 0;
|
||||
$this->errors[] = Tools::displayError('An item in your cart is no longer available in this quantity, you cannot proceed with your order.');
|
||||
$this->errors[] = Tools::displayError('An item in your cart is no longer available in this quantity. You cannot proceed with your order until the quantity is adjusted.');
|
||||
}
|
||||
|
||||
// Check minimal amount
|
||||
|
||||
@@ -53,11 +53,11 @@ class OrderDetailControllerCore extends FrontController
|
||||
$msgText = Tools::getValue('msgText');
|
||||
|
||||
if (!$idOrder || !Validate::isUnsignedId($idOrder))
|
||||
$this->errors[] = Tools::displayError('Order is no longer valid');
|
||||
$this->errors[] = Tools::displayError('The order is no longer valid.');
|
||||
elseif (empty($msgText))
|
||||
$this->errors[] = Tools::displayError('Message cannot be blank');
|
||||
$this->errors[] = Tools::displayError('The message cannot be blank.');
|
||||
elseif (!Validate::isMessage($msgText))
|
||||
$this->errors[] = Tools::displayError('Message is invalid (HTML is not allowed)');
|
||||
$this->errors[] = Tools::displayError('This message is invalid (HTML is not allowed).');
|
||||
if (!count($this->errors))
|
||||
{
|
||||
$order = new Order($idOrder);
|
||||
@@ -204,7 +204,7 @@ class OrderDetailControllerCore extends FrontController
|
||||
unset($carrier, $addressInvoice, $addressDelivery);
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('Cannot find this order');
|
||||
$this->errors[] = Tools::displayError('This order cannot be found.');
|
||||
unset($order);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
die(Tools::jsonEncode($return));
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('Error occurred while updating cart.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the cart.');
|
||||
if (count($this->errors))
|
||||
die('{"hasError" : true, "errors" : ["'.implode('\',\'', $this->errors).'"]}');
|
||||
exit;
|
||||
@@ -317,8 +317,8 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
'countries' => $countries,
|
||||
'sl_country' => isset($selectedCountry) ? $selectedCountry : 0,
|
||||
'PS_GUEST_CHECKOUT_ENABLED' => Configuration::get('PS_GUEST_CHECKOUT_ENABLED'),
|
||||
'errorCarrier' => Tools::displayError('You must choose a carrier before', false),
|
||||
'errorTOS' => Tools::displayError('You must accept the Terms of Service before', false),
|
||||
'errorCarrier' => Tools::displayError('You must choose a carrier.', false),
|
||||
'errorTOS' => Tools::displayError('You must accept the Terms of Service.', false),
|
||||
'isPaymentStep' => (bool)(isset($_GET['isPaymentStep']) && $_GET['isPaymentStep']),
|
||||
'genders' => Gender::getGenders(),
|
||||
'one_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'),
|
||||
@@ -420,32 +420,32 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
protected function _getPaymentMethods()
|
||||
{
|
||||
if (!$this->isLogged)
|
||||
return '<p class="warning">'.Tools::displayError('Please sign in to see payment methods').'</p>';
|
||||
return '<p class="warning">'.Tools::displayError('Please sign in to see payment methods.').'</p>';
|
||||
if ($this->context->cart->OrderExists())
|
||||
return '<p class="warning">'.Tools::displayError('Error: this order has already been validated').'</p>';
|
||||
return '<p class="warning">'.Tools::displayError('Error: This order has already been validated.').'</p>';
|
||||
if (!$this->context->cart->id_customer || !Customer::customerIdExistsStatic($this->context->cart->id_customer) || Customer::isBanned($this->context->cart->id_customer))
|
||||
return '<p class="warning">'.Tools::displayError('Error: no customer').'</p>';
|
||||
return '<p class="warning">'.Tools::displayError('Error: No customer.').'</p>';
|
||||
$address_delivery = new Address($this->context->cart->id_address_delivery);
|
||||
$address_invoice = ($this->context->cart->id_address_delivery == $this->context->cart->id_address_invoice ? $address_delivery : new Address($this->context->cart->id_address_invoice));
|
||||
if (!$this->context->cart->id_address_delivery || !$this->context->cart->id_address_invoice || !Validate::isLoadedObject($address_delivery) || !Validate::isLoadedObject($address_invoice) || $address_invoice->deleted || $address_delivery->deleted)
|
||||
return '<p class="warning">'.Tools::displayError('Error: please choose an address').'</p>';
|
||||
return '<p class="warning">'.Tools::displayError('Error: Please select an address.').'</p>';
|
||||
if (count($this->context->cart->getDeliveryOptionList()) == 0 && !$this->context->cart->isVirtualCart())
|
||||
{
|
||||
if ($this->context->cart->isMultiAddressDelivery())
|
||||
return '<p class="warning">'.Tools::displayError('Error: There are no carriers available that deliver to some of your addresses').'</p>';
|
||||
return '<p class="warning">'.Tools::displayError('Error: None of your chosen carriers deliver to some of the addresses you\'ve selected.').'</p>';
|
||||
else
|
||||
return '<p class="warning">'.Tools::displayError('Error: There are no carriers available that deliver to this address').'</p>';
|
||||
return '<p class="warning">'.Tools::displayError('Error: None of your chosen carriers deliver to the address you\'ve selected.').'</p>';
|
||||
}
|
||||
if (!$this->context->cart->getDeliveryOption(null, false) && !$this->context->cart->isVirtualCart())
|
||||
return '<p class="warning">'.Tools::displayError('Error: please choose a carrier').'</p>';
|
||||
return '<p class="warning">'.Tools::displayError('Error: Please choose a carrier.').'</p>';
|
||||
if (!$this->context->cart->id_currency)
|
||||
return '<p class="warning">'.Tools::displayError('Error: no currency has been selected').'</p>';
|
||||
return '<p class="warning">'.Tools::displayError('Error: No currency has been selected.').'</p>';
|
||||
if (!$this->context->cookie->checkedTOS && Configuration::get('PS_CONDITIONS'))
|
||||
return '<p class="warning">'.Tools::displayError('Please accept the Terms of Service').'</p>';
|
||||
return '<p class="warning">'.Tools::displayError('Please accept the Terms of Service.').'</p>';
|
||||
|
||||
/* If some products have disappear */
|
||||
if (!$this->context->cart->checkQuantities())
|
||||
return '<p class="warning">'.Tools::displayError('An item in your cart is no longer available, you cannot proceed with your order.').'</p>';
|
||||
return '<p class="warning">'.Tools::displayError('An item in your cart is no longer available. You cannot proceed with your order.').'</p>';
|
||||
|
||||
/* Check minimal amount */
|
||||
$currency = Currency::getCurrency((int)$this->context->cart->id_currency);
|
||||
@@ -459,11 +459,11 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
|
||||
/* Bypass payment step if total is 0 */
|
||||
if ($this->context->cart->getOrderTotal() <= 0)
|
||||
return '<p class="center"><input type="button" class="exclusive_large" name="confirmOrder" id="confirmOrder" value="'.Tools::displayError('I confirm my order').'" onclick="confirmFreeOrder();" /></p>';
|
||||
return '<p class="center"><input type="button" class="exclusive_large" name="confirmOrder" id="confirmOrder" value="'.Tools::displayError('I confirm my order.').'" onclick="confirmFreeOrder();" /></p>';
|
||||
|
||||
$return = Hook::exec('displayPayment');
|
||||
if (!$return)
|
||||
return '<p class="warning">'.Tools::displayError('No payment method is available').'</p>';
|
||||
return '<p class="warning">'.Tools::displayError('No payment method is available for use at this time. ').'</p>';
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,10 +64,10 @@ class OrderReturnControllerCore extends FrontController
|
||||
));
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('Cannot find this order return');
|
||||
$this->errors[] = Tools::displayError('Cannot find the order return.');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('Cannot find this order return');
|
||||
$this->errors[] = Tools::displayError('Cannot find the order return.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,9 +79,9 @@ class ParentOrderControllerCore extends FrontController
|
||||
$oldCart = new Cart(Order::getCartIdStatic($id_order, $this->context->customer->id));
|
||||
$duplication = $oldCart->duplicate();
|
||||
if (!$duplication || !Validate::isLoadedObject($duplication['cart']))
|
||||
$this->errors[] = Tools::displayError('Sorry, we cannot renew your order.');
|
||||
$this->errors[] = Tools::displayError('Sorry. We cannot renew your order.');
|
||||
else if (!$duplication['success'])
|
||||
$this->errors[] = Tools::displayError('Some items are not available, we are unable to renew your order');
|
||||
$this->errors[] = Tools::displayError('Some items are no longer available, and we are unable to renew your order.');
|
||||
else
|
||||
{
|
||||
$this->context->cookie->id_cart = $duplication['cart']->id;
|
||||
@@ -99,9 +99,9 @@ class ParentOrderControllerCore extends FrontController
|
||||
if (Tools::isSubmit('submitAddDiscount'))
|
||||
{
|
||||
if (!($code = trim(Tools::getValue('discount_name'))))
|
||||
$this->errors[] = Tools::displayError('You must enter a voucher code');
|
||||
$this->errors[] = Tools::displayError('You must enter a voucher code.');
|
||||
elseif (!Validate::isCleanHtml($code))
|
||||
$this->errors[] = Tools::displayError('Voucher code invalid');
|
||||
$this->errors[] = Tools::displayError('The voucher code is invalid.');
|
||||
else
|
||||
{
|
||||
if (($cartRule = new CartRule(CartRule::getIdByCode($code))) && Validate::isLoadedObject($cartRule))
|
||||
@@ -115,7 +115,7 @@ class ParentOrderControllerCore extends FrontController
|
||||
}
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('This voucher does not exists');
|
||||
$this->errors[] = Tools::displayError('This voucher does not exists.');
|
||||
}
|
||||
$this->context->smarty->assign(array(
|
||||
'errors' => $this->errors,
|
||||
@@ -211,7 +211,7 @@ class ParentOrderControllerCore extends FrontController
|
||||
if ((int)(Tools::getValue('gift')))
|
||||
{
|
||||
if (!Validate::isMessage($_POST['gift_message']))
|
||||
$this->errors[] = Tools::displayError('Invalid gift message');
|
||||
$this->errors[] = Tools::displayError('Invalid gift message.');
|
||||
else
|
||||
$this->context->cart->gift_message = strip_tags($_POST['gift_message']);
|
||||
}
|
||||
@@ -220,7 +220,7 @@ class ParentOrderControllerCore extends FrontController
|
||||
{
|
||||
$address = new Address((int)($this->context->cart->id_address_delivery));
|
||||
if (!($id_zone = Address::getZoneById($address->id)))
|
||||
$this->errors[] = Tools::displayError('No zone matches your address');
|
||||
$this->errors[] = Tools::displayError('No zone matches your address.');
|
||||
}
|
||||
else
|
||||
$id_zone = Country::getIdZone((int)Configuration::get('PS_COUNTRY_DEFAULT'));
|
||||
|
||||
@@ -37,13 +37,13 @@ class PasswordControllerCore extends FrontController
|
||||
if (Tools::isSubmit('email'))
|
||||
{
|
||||
if (!($email = Tools::getValue('email')) || !Validate::isEmail($email))
|
||||
$this->errors[] = Tools::displayError('Invalid e-mail address');
|
||||
$this->errors[] = Tools::displayError('Invalid email address.');
|
||||
else
|
||||
{
|
||||
$customer = new Customer();
|
||||
$customer->getByemail($email);
|
||||
if (!Validate::isLoadedObject($customer))
|
||||
$this->errors[] = Tools::displayError('There is no account registered to this e-mail address.');
|
||||
$this->errors[] = Tools::displayError('There is no account registered for this email address.');
|
||||
elseif (!$customer->active)
|
||||
$this->errors[] = Tools::displayError('You cannot regenerate the password for this account.');
|
||||
elseif ((strtotime($customer->last_passwd_gen.'+'.(int)($min_time = Configuration::get('PS_PASSWD_TIME_FRONT')).' minutes') - time()) > 0)
|
||||
@@ -59,7 +59,7 @@ class PasswordControllerCore extends FrontController
|
||||
if (Mail::Send($this->context->language->id, 'password_query', Mail::l('Password query confirmation'), $mail_params, $customer->email, $customer->firstname.' '.$customer->lastname))
|
||||
$this->context->smarty->assign(array('confirmation' => 2, 'email' => $customer->email));
|
||||
else
|
||||
$this->errors[] = Tools::displayError('Error occurred while sending the e-mail.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while sending the email.');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -92,17 +92,17 @@ class PasswordControllerCore extends FrontController
|
||||
if (Mail::Send($this->context->language->id, 'password', Mail::l('Your new password'), $mail_params, $customer->email, $customer->firstname.' '.$customer->lastname))
|
||||
$this->context->smarty->assign(array('confirmation' => 1, 'email' => $customer->email));
|
||||
else
|
||||
$this->errors[] = Tools::displayError('Error occurred while sending the e-mail.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while sending the email.');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred with your account and your new password cannot be sent to your e-mail. Please report your problem using the contact form.');
|
||||
$this->errors[] = Tools::displayError('An error occurred with your account, which prevents us from sending you a new password. Please report your this issue using the contact form.');
|
||||
}
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('We cannot regenerate your password with the data you submitted');
|
||||
$this->errors[] = Tools::displayError('We cannot regenerate your password with the data you\'ve submitted.');
|
||||
}
|
||||
elseif (Tools::getValue('token') || Tools::getValue('id_customer'))
|
||||
$this->errors[] = Tools::displayError('We cannot regenerate your password with the data you submitted');
|
||||
$this->errors[] = Tools::displayError('We cannot regenerate your password with the data you\'ve submitted.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -47,13 +47,13 @@ class PdfInvoiceControllerCore extends FrontController
|
||||
$order = new Order((int)$id_order);
|
||||
|
||||
if (!isset($order) || !Validate::isLoadedObject($order))
|
||||
die(Tools::displayError('Invoice not found'));
|
||||
die(Tools::displayError('The invoice was not found.'));
|
||||
|
||||
if ((isset($this->context->customer->id) && $order->id_customer != $this->context->customer->id) || (Tools::isSubmit('secure_key') && $order->secure_key != Tools::getValue('secure_key')))
|
||||
die(Tools::displayError('Invoice not found'));
|
||||
die(Tools::displayError('The invoice was not found.'));
|
||||
|
||||
if (!OrderState::invoiceAvailable($order->getCurrentState()) && !$order->invoice_number)
|
||||
die(Tools::displayError('No invoice available'));
|
||||
die(Tools::displayError('No invoice is available.'));
|
||||
|
||||
$this->order = $order;
|
||||
}
|
||||
|
||||
@@ -38,11 +38,11 @@ class PdfOrderReturnControllerCore extends FrontController
|
||||
$this->orderReturn = new OrderReturn(Tools::getValue('id_order_return'));
|
||||
|
||||
if (!isset($this->orderReturn) || !Validate::isLoadedObject($this->orderReturn))
|
||||
die(Tools::displayError('Order return not found'));
|
||||
die(Tools::displayError('Order return not found.'));
|
||||
else if ($this->orderReturn->id_customer != $this->context->customer->id)
|
||||
die(Tools::displayError('Order return not found'));
|
||||
die(Tools::displayError('Order return not found.'));
|
||||
else if ($this->orderReturn->state < 2)
|
||||
die(Tools::displayError('Order return not confirmed'));
|
||||
die(Tools::displayError('Order return not confirmed.'));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -41,10 +41,10 @@ class PdfOrderSlipControllerCore extends FrontController
|
||||
$this->order_slip = new OrderSlip($_GET['id_order_slip']);
|
||||
|
||||
if (!isset($this->order_slip) || !Validate::isLoadedObject($this->order_slip))
|
||||
die(Tools::displayError('Order return not found'));
|
||||
die(Tools::displayError('Order return not found.'));
|
||||
|
||||
else if ($this->order_slip->id_customer != $this->context->customer->id)
|
||||
die(Tools::displayError('Order return not found'));
|
||||
die(Tools::displayError('Order return not found.'));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ class ProductControllerCore extends FrontController
|
||||
default:
|
||||
header('HTTP/1.1 404 Not Found');
|
||||
header('Status: 404 Not Found');
|
||||
$this->errors[] = Tools::displayError('Product is no longer available.');
|
||||
$this->errors[] = Tools::displayError('This product is no longer available.');
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -197,7 +197,7 @@ class ProductControllerCore extends FrontController
|
||||
$this->formTargetFormat();
|
||||
}
|
||||
else if (Tools::getIsset('deletePicture') && !$this->context->cart->deleteCustomizationToProduct($this->product->id, Tools::getValue('deletePicture')))
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting the selected picture');
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting the selected picture.');
|
||||
|
||||
|
||||
$pictures = array();
|
||||
@@ -543,12 +543,12 @@ class ProductControllerCore extends FrontController
|
||||
return false;
|
||||
/* Original file */
|
||||
if (!ImageManager::resize($tmp_name, _PS_UPLOAD_DIR_.$file_name))
|
||||
$this->errors[] = Tools::displayError('An error occurred during the image upload.');
|
||||
$this->errors[] = Tools::displayError('An error occurred during the image upload process.');
|
||||
/* A smaller one */
|
||||
elseif (!ImageManager::resize($tmp_name, _PS_UPLOAD_DIR_.$file_name.'_small', $product_picture_width, $product_picture_height))
|
||||
$this->errors[] = Tools::displayError('An error occurred during the image upload.');
|
||||
$this->errors[] = Tools::displayError('An error occurred during the image upload process.');
|
||||
elseif (!chmod(_PS_UPLOAD_DIR_.$file_name, 0777) || !chmod(_PS_UPLOAD_DIR_.$file_name.'_small', 0777))
|
||||
$this->errors[] = Tools::displayError('An error occurred during the image upload.');
|
||||
$this->errors[] = Tools::displayError('An error occurred during the image upload process.');
|
||||
else
|
||||
$this->context->cart->addPictureToProduct($this->product->id, $indexes[$field_name], Product::CUSTOMIZE_FILE, $file_name);
|
||||
unlink($tmp_name);
|
||||
|
||||
@@ -38,7 +38,7 @@ class StoresControllerCore extends FrontController
|
||||
|
||||
if (!extension_loaded('Dom'))
|
||||
{
|
||||
$this->errors[] = Tools::displayError('PHP "Dom" extension is not loaded.');
|
||||
$this->errors[] = Tools::displayError('PHP "Dom" extension has not been loaded.');
|
||||
$this->context->smarty->assign('errors', $this->errors);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class SupplierControllerCore extends FrontController
|
||||
{
|
||||
header('HTTP/1.1 404 Not Found');
|
||||
header('Status: 404 Not Found');
|
||||
$this->errors[] = Tools::displayError('Supplier does not exist.');
|
||||
$this->errors[] = Tools::displayError('The chosen supplier does not exist.');
|
||||
}
|
||||
else
|
||||
$this->canonicalRedirection();
|
||||
|
||||
Reference in New Issue
Block a user