diff --git a/core/lib/Thelia/Action/Address.php b/core/lib/Thelia/Action/Address.php index f6c6a81ad..2195d946f 100644 --- a/core/lib/Thelia/Action/Address.php +++ b/core/lib/Thelia/Action/Address.php @@ -73,11 +73,8 @@ class Address extends BaseAction implements EventSubscriberInterface $con = Propel::getWriteConnection(AddressTableMap::DATABASE_NAME); $con->beginTransaction(); try { - if ($addressModel->isNew()) { - $addressModel->setLabel($event->getLabel()); - } - $addressModel + ->setLabel($event->getLabel()) ->setTitleId($event->getTitle()) ->setFirstname($event->getFirstname()) ->setLastname($event->getLastname()) diff --git a/core/lib/Thelia/Action/Customer.php b/core/lib/Thelia/Action/Customer.php index 464f7cf20..9fee8b69e 100755 --- a/core/lib/Thelia/Action/Customer.php +++ b/core/lib/Thelia/Action/Customer.php @@ -60,7 +60,7 @@ class Customer extends BaseAction implements EventSubscriberInterface } - public function updateProfil(CustomerCreateOrUpdateEvent $event) + public function updateProfile(CustomerCreateOrUpdateEvent $event) { $customer = $event->getCustomer(); @@ -166,7 +166,7 @@ class Customer extends BaseAction implements EventSubscriberInterface return array( TheliaEvents::CUSTOMER_CREATEACCOUNT => array('create', 128), TheliaEvents::CUSTOMER_UPDATEACCOUNT => array('modify', 128), - TheliaEvents::CUSTOMER_UPDATEPROFIL => array('updateProfil', 128), + TheliaEvents::CUSTOMER_UPDATEPROFILE => array('updateProfile', 128), TheliaEvents::CUSTOMER_LOGOUT => array('logout', 128), TheliaEvents::CUSTOMER_LOGIN => array('login', 128), TheliaEvents::CUSTOMER_DELETEACCOUNT => array('delete', 128), diff --git a/core/lib/Thelia/Config/Resources/form.xml b/core/lib/Thelia/Config/Resources/form.xml index dda9be749..ecd530b69 100644 --- a/core/lib/Thelia/Config/Resources/form.xml +++ b/core/lib/Thelia/Config/Resources/form.xml @@ -9,7 +9,7 @@
- + diff --git a/core/lib/Thelia/Config/Resources/routing/front.xml b/core/lib/Thelia/Config/Resources/routing/front.xml index cf7797cc9..4d811599c 100755 --- a/core/lib/Thelia/Config/Resources/routing/front.xml +++ b/core/lib/Thelia/Config/Resources/routing/front.xml @@ -110,6 +110,7 @@ + Thelia\Controller\Front\CartController::changeItem Thelia\Controller\Front\CartController::changeItem cart diff --git a/core/lib/Thelia/Controller/Front/AddressController.php b/core/lib/Thelia/Controller/Front/AddressController.php index 6ab6e72e8..77af4991e 100644 --- a/core/lib/Thelia/Controller/Front/AddressController.php +++ b/core/lib/Thelia/Controller/Front/AddressController.php @@ -156,17 +156,51 @@ class AddressController extends BaseFrontController public function deleteAction($address_id) { $this->checkAuth(); + $error_message = false; $customer = $this->getSecurityContext()->getCustomerUser(); $address = AddressQuery::create()->findPk($address_id); if (!$address || $customer->getId() != $address->getCustomerId()) { - $this->redirectToRoute('default'); + // If Ajax Request + if ($this->getRequest()->isXmlHttpRequest()) { + return $this->jsonResponse(json_encode(array( + "success" => false, + "message" => "Error during address deletion process" + ))); + } else { + $this->redirectToRoute('default'); + } } - $this->dispatch(TheliaEvents::ADDRESS_DELETE, new AddressEvent($address)); + try { + $this->dispatch(TheliaEvents::ADDRESS_DELETE, new AddressEvent($address)); + } catch (\Exception $e) { + $error_message = $e->getMessage(); + } - $this->redirectToRoute('default', array('view'=>'account')); + \Thelia\Log\Tlog::getInstance()->error(sprintf('Error during address deletion : %s', $error_message)); + + + // If Ajax Request + if ($this->getRequest()->isXmlHttpRequest()) { + if ($error_message) { + $response = $this->jsonResponse(json_encode(array( + "success" => false, + "message" => $error_message + ))); + } else { + $response = $this->jsonResponse(json_encode(array( + "success" => true, + "message" => "" + )));; + } + + return $response; + + } else { + $this->redirectToRoute('default', array('view'=>'account')); + } } protected function createAddressEvent($form) diff --git a/core/lib/Thelia/Controller/Front/BaseFrontController.php b/core/lib/Thelia/Controller/Front/BaseFrontController.php index 5892194a4..369006aeb 100755 --- a/core/lib/Thelia/Controller/Front/BaseFrontController.php +++ b/core/lib/Thelia/Controller/Front/BaseFrontController.php @@ -56,7 +56,7 @@ class BaseFrontController extends BaseController public function checkAuth() { if ($this->getSecurityContext()->hasCustomerUser() === false) { - $this->redirectToRoute('default', array('view'=>'login')); + $this->redirectToRoute('customer.login.process'); } } diff --git a/core/lib/Thelia/Controller/Front/CustomerController.php b/core/lib/Thelia/Controller/Front/CustomerController.php index f9ebde9e6..2bb01a94a 100755 --- a/core/lib/Thelia/Controller/Front/CustomerController.php +++ b/core/lib/Thelia/Controller/Front/CustomerController.php @@ -33,7 +33,7 @@ use Thelia\Form\CustomerCreateForm; use Thelia\Form\CustomerLogin; use Thelia\Form\CustomerLostPasswordForm; use Thelia\Form\CustomerPasswordUpdateForm; -use Thelia\Form\CustomerProfilUpdateForm; +use Thelia\Form\CustomerProfileUpdateForm; use Thelia\Form\Exception\FormValidationException; use Thelia\Model\Customer; use Thelia\Core\Event\TheliaEvents; @@ -149,10 +149,10 @@ class CustomerController extends BaseFrontController 'newsletter' => null !== NewsletterQuery::create()->findOneByEmail($customer->getEmail()), ); - $customerProfilUpdateForm = new CustomerProfilUpdateForm($this->getRequest(), 'form', $data); + $customerProfileUpdateForm = new CustomerProfileUpdateForm($this->getRequest(), 'form', $data); // Pass it to the parser - $this->getParserContext()->addForm($customerProfilUpdateForm); + $this->getParserContext()->addForm($customerProfileUpdateForm); } public function updatePasswordAction() @@ -169,7 +169,7 @@ class CustomerController extends BaseFrontController $customerChangeEvent = $this->createEventInstance($form->getData()); $customerChangeEvent->setCustomer($customer); - $this->dispatch(TheliaEvents::CUSTOMER_UPDATEPROFIL, $customerChangeEvent); + $this->dispatch(TheliaEvents::CUSTOMER_UPDATEPROFILE, $customerChangeEvent); $this->redirectSuccess($customerPasswordUpdateForm); @@ -198,17 +198,17 @@ class CustomerController extends BaseFrontController $message = false; - $customerProfilUpdateForm = new CustomerProfilUpdateForm($this->getRequest()); + $customerProfileUpdateForm = new CustomerProfileUpdateForm($this->getRequest()); try { $customer = $this->getSecurityContext()->getCustomerUser(); $newsletterOldEmail = $customer->getEmail(); - $form = $this->validateForm($customerProfilUpdateForm, "post"); + $form = $this->validateForm($customerProfileUpdateForm, "post"); $customerChangeEvent = $this->createEventInstance($form->getData()); $customerChangeEvent->setCustomer($customer); - $this->dispatch(TheliaEvents::CUSTOMER_UPDATEPROFIL, $customerChangeEvent); + $this->dispatch(TheliaEvents::CUSTOMER_UPDATEPROFILE, $customerChangeEvent); $updatedCustomer = $customerChangeEvent->getCustomer(); @@ -234,7 +234,7 @@ class CustomerController extends BaseFrontController $this->processLogin($updatedCustomer); - $this->redirectSuccess($customerProfilUpdateForm); + $this->redirectSuccess($customerProfileUpdateForm); } catch (FormValidationException $e) { $message = sprintf("Please check your input: %s", $e->getMessage()); @@ -245,10 +245,10 @@ class CustomerController extends BaseFrontController if ($message !== false) { Tlog::getInstance()->error(sprintf("Error during customer modification process : %s.", $message)); - $customerProfilUpdateForm->setErrorMessage($message); + $customerProfileUpdateForm->setErrorMessage($message); $this->getParserContext() - ->addForm($customerProfilUpdateForm) + ->addForm($customerProfileUpdateForm) ->setGeneralError($message) ; } @@ -276,7 +276,7 @@ class CustomerController extends BaseFrontController // If User is a new customer if ($form->get('account')->getData() == 0 && !$form->get("email")->getErrors()) { - $this->redirectToRoute("default", array("view" => "register","email" => $form->get("email")->getData())); + $this->redirectToRoute("customer.create.process", array("email" => $form->get("email")->getData())); } else { try { diff --git a/core/lib/Thelia/Core/Event/TheliaEvents.php b/core/lib/Thelia/Core/Event/TheliaEvents.php index f72668fc3..6dbe89e10 100755 --- a/core/lib/Thelia/Core/Event/TheliaEvents.php +++ b/core/lib/Thelia/Core/Event/TheliaEvents.php @@ -72,9 +72,9 @@ final class TheliaEvents const CUSTOMER_UPDATEACCOUNT = "action.updateCustomer"; /** - * sent on customer account update profil + * sent on customer account update profile */ - const CUSTOMER_UPDATEPROFIL = "action.updateProfilCustomer"; + const CUSTOMER_UPDATEPROFILE = "action.updateProfileCustomer"; /** * sent on customer removal diff --git a/core/lib/Thelia/Form/CustomerProfilUpdateForm.php b/core/lib/Thelia/Form/CustomerProfileUpdateForm.php similarity index 95% rename from core/lib/Thelia/Form/CustomerProfilUpdateForm.php rename to core/lib/Thelia/Form/CustomerProfileUpdateForm.php index 471c12432..c7ebd2c43 100755 --- a/core/lib/Thelia/Form/CustomerProfilUpdateForm.php +++ b/core/lib/Thelia/Form/CustomerProfileUpdateForm.php @@ -23,14 +23,15 @@ namespace Thelia\Form; use Symfony\Component\Validator\ExecutionContextInterface; +use Thelia\Core\Translation\Translator; use Thelia\Model\CustomerQuery; /** - * Class CustomerProfilUpdateForm + * Class CustomerProfileUpdateForm * @package Thelia\Form * @author Christophe Laffont */ -class CustomerProfilUpdateForm extends CustomerCreateForm +class CustomerProfileUpdateForm extends CustomerCreateForm { protected function buildForm() @@ -81,6 +82,6 @@ class CustomerProfilUpdateForm extends CustomerCreateForm public function getName() { - return "thelia_customer_profil_update"; + return "thelia_customer_profile_update"; } } diff --git a/templates/default/404.html b/templates/default/404.html index b4ee90792..f7b47381e 100644 --- a/templates/default/404.html +++ b/templates/default/404.html @@ -12,31 +12,11 @@ {block name="main-content"}
-
- -

+
+

404 {intl l="The page cannot be found"}

- - - - {ifloop rel="product_upsell"} - - {/ifloop} - -

+ + {/block} diff --git a/templates/default/I18n/en_US.php b/templates/default/I18n/en_US.php index b301bb505..24bf81612 100755 --- a/templates/default/I18n/en_US.php +++ b/templates/default/I18n/en_US.php @@ -28,12 +28,12 @@ return array ( 'Free shipping' => 'Free shipping', 'Orders over $50' => 'Orders over $50', 'Secure payment' => 'Secure payment', - 'Multi-payment plateform' => 'Multi-payment plateform', + 'Multi-payment platform' => 'Multi-payment platform', 'Need help ?' => 'Need help ?', 'Questions ? See or F.A.Q.' => 'Questions ? See or F.A.Q.', 'Latest articles' => 'Latest articles', 'No articles currently' => 'No articles currently', - 'Usefull links' => 'Usefull links', + 'Useful links' => 'Useful links', 'Login' => 'Login', 'Follow us' => 'Follow us', 'Newsletter' => 'Newsletter', @@ -113,11 +113,11 @@ return array ( 'Coupon code' => 'Coupon code', 'Ok' => 'Ok', 'Delivery address' => 'Delivery address', - 'Billing addres' => 'Billing addres', + 'Billing address' => 'Billing address', 'Change address' => 'Change address', 'Choose your payment method' => 'Choose your payment method', 'Secure Payment' => 'Secure Payment', - 'You chose to pay by' => 'You chose to pay by', + 'You choose to pay by' => 'You choose to pay by', 'Thank you for the trust you place in us.' => 'Thank you for the trust you place in us.', 'A summary of your order email has been sent to the following address' => 'A summary of your order email has been sent to the following address', 'Your order will be confirmed by us upon receipt of your payment.' => 'Your order will be confirmed by us upon receipt of your payment.', @@ -139,7 +139,7 @@ return array ( 'View order %ref as pdf document' => 'View order %ref as pdf document', 'Order details' => 'Order details', 'You don\'t have orders yet.' => 'You don\'t have orders yet.', - 'Update Profil' => 'Update Profil', + 'Update Profile' => 'Update Profile', 'Personal Informations' => 'Personal Informations', 'Select Title' => 'Select Title', 'Update' => 'Update', @@ -152,5 +152,63 @@ return array ( 'Select Country' => 'Select Country', 'Create' => 'Create', 'Related' => 'Related', + 'Grid' => 'Grid', + 'List' => 'List', + 'Next' => 'Next', + 'Previous' => 'Previous', +/* + 'The page cannot be found' => 'The page cannot be found', + 'What\'s your name?' => 'What\'s your name?', + 'So I can get back to you.' => 'So I can get back to you.', + 'The subject of your message.' => 'The subject of your message.', + 'And your message...' => 'And your message...', + 'This email already exists.' => 'This email already exists.', + 'Address label' => 'Address label', + 'Title' => 'Title', + 'First Name' => 'First Name', + 'Last Name' => 'Last Name', + 'Company Name' => 'Company Name', + 'Street Address' => 'Street Address', + 'Address Line 2' => 'Address Line 2', + 'Address Line 3' => 'Address Line 3', + 'City' => 'City', + 'Zip code' => 'Zip code', + 'Country' => 'Country', + 'Phone' => 'Phone', + 'Cellphone' => 'Cellphone', + 'Make this address as my primary address' => 'Make this address as my primary address', + 'Full Name' => 'Full Name', + 'Your Email Address' => 'Your Email Address', + 'Subject' => 'Subject', + 'Your Message' => 'Your Message', + 'Please enter your email address' => 'Please enter your email address', + 'No, I am a new customer.' => 'No, I am a new customer.', + 'Yes, I have a password :' => 'Yes, I have a password :', + 'Please enter your password' => 'Please enter your password', + 'This value should not be blank.' => 'This value should not be blank.', + 'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.' => 'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.', + 'This email does not exists' => 'This email does not exists', + 'Current Password' => 'Current Password', + 'New Password' => 'New Password', + 'Password confirmation' => 'Password confirmation', + 'Your current password does not match.' => 'Your current password does not match.', + 'Password confirmation is not the same as password field.' => 'Password confirmation is not the same as password field.', + 'I would like to receive the newsletter or the latest news.' => 'I would like to receive the newsletter or the latest news.', +*/ + 'Placeholder firstname' => 'John', + 'Placeholder lastname' => 'Doe', + 'Placeholder email' => 'johndoe@domain.com', + 'Placeholder phone' => '', + 'Placeholder cellphone' => '', + 'Placeholder company' => 'Google', + 'Placeholder address1' => '76 Ninth Avenue', + 'Placeholder address2' => '', + 'Placeholder city' => 'New York', + 'Placeholder zipcode' => 'NY 10011', + 'Placeholder address label' => 'Home, Work office, other', + 'Placeholder contact name' => 'What\'s your name?', + 'Placeholder contact email' => 'So I can get back to you.', + 'Placeholder contact subject' => 'The subject of your message.', + 'Placeholder contact message' => 'And your message...', ) ; \ No newline at end of file diff --git a/templates/default/I18n/es_ES.php b/templates/default/I18n/es_ES.php index cbf0e3a78..427227f1c 100755 --- a/templates/default/I18n/es_ES.php +++ b/templates/default/I18n/es_ES.php @@ -28,12 +28,12 @@ return array ( 'Free shipping' => '', 'Orders over $50' => '', 'Secure payment' => '', - 'Multi-payment plateform' => '', + 'Multi-payment platform' => '', 'Need help ?' => '', 'Questions ? See or F.A.Q.' => '', 'Latest articles' => '', 'No articles currently' => '', - 'Usefull links' => '', + 'Useful links' => '', 'Login' => '', 'Follow us' => '', 'Newsletter' => '', @@ -113,11 +113,11 @@ return array ( 'Coupon code' => '', 'Ok' => '', 'Delivery address' => '', - 'Billing addres' => '', + 'Billing address' => '', 'Change address' => '', 'Choose your payment method' => '', 'Secure Payment' => '', - 'You chose to pay by' => '', + 'You choose to pay by' => '', 'Thank you for the trust you place in us.' => '', 'A summary of your order email has been sent to the following address' => '', 'Your order will be confirmed by us upon receipt of your payment.' => '', @@ -139,7 +139,7 @@ return array ( 'View order %ref as pdf document' => '', 'Order details' => '', 'You don\'t have orders yet.' => '', - 'Update Profil' => '', + 'Update Profile' => '', 'Personal Informations' => '', 'Select Title' => '', 'Update' => '', @@ -152,5 +152,63 @@ return array ( 'Select Country' => '', 'Create' => '', 'Related' => '', + 'Grid' => '', + 'List' => '', + 'Next' => '', + 'Previous' => '', +/* + 'The page cannot be found' => '', + 'What\'s your name?' => '', + 'So I can get back to you.' => '', + 'The subject of your message.' => '', + 'And your message...' => '', + 'This email already exists.' => '', + 'Address label' => '', + 'Title' => '', + 'First Name' => '', + 'Last Name' => '', + 'Company Name' => '', + 'Street Address' => '', + 'Address Line 2' => '', + 'Address Line 3' => '', + 'City' => '', + 'Zip code' => '', + 'Country' => '', + 'Phone' => '', + 'Cellphone' => '', + 'Make this address as my primary address' => '', + 'Full Name' => '', + 'Your Email Address' => '', + 'Subject' => '', + 'Your Message' => '', + 'Please enter your email address' => '', + 'No, I am a new customer.' => '', + 'Yes, I have a password :' => '', + 'Please enter your password' => '', + 'This value should not be blank.' => '', + 'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.' => '', + 'This email does not exists' => '', + 'Current Password' => '', + 'New Password' => '', + 'Password confirmation' => '', + 'Your current password does not match.' => '', + 'Password confirmation is not the same as password field.' => '', + 'I would like to receive the newsletter or the latest news.' => '', +*/ + 'Placeholder firstname' => '', + 'Placeholder lastname' => '', + 'Placeholder email' => '', + 'Placeholder phone' => '', + 'Placeholder cellphone' => '', + 'Placeholder company' => '', + 'Placeholder address1' => '', + 'Placeholder address2' => '', + 'Placeholder city' => '', + 'Placeholder zipcode' => '', + 'Placeholder address label' => '', + 'Placeholder contact name' => '', + 'Placeholder contact email' => '', + 'Placeholder contact subject' => '', + 'Placeholder contact message' => '', ) ; \ No newline at end of file diff --git a/templates/default/I18n/fr_FR.php b/templates/default/I18n/fr_FR.php index bedcaa5fd..b5f6a6290 100755 --- a/templates/default/I18n/fr_FR.php +++ b/templates/default/I18n/fr_FR.php @@ -5,45 +5,45 @@ return array ( 'Thelia V2' => 'Thelia v2', 'Skip to content' => 'Aller au contenu', 'Toggle navigation' => 'Navigation alternative', - 'Main Navigation' => 'Navigation principale ', - 'Register!' => 'S\inscrire !', + 'Main Navigation' => 'Navigation principale', + 'Register!' => 'S\'inscrire !', 'Log In!' => 'Se connecter', - 'Sign In' => 'S\inscrire', + 'Sign In' => 'S\'inscrire', 'Register' => 'Se connecter', 'Cart' => 'Panier', 'View Cart' => 'Voir mon panier', 'Checkout' => 'Payer', - 'You have no items in your shopping cart.' => 'Vous n\'avez pas de produit dans votre panier', + 'You have no items in your shopping cart.' => 'Vous n\'avez pas de produit dans votre panier.', 'Home' => 'Accueil', 'Search a product' => 'Chercher un produit', 'Search...' => 'Recherche…', - 'Minimum 2 characters.' => '2 caractères minimum', + 'Minimum 2 characters.' => '2 caractères minimum.', 'Search' => 'Recherche', 'Language:' => 'Langue', 'Currency:' => 'Monnaie', 'Latest' => 'Nouveautés', 'Offers' => 'Promotions', - 'Special Price:' => 'Prix en promotion:', - 'Regular Price:' => 'Prix:', + 'Special Price:' => 'Prix en promotion :', + 'Regular Price:' => 'Prix :', 'Free shipping' => 'Livraison gratuite', 'Orders over $50' => 'Commandes supérieures à 50€',//ne devrait-on pas mettre une variable ici? 'Secure payment' => 'Paiement sécurisé', 'Multi-payment plateform' => 'Plateforme multipaiement',// bizarre ? 'Need help ?' => 'Besoin d\'aide? ', - 'Questions ? See or F.A.Q.' => 'Des questions ? Voir la F.A.Q.', // bizarre le 'see or ' + 'Questions ? See or F.A.Q.' => 'Des questions ? Voir la F.A.Q.', // bizarre le 'see or ' 'Latest articles' => 'Nouveaux articles', 'No articles currently' => 'Actuellement aucun article', - 'Usefull links' => 'Liens utiles', + 'Useful links' => 'Liens utiles', 'Login' => 'Connexion', 'Follow us' => 'Suivez-nous', 'Newsletter' => 'Newsletter', - 'Sign up to receive our latest news.' => 'Inscrivez-vous pour recevoir nos actualités', + 'Sign up to receive our latest news.' => 'Inscrivez-vous pour recevoir nos actualités.', 'Email address' => 'Adresse e-mail', 'Your email address' => 'Votre adresse e-mail', 'Subscribe' => 'Inscription', 'Contact Us' => 'Contactez-nous', 'Copyright' => 'Copyright', - 'You are here:' => 'Vous êtes ici :', + 'You are here:' => 'Vous êtes ici :', 'Show' => 'Voir', 'per page' => 'par page', 'Sort By' => 'Trier par', @@ -54,7 +54,7 @@ return array ( 'View as' => 'Voir en tant que ', 'View product' => 'Voir le produit', 'Pagination' => 'Pagination', - 'No products available in this category' => 'Aucun produit dans cette catégorie', + 'No products available in this category' => 'Aucun produit dans cette catégorie.', 'Categories' => 'Catégories', 'Ref.' => 'Ref.', 'Availability' => 'Disponibilité', @@ -77,7 +77,6 @@ return array ( 'Qty' => 'Qté', 'Total' => 'Total', 'Tax Inclusive' => 'TVA incluse', - 'TTC' => 'TTC', 'Available' => 'Disponible', 'In Stock' => 'Disponible', 'No.' => 'N°', @@ -85,8 +84,8 @@ return array ( 'Proceed checkout' => 'Payer', 'Warning' => 'Attention', 'missing or invalid data' => 'Information éronnée ou incomplète', - 'Do you have an account?' => 'Avez-vous déjà un compte ? ', - 'Forgot your Password?' => 'Mot de passé oublié ? ', + 'Do you have an account?' => 'Avez-vous déjà un compte ?', + 'Forgot your Password?' => 'Mot de passé oublié ?', 'Next' => 'Suivant', 'Log out!' => 'Se déconnecter', 'My Account' => 'Mon compte', @@ -104,21 +103,21 @@ return array ( 'Back' => 'Retour', 'Next Step' => 'Etape suivante', 'Delete address' => 'Supprimer cette adresse', - 'Do you really want to delete this address ?' => 'Voulez-vous vraiment supprimer cette adresse ? ', + 'Do you really want to delete this address ?' => 'Voulez-vous vraiment supprimer cette adresse ?', 'No' => 'Non', 'Yes' => 'Oui', 'Shipping Tax' => 'Frais de livraison', - 'You may have a coupon ?' => 'Avez-vous un code promo? ', + 'You may have a coupon ?' => 'Avez-vous un code promo ?', 'Code :' => 'Code', 'Coupon code' => 'Code promo', 'Ok' => 'Ok', 'Delivery address' => 'Adresse de livraison', - 'Billing addres' => 'Adresse de facturation', + 'Billing address' => 'Adresse de facturation', 'Change address' => 'Changer d\'adresse', 'Choose your payment method' => 'Choisissez voter moyen de paiement', 'Secure Payment' => 'Paiement sécurisé', // Tous les éléments relatifs au message de confirmation de commande devraient être administrables non? - 'You chose to pay by' => 'Vous avez choisi de payer par', + 'You choose to pay by' => 'Vous avez choisi de payer par', 'Thank you for the trust you place in us.' => 'Merci pour voter confiance. ', 'A summary of your order email has been sent to the following address' => 'Un récapitulatif de commande vows a été envoyé par e-mail à l\'adresse suivante : ', 'Your order will be confirmed by us upon receipt of your payment.' => 'Votre commande sera confirmée à réception de votre pavement.', @@ -129,8 +128,8 @@ return array ( 'Personal Information' => 'Informations personnelles', 'Change my account information' => 'Modifier mes informations personnelles', 'Change my password' => 'Changer mon mot de passe', - 'My Address book' => 'Mon carnet d\adresses', - 'My Address Books' => 'Mes carnets d\adresses', + 'My Address book' => 'Mon carnet d\'adresses', + 'My Address Books' => 'Mes carnets d\'adresses', 'My Orders' => 'Mes commandes', 'List of orders' => 'Liste de mes commandes', 'Order Number' => 'Commande numéro', @@ -139,8 +138,8 @@ return array ( 'View' => 'Voir', 'View order %ref as pdf document' => 'Ouvrir la commande %ref dans un pdf', 'Order details' => 'Détail de commande', - 'You don\'t have orders yet.' => 'Vous n\'avez pas encore de commande', - 'Update Profil' => 'Mettre à jour votre profil', + 'You don\'t have orders yet.' => 'Vous n\'avez pas encore de commande.', + 'Update Profile' => 'Mettre à jour votre profil', 'Personal Informations' => 'Informations personnelles', 'Select Title' => 'Civilité', 'Update' => 'Mettre à jour', @@ -153,6 +152,64 @@ return array ( 'Select Country' => 'Choisissez un pays', 'Create' => 'Créer', 'Related' => 'Liés', // voir le contexte pour l'accord + 'Grid' => 'Grille', + 'List' => 'Liste', + 'Next' => 'Suivant', + 'Previous' => 'Précédent', + /* + 'The page cannot be found' => '', + 'What\'s your name?' => '', + 'So I can get back to you.' => '', + 'The subject of your message.' => '', + 'And your message...' => '', + 'This email already exists.' => '', + 'Address label' => '', + 'Title' => '', + 'First Name' => '', + 'Last Name' => '', + 'Company Name' => '', + 'Street Address' => '', + 'Address Line 2' => '', + 'Address Line 3' => '', + 'City' => '', + 'Zip code' => '', + 'Country' => '', + 'Phone' => '', + 'Cellphone' => '', + 'Make this address as my primary address' => '', + 'Full Name' => '', + 'Your Email Address' => '', + 'Subject' => '', + 'Your Message' => '', + 'Please enter your email address' => '', + 'No, I am a new customer.' => '', + 'Yes, I have a password :' => '', + 'Please enter your password' => '', + 'This value should not be blank.' => '', + 'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.' => '', + 'This email does not exists' => '', + 'Current Password' => '', + 'New Password' => '', + 'Password confirmation' => '', + 'Your current password does not match.' => '', + 'Password confirmation is not the same as password field.' => '', + 'I would like to receive the newsletter or the latest news.' => '', + */ + 'Placeholder firstname' => 'Prénom', + 'Placeholder lastname' => 'Nom de famille', + 'Placeholder email' => 'Adresse e-mail', + 'Placeholder phone' => 'Téléphone', + 'Placeholder cellphone' => 'Portable', + 'Placeholder company' => 'Compagnie', + 'Placeholder address1' => 'Adresse', + 'Placeholder address2' => '', + 'Placeholder city' => 'Ville', + 'Placeholder zipcode' => 'Code postal', + 'Placeholder address label' => 'Maison, Domicile, Travail...', + 'Placeholder contact name' => 'Quel est votre nom ?', + 'Placeholder contact email' => 'Pour me permettre de vous contacter', + 'Placeholder contact subject' => 'Le sujet de votre message', + 'Placeholder contact message' => 'Votre commentaire', ) ; \ No newline at end of file diff --git a/templates/default/I18n/it_IT.php b/templates/default/I18n/it_IT.php index cbf0e3a78..427227f1c 100755 --- a/templates/default/I18n/it_IT.php +++ b/templates/default/I18n/it_IT.php @@ -28,12 +28,12 @@ return array ( 'Free shipping' => '', 'Orders over $50' => '', 'Secure payment' => '', - 'Multi-payment plateform' => '', + 'Multi-payment platform' => '', 'Need help ?' => '', 'Questions ? See or F.A.Q.' => '', 'Latest articles' => '', 'No articles currently' => '', - 'Usefull links' => '', + 'Useful links' => '', 'Login' => '', 'Follow us' => '', 'Newsletter' => '', @@ -113,11 +113,11 @@ return array ( 'Coupon code' => '', 'Ok' => '', 'Delivery address' => '', - 'Billing addres' => '', + 'Billing address' => '', 'Change address' => '', 'Choose your payment method' => '', 'Secure Payment' => '', - 'You chose to pay by' => '', + 'You choose to pay by' => '', 'Thank you for the trust you place in us.' => '', 'A summary of your order email has been sent to the following address' => '', 'Your order will be confirmed by us upon receipt of your payment.' => '', @@ -139,7 +139,7 @@ return array ( 'View order %ref as pdf document' => '', 'Order details' => '', 'You don\'t have orders yet.' => '', - 'Update Profil' => '', + 'Update Profile' => '', 'Personal Informations' => '', 'Select Title' => '', 'Update' => '', @@ -152,5 +152,63 @@ return array ( 'Select Country' => '', 'Create' => '', 'Related' => '', + 'Grid' => '', + 'List' => '', + 'Next' => '', + 'Previous' => '', +/* + 'The page cannot be found' => '', + 'What\'s your name?' => '', + 'So I can get back to you.' => '', + 'The subject of your message.' => '', + 'And your message...' => '', + 'This email already exists.' => '', + 'Address label' => '', + 'Title' => '', + 'First Name' => '', + 'Last Name' => '', + 'Company Name' => '', + 'Street Address' => '', + 'Address Line 2' => '', + 'Address Line 3' => '', + 'City' => '', + 'Zip code' => '', + 'Country' => '', + 'Phone' => '', + 'Cellphone' => '', + 'Make this address as my primary address' => '', + 'Full Name' => '', + 'Your Email Address' => '', + 'Subject' => '', + 'Your Message' => '', + 'Please enter your email address' => '', + 'No, I am a new customer.' => '', + 'Yes, I have a password :' => '', + 'Please enter your password' => '', + 'This value should not be blank.' => '', + 'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.' => '', + 'This email does not exists' => '', + 'Current Password' => '', + 'New Password' => '', + 'Password confirmation' => '', + 'Your current password does not match.' => '', + 'Password confirmation is not the same as password field.' => '', + 'I would like to receive the newsletter or the latest news.' => '', +*/ + 'Placeholder firstname' => '', + 'Placeholder lastname' => '', + 'Placeholder email' => '', + 'Placeholder phone' => '', + 'Placeholder cellphone' => '', + 'Placeholder company' => '', + 'Placeholder address1' => '', + 'Placeholder address2' => '', + 'Placeholder city' => '', + 'Placeholder zipcode' => '', + 'Placeholder address label' => '', + 'Placeholder contact name' => '', + 'Placeholder contact email' => '', + 'Placeholder contact subject' => '', + 'Placeholder contact message' => '', ) ; \ No newline at end of file diff --git a/templates/default/account-password.html b/templates/default/account-password.html index 5b14ac1f6..1e67d4520 100644 --- a/templates/default/account-password.html +++ b/templates/default/account-password.html @@ -1,14 +1,18 @@ {extends file="layout.tpl"} +{* Security *} +{block name="no-return-functions" prepend} + {check_auth context="front" role="CUSTOMER" login_tpl="login"} +{/block} + {* Body Class *} {block name="body-class"}page-account-password{/block} {* Breadcrumb *} {block name='no-return-functions' append} - {$breadcrumbs = [['title' => {intl l="Account"}, 'url'=>{url path="/account"}]]} {$breadcrumbs = [ - ['title' => {intl l="Account"}, 'url'=>{url path="/account"}], - ['title' => {intl l="Change Password"}, 'url'=>{url path="/account/password"}] + ['title' => {intl l="Account"}, 'url'=>{url path="/account"}], + ['title' => {intl l="Change Password"}, 'url'=>{url path="/account/password"}] ]} {/block} @@ -37,12 +41,14 @@
{form_field form=$form field="password_old"} -
+
- - {if $error } - {$message} + + {if $error} + {$message} + {assign var="error_focus" value="true"} + {elseif !$value} {assign var="error_focus" value="true"} {/if}
@@ -50,25 +56,24 @@ {/form_field} {form_field form=$form field="password"} -
+
- + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} {/if}
{/form_field} {form_field form=$form field="password_confirm"} -
+
- + {if $error } - {$message} - {assign var="error_focus" value="true"} + {$message} {/if}
diff --git a/templates/default/account-update.html b/templates/default/account-update.html index 6fb50162e..d7b38e773 100644 --- a/templates/default/account-update.html +++ b/templates/default/account-update.html @@ -1,14 +1,18 @@ {extends file="layout.tpl"} +{* Security *} +{block name="no-return-functions" prepend} + {check_auth context="front" role="CUSTOMER" login_tpl="login"} +{/block} + {* Body Class *} {block name="body-class"}page-account-update{/block} {* Breadcrumb *} {block name='no-return-functions' append} - {$breadcrumbs = [['title' => {intl l="Account"}, 'url'=>{url path="/account"}]]} {$breadcrumbs = [ - ['title' => {intl l="Account"}, 'url'=>{url path="/account"}], - ['title' => {intl l="Update Profil"}, 'url'=>{url path="/account/update"}] + ['title' => {intl l="Account"}, 'url'=>{url path="/account"}], + ['title' => {intl l="Update Profile"}, 'url'=>{url path="/account/update"}] ]} {/block} @@ -17,10 +21,9 @@
-

{intl l="Update Profil"}

+

{intl l="Update Profile"}

- {form name="thelia.front.customer.profil.update"} - {assign var="isPost" value="{$smarty.post|count}"} + {form name="thelia.front.customer.profile.update"} {form_field form=$form field='success_url'} @@ -37,7 +40,7 @@
{form_field form=$form field="title"} -
+
- {if $error } - {$message} + {if $error} + {$message} {assign var="error_focus" value="true"} {elseif !$value} {assign var="error_focus" value="true"} - {elseif $isPost && $value != "" && !$error} - {/if}
{/form_field} {form_field form=$form field="firstname"} -
+
- + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $isPost && $value != "" && !$error} - {/if}
{/form_field} {form_field form=$form field="lastname"} -
+
- + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $isPost && $value != "" && !$error} - {/if}
{/form_field} {form_field form=$form field="email"} -
+
- + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $isPost && $value != "" && !$error} - {/if}
@@ -111,7 +106,7 @@ {$label} {if $error } - {$message} + {$message} {/if}
diff --git a/templates/default/account.html b/templates/default/account.html index 9e9c82369..863104615 100644 --- a/templates/default/account.html +++ b/templates/default/account.html @@ -1,5 +1,6 @@ {extends file="layout.tpl"} +{* Security *} {block name="no-return-functions" prepend} {check_auth context="front" role="CUSTOMER" login_tpl="login"} {/block} @@ -7,7 +8,7 @@ {* Breadcrumb *} {block name='no-return-functions' append} {$breadcrumbs = [ - ['title' => {intl l="Account"}, 'url'=>{url path="/account"}] + ['title' => {intl l="Account"}, 'url'=>{url path="/account"}] ]} {/block} @@ -32,7 +33,7 @@
{loop type="customer" name="customer.info"}
-

{loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$FIRSTNAME} {$LASTNAME}

+

{loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$FIRSTNAME|ucwords} {$LASTNAME|upper}

{loop type="address" name="address.default" default="true"}
  • @@ -49,12 +50,12 @@
  • - {if $CELLPHONE != ""} - {$CELLPHONE} - {/if} {if $PHONE != ""} {$PHONE} {/if} + {if $CELLPHONE != ""} + {$CELLPHONE} + {/if}
  • @@ -86,7 +87,7 @@
    • - {loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$FIRSTNAME} {$LASTNAME} + {loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$FIRSTNAME|ucwords} {$LASTNAME|upper} {if $COMPANY} {$COMPANY} {/if} @@ -118,7 +119,7 @@ diff --git a/templates/default/address-update.html b/templates/default/address-update.html index 710628015..8ab66107d 100644 --- a/templates/default/address-update.html +++ b/templates/default/address-update.html @@ -1,6 +1,7 @@ {extends file="layout.tpl"} -{block name="no-return-functions"} +{* Security *} +{block name="no-return-functions" prepend} {check_auth context="front" role="CUSTOMER" login_tpl="login"} {/block} @@ -11,7 +12,7 @@ {block name='no-return-functions' append} {$breadcrumbs = [ ['title' => {intl l="Account"}, 'url'=>{url path="/account"}], - ['title' => {intl l="Address Update"}, 'url'=>{url path="/address"}] + ['title' => {intl l="Address Update"}, 'url'=>{url path="/address/update/{$address_id}"}] ]} {/block} @@ -20,16 +21,16 @@
      -

      {intl l="Create New Address"}

      +

      {intl l="Address Update"}

      {form name="thelia.front.address.update"} - {loop name="customer.update" type="address" customer="current" id="{$address_id}"} + {loop name="customer.update" type="address" customer="current" id="{$address_id}"} {form_field form=$form field='success_url'} - {* the url the user is redirected to on login success *} + {/form_field} {form_field form=$form field='error_message'} - {* the url the user is redirected to on login success *} + {/form_field} {form_hidden_fields form=$form} {if $form_error}
      {$form_error_message}
      {/if} @@ -40,15 +41,16 @@
      {form_field form=$form field="label"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} + {elseif !$value} + {assign var="error_focus" value="true"} {/if}
      @@ -57,34 +59,32 @@ {form_field form=$form field="title"} {assign var="customer_title_id" value="{$value|default:$TITLE}"} -
      - +
      +
      - {loop type="title" name="title.list"} - + {/loop} {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      {/form_field} {form_field form=$form field="firstname"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      @@ -93,15 +93,14 @@ {form_field form=$form field="lastname"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      @@ -109,15 +108,14 @@ {/form_field} {form_field form=$form field="address1"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      @@ -125,15 +123,14 @@ {/form_field} {form_field form=$form field="address2"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      @@ -141,15 +138,14 @@ {/form_field} {form_field form=$form field="zipcode"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      @@ -157,15 +153,14 @@ {/form_field} {form_field form=$form field="city"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      @@ -173,35 +168,33 @@ {/form_field} {form_field form=$form field="country"} - {assign var="customer_country_id" value="{$value|default:$COUNTRY}"} -
      - + {assign var="customer_country_id" value="{$value|default:$COUNTRY}"} +
      +
      - {loop type="country" name="country.list"} - + {/loop} {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      {/form_field} {form_field form=$form field="phone"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      @@ -209,15 +202,14 @@ {/form_field} {form_field form=$form field="cellphone"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      @@ -227,21 +219,23 @@ {form_field form=$form field="is_default"} + {if not $DEFAULT}
      + {/if} {/form_field}
      - +
      diff --git a/templates/default/address.html b/templates/default/address.html index 376adafa2..fea5c5dd5 100644 --- a/templates/default/address.html +++ b/templates/default/address.html @@ -1,6 +1,7 @@ {extends file="layout.tpl"} -{block name="no-return-functions"} +{* Security *} +{block name="no-return-functions" prepend} {check_auth context="front" role="CUSTOMER" login_tpl="login"} {/block} @@ -11,7 +12,7 @@ {block name='no-return-functions' append} {$breadcrumbs = [ ['title' => {intl l="Account"}, 'url'=>{url path="/account"}], - ['title' => {intl l="Address"}, 'url'=>{url path="/address"}] + ['title' => {intl l="Add a New Address"}, 'url'=>{url path="/address/create"}] ]} {/block} @@ -24,11 +25,11 @@ {form name="thelia.front.address.create"} {form_field form=$form field='success_url'} - {* the url the user is redirected to on login success *} + {/form_field} {form_field form=$form field='error_message'} - {* the url the user is redirected to on login success *} + {/form_field} {form_hidden_fields form=$form} {if $form_error}
      {$form_error_message}
      {/if} @@ -39,15 +40,16 @@
      {form_field form=$form field="label"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} + {elseif !$value} + {assign var="error_focus" value="true"} {/if}
      @@ -55,34 +57,32 @@ {/form_field} {form_field form=$form field="title"} -
      - +
      +
      - {loop type="title" name="title.list"} {/loop} {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      {/form_field} {form_field form=$form field="firstname"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      @@ -91,15 +91,14 @@ {form_field form=$form field="lastname"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      @@ -107,15 +106,14 @@ {/form_field} {form_field form=$form field="address1"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      @@ -123,15 +121,14 @@ {/form_field} {form_field form=$form field="address2"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      @@ -139,15 +136,14 @@ {/form_field} {form_field form=$form field="zipcode"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      @@ -155,15 +151,14 @@ {/form_field} {form_field form=$form field="city"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      @@ -171,34 +166,32 @@ {/form_field} {form_field form=$form field="country"} -
      - +
      +
      - {loop type="country" name="country.list"} {/loop} {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      {/form_field} {form_field form=$form field="phone"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      @@ -206,15 +199,14 @@ {/form_field} {form_field form=$form field="cellphone"} -
      - +
      +
      - + {if $error } - {$message} - {elseif $value != "" && !$error} - + {$message} + {assign var="error_focus" value="true"} {/if}
      diff --git a/templates/default/assets/img/carousel/slider1.png b/templates/default/assets/img/carousel/slider1.png index 422b3ddc0..d2a1f3628 100644 Binary files a/templates/default/assets/img/carousel/slider1.png and b/templates/default/assets/img/carousel/slider1.png differ diff --git a/templates/default/assets/img/carousel/slider2.png b/templates/default/assets/img/carousel/slider2.png index 8eb4049b7..eab0f625c 100644 Binary files a/templates/default/assets/img/carousel/slider2.png and b/templates/default/assets/img/carousel/slider2.png differ diff --git a/templates/default/assets/img/carousel/slider3.png b/templates/default/assets/img/carousel/slider3.png index b3630ff60..2e91fd0f2 100644 Binary files a/templates/default/assets/img/carousel/slider3.png and b/templates/default/assets/img/carousel/slider3.png differ diff --git a/templates/default/assets/img/favicon.ico b/templates/default/assets/img/favicon.ico new file mode 100644 index 000000000..19f5af190 Binary files /dev/null and b/templates/default/assets/img/favicon.ico differ diff --git a/templates/default/assets/img/favicon.png b/templates/default/assets/img/favicon.png new file mode 100644 index 000000000..5669f3e76 Binary files /dev/null and b/templates/default/assets/img/favicon.png differ diff --git a/templates/default/assets/js/script.js b/templates/default/assets/js/script.js index dd55f4cbb..c6f695114 100644 --- a/templates/default/assets/js/script.js +++ b/templates/default/assets/js/script.js @@ -1,7 +1,20 @@ /* JQUERY PREVENT CONFLICT */ (function($) { - /* ------------------------------------------------------------------ +/* ------------------------------------------------------------------ + callback Function -------------------------------------------------- */ + var confirmCallback = { + 'address.delete': function($elm){ + $.post($elm.attr('href'), function(data){ + if(data.success) + $elm.closest('tr').remove(); + else + bootbox.alert(data.message); + }); + } + } + +/* ------------------------------------------------------------------ onLoad Function -------------------------------------------------- */ $(document).ready(function(){ @@ -48,20 +61,26 @@ }); // Confirm Dialog - $(document).on('click.confirm', '[data-toggle="confirm"]', function (e) { - var $this = $(this), - href = $this.attr('href'), - title = $this.attr('data-confirm-title') ? $this.attr('data-confirm-title') : 'Are you sure?'; + $(document).on('click.confirm', '[data-confirm]', function (e) { + var $this = $(this), + href = $this.attr('href'), + callback = $this.attr('data-confirm-callback'), + title = $this.attr('data-confirm') != '' ? $this.attr('data-confirm') : 'Are you sure?'; - bootbox.confirm(title, function(confirm) { + bootbox.confirm(title, function(confirm) { if(confirm){ - if(href){ - window.location.href = href; + //Check if callback and if it's a function + if (callback && $.isFunction(confirmCallback[callback])) { + confirmCallback[callback]($this); } else { - // If forms - var $form = $this.closest("form"); - if($form.size() > 0){ - $form.submit(); + if(href){ + window.location.href = href; + } else { + // If forms + var $form = $this.closest("form"); + if($form.size() > 0){ + $form.submit(); + } } } } @@ -195,7 +214,7 @@ }); // Apply validation - $('#form-contact, #form-register').validate({ + $('#form-contact, #form-register, #form-address').validate({ highlight: function(element) { $(element).closest('.form-group').addClass('has-error'); }, @@ -203,14 +222,14 @@ $(element).closest('.form-group').removeClass('has-error'); }, errorElement: 'span', - errorClass: 'help-block', + errorClass: 'help-block'/*, errorPlacement: function(error, element) { if(element.parent('.input-group').length || element.prop('type') === 'checkbox' || element.prop('type') === 'radio'){ error.prepend(' ').insertAfter(element.parent()); }else{ error.prepend(' ').insertAfter(element); } - } + }*/ }); diff --git a/templates/default/assets/less/thelia/account.less b/templates/default/assets/less/thelia/account.less index 40cf4da3c..ab72cae1c 100644 --- a/templates/default/assets/less/thelia/account.less +++ b/templates/default/assets/less/thelia/account.less @@ -2,7 +2,8 @@ .account-info { .list-info { address { margin-bottom: 0; } - + + .mobile, .tel, .email { display: block; diff --git a/templates/default/assets/less/thelia/checkout.less b/templates/default/assets/less/thelia/checkout.less index bcdee104f..8cd1b82ac 100644 --- a/templates/default/assets/less/thelia/checkout.less +++ b/templates/default/assets/less/thelia/checkout.less @@ -4,7 +4,7 @@ #delivery-address { .panel-heading { position: relative; - > .btn-add-address { position: absolute; top: 3px; right: 5px; margin:0; padding: 0; text-transform: none; } + > .btn-add-address { position: absolute; top: 7px; right: 10px; margin:0; padding: 0; text-transform: none; } } } diff --git a/templates/default/assets/less/thelia/global.less b/templates/default/assets/less/thelia/global.less index 378af265c..29c19c0c5 100755 --- a/templates/default/assets/less/thelia/global.less +++ b/templates/default/assets/less/thelia/global.less @@ -3,19 +3,6 @@ // Main Title .page-header { margin-top: 0; } -// 404 Page -.page_404{ - color: @brand-primary; - font-size: 9em; font-weight: bold; - text-align: center; - - span{ - color : #CCC; - display: block; - font-size: 15px; font-weight: normal; - } -} - // Collapse .no-js .collapse { display: block!important; } diff --git a/templates/default/assets/less/thelia/import.less b/templates/default/assets/less/thelia/import.less index b18246f32..594ee91b3 100755 --- a/templates/default/assets/less/thelia/import.less +++ b/templates/default/assets/less/thelia/import.less @@ -30,5 +30,5 @@ // Thelia : Pages @import "page-home.less"; +@import "page-error.less"; //@import "page-login.less"; -//@import "page-error.less"; \ No newline at end of file diff --git a/templates/default/assets/less/thelia/page-error.less b/templates/default/assets/less/thelia/page-error.less new file mode 100755 index 000000000..8f5f1df72 --- /dev/null +++ b/templates/default/assets/less/thelia/page-error.less @@ -0,0 +1,15 @@ +// 404 Page +.page-404 { + .main { padding: 10px 0 100px; } + #main-label { + color: @brand-primary; + font-size: 9em; font-weight: bold; + text-align: center; + + span{ + color : #CCC; + display: block; + font-size: 15px; font-weight: normal; + } + } +} diff --git a/templates/default/assets/themes/default/less/theme.less b/templates/default/assets/themes/default/less/theme.less index f07461c56..b9e6689ef 100755 --- a/templates/default/assets/themes/default/less/theme.less +++ b/templates/default/assets/themes/default/less/theme.less @@ -25,6 +25,13 @@ body { padding-top: 80px; } } } +.has-error .help-block { + &:before { + .icon(@remove); + margin-right: .3em; + } +} + label { font-weight: 600; } // Dropdowns @@ -1045,6 +1052,7 @@ td.product, .fn { font-size: 16px; font-weight: 600; } .list-info { + .mobile, .tel, .email { &:before { @@ -1054,7 +1062,8 @@ td.product, vertical-align: middle; } } - .tel:before { .icon(@mobile-phone); font-size: 30px; } + .mobile:before { .icon(@mobile-phone); font-size: 30px; } + .tel:before { .icon(@phone); font-size: 22px; } .email:before { .icon(@envelope); font-size: 18px; } } .group-btn { diff --git a/templates/default/cart.html b/templates/default/cart.html index 00689bd3e..73cd57ddc 100644 --- a/templates/default/cart.html +++ b/templates/default/cart.html @@ -18,12 +18,7 @@ {nocache} {ifloop rel="cartloop"} - + {include file="misc/checkout-progress.tpl" step="cart"} @@ -49,7 +44,7 @@ {intl l="Qty"} @@ -105,7 +100,7 @@
      - {for $will=1 to $STOCK} {/for} @@ -163,16 +158,4 @@ {/ifloop}
      -{/block} - -{block name="javascript-initialization"} - {/block} \ No newline at end of file diff --git a/templates/default/contact.html b/templates/default/contact.html index 2b0c7e7a9..66fc784f6 100644 --- a/templates/default/contact.html +++ b/templates/default/contact.html @@ -25,12 +25,12 @@
      {form_field form=$form field="name"} -
      +
      - + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} {elseif $value != "" && !$error} @@ -39,44 +39,38 @@
      {/form_field} {form_field form=$form field="email"} -
      +
      - + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $value != "" && !$error} - {/if}
      {/form_field}
      {form_field form=$form field="subject"} -
      +
      - + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $value != "" && !$error} - {/if}
      {/form_field} {form_field form=$form field="message"} -
      +
      - + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $value != "" && !$error} - {/if}
      diff --git a/templates/default/includes/mini-cart.html b/templates/default/includes/mini-cart.html index b91f73d83..2858d535b 100644 --- a/templates/default/includes/mini-cart.html +++ b/templates/default/includes/mini-cart.html @@ -21,13 +21,12 @@ {$TITLE} {/loop} {/ifloop} -
      - + {intl l="Total"}

      {$TITLE}

      - Remove + {intl l="Remove"}
      {if $IS_PROMO == 1} diff --git a/templates/default/includes/toolbar.html b/templates/default/includes/toolbar.html index 33f5ba9e5..c512ba90a 100644 --- a/templates/default/includes/toolbar.html +++ b/templates/default/includes/toolbar.html @@ -30,8 +30,8 @@ {intl l="View as"}: - - + + @@ -42,9 +42,9 @@
        {if $product_page > 1} -
      • +
      • {else} -
      • +
      • {/if} {pageloop rel="product_list"} {if $PAGE != $CURRENT} @@ -54,9 +54,9 @@ {/if} {if $PAGE == $LAST} {if $CURRENT < $LAST} -
      • +
      • {else} -
      • +
      • {/if} {/if} diff --git a/templates/default/layout.tpl b/templates/default/layout.tpl index 2c485b0a2..d89694ab5 100644 --- a/templates/default/layout.tpl +++ b/templates/default/layout.tpl @@ -48,6 +48,12 @@ GNU General Public License : http://www.gnu.org/licenses/ {block name="stylesheet"}{/block} + {* Favicon *} + {images file='assets/img/favicon.ico'}{/images} + {images file='assets/img/favicon.png'}{/images} + + + {* HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries *} @@ -197,7 +193,7 @@ {form_field form=$form field='invoice-address'}
        -
        {intl l="Billing addres"}s
        +
        {intl l="Billing address"}s
        {if $error} {$message} diff --git a/templates/default/order-placed.html b/templates/default/order-placed.html index 6569beffc..4931896f5 100644 --- a/templates/default/order-placed.html +++ b/templates/default/order-placed.html @@ -1,5 +1,10 @@ {extends file="layout.tpl"} +{* Security *} +{block name="no-return-functions" prepend} + {check_auth context="front" role="CUSTOMER" login_tpl="login"} +{/block} + {* Body Class *} {block name="body-class"}page-order-payment{/block} @@ -18,18 +23,13 @@

        {intl l="Your Cart"}

        - + {include file="misc/checkout-progress.tpl" step="last"} {loop type="order" name="placed-order" id=$placed_order_id}
        -

        {intl l="You chose to pay by"} : {loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}

        +

        {intl l="You choose to pay by"} : {loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}

        {intl l="Thank you for the trust you place in us."}

        diff --git a/templates/default/password.html b/templates/default/password.html index f3fbcf046..2d562ed27 100644 --- a/templates/default/password.html +++ b/templates/default/password.html @@ -23,9 +23,9 @@
        - + {if $error} - {$message} + {$message} {elseif !$error && $value != ""} {intl l="You will receive a link to reset your password."} {/if} diff --git a/templates/default/register.html b/templates/default/register.html index 82c93e4ea..0fda003b0 100644 --- a/templates/default/register.html +++ b/templates/default/register.html @@ -32,7 +32,7 @@
        {form_field form=$form field="title"} -
        +
        {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} {elseif !$value} {assign var="error_focus" value="true"} - {elseif $value != "" && !$error} - {/if}
        {/form_field} {form_field form=$form field="firstname"} -
        +
        - + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $value != "" && !$error} - {/if}
        {/form_field} {form_field form=$form field="lastname"} -
        +
        - + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $value != "" && !$error} - {/if}
        {/form_field} {form_field form=$form field="email"} -
        +
        - + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $value != "" && !$error} - {/if}
        {/form_field} {form_field form=$form field="phone"} -
        +
        - + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $value != "" && !$error} - {/if}
        {/form_field} {form_field form=$form field="cellphone"} -
        +
        - + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $value != "" && !$error} - {/if}
        @@ -133,82 +121,72 @@
        {form_field form=$form field="company"} -
        +
        - + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $value != "" && !$error} - {/if}
        {/form_field} {form_field form=$form field="address1"} -
        +
        - + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $value != "" && !$error} - {/if}
        {/form_field} {form_field form=$form field="address2"} -
        +
        - + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $value != "" && !$error} - {/if}
        {/form_field} {form_field form=$form field="city"} -
        +
        - + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $value != "" && !$error} - {/if}
        {/form_field} {form_field form=$form field="zipcode"} -
        +
        - + {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $value != "" && !$error} - {/if}
        {/form_field} {form_field form=$form field="country"} -
        +
        {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $value != "" && !$error} - {/if}
        @@ -242,30 +218,26 @@
        {form_field form=$form field="password"} -
        +
        {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $value != "" && !$error} - {/if}
        {/form_field} {form_field form=$form field="password_confirm"} -
        +
        {if $error } - {$message} + {$message} {assign var="error_focus" value="true"} - {elseif $value != "" && !$error} - {/if}
        @@ -281,7 +253,7 @@ I've read and agreed on Terms & Conditions. {if $error } - {$message} + {$message} {/if}