diff --git a/.gitignore b/.gitignore index 92a6e2f14..9fee9bdd0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,8 @@ public/css/vendor *.iml public/css/app/style.css public/css/app/style.css.map -public/js/app/shared/app-config.js +public/js/app/shared/app-config. +public/js/app/shared/i18n/lang/*.json .idea coverage/ config/config.js diff --git a/Readme.md b/Readme.md index 46802fc53..6ef587419 100644 --- a/Readme.md +++ b/Readme.md @@ -50,7 +50,17 @@ This will launch a storefront for an existing project against the "prod" environ Now, let's create a new project for your specific site so that you can modify your store and product offering as you see fit. ### 1. Sign up for your a new store and configure it -If you haven't done so already, create a new storefront project and obtain subscriptions for the services. +If you haven't done so already, create a new storefront project and obtain subscriptions to all the commerce packages in order to enable and ensure that the storefront works end to end. +The commerce packages are: + +- **Cart** +- **Checkout** +- **Coupon Management** +- **Customer Accounts** +- **Order Management** +- **Product Content** +- **Site Management** + Follow the steps outlined in the [Dev Portal](https://devportal.yaas.io/gettingstarted/setupastorefront/index.html). ### 2. Replace the default project id in the code base with your own (see project adminstration settings in the Builder). diff --git a/bower.json b/bower.json index 58e39a400..7db45b86d 100644 --- a/bower.json +++ b/bower.json @@ -31,11 +31,12 @@ "angular-bootstrap": "~0.11.0", "angular-xeditable": "~0.1.8", "angular-directive.g-signin": "~0.1.2", - "angular-ui-select": "~0.8.2", + "angular-ui-select": "~0.13.2", "angular-sanitize": "~1.3.0", "angular-touch": "~1.3.0", "algoliasearch": "2.9.2", - "yamm3": "1.1.0" + "yamm3": "1.1.0", + "angular-ui-notification": "^0.2.0" }, "install": { "path": { diff --git a/config/karma.conf.js b/config/karma.conf.js index d9fe4e23f..e0b16c08d 100644 --- a/config/karma.conf.js +++ b/config/karma.conf.js @@ -27,6 +27,7 @@ module.exports = function(config){ 'public/js/vendor/angular-xeditable/dist/js/xeditable.js', 'public/js/vendor/angular-sanitize/angular-sanitize.js', 'public/js/vendor/angular-ui-select/dist/select.min.js', + 'public/js/vendor/angular-ui-notification/dist/angular-ui-notification.min.js', 'public/js/vendor/angular-directive.g-signin/google-plus-signin.js', 'public/js/vendor/algoliasearch/dist/algoliasearch.angular.js', @@ -65,6 +66,9 @@ module.exports = function(config){ 'public/js/app/shared/directives/y-inputs-dir.js', 'public/js/app/shared/directives/force-scroll.js', + 'public/js/app/shared/media/main-media-extractor.js', + 'public/js/app/shared/media/committed-media-filter.js', + 'public/js/app/home/home-index.js', 'public/js/app/home/controllers/home-ctrl.js', 'public/js/app/home/services/home-svc.js', @@ -83,9 +87,11 @@ module.exports = function(config){ 'public/js/app/cart/cart-index.js', 'public/js/app/cart/controllers/cart-ctrl.js', + 'public/js/app/cart/controllers/cart-note-mixin-ctrl.js', 'public/js/app/cart/directives/cart-auto-toggle.js', 'public/js/app/cart/services/cart-service.js', 'public/js/app/cart/services/cart-rest.js', + 'public/js/app/cart/services/cart-note-mixin-service.js', 'public/js/app/checkout/checkout-index.js', 'public/js/app/checkout/controllers/checkout-ctrl.js', diff --git a/manifest-demo.yml b/manifest-demo.yml index 5522f2cca..aae24ca10 100644 --- a/manifest-demo.yml +++ b/manifest-demo.yml @@ -2,7 +2,9 @@ applications: - name: teststore command: npm run-script multiProd - buildpack: https://github.com/ddollar/heroku-buildpack-multi.git + buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git memory: 1024M + disk_quota: 1024M + disk: 1024M instances: 1 path: dist/ \ No newline at end of file diff --git a/manifest-dev.yml b/manifest-dev.yml index 89e9a1401..d994aa05d 100644 --- a/manifest-dev.yml +++ b/manifest-dev.yml @@ -2,8 +2,10 @@ applications: - name: shops command: npm run-script multiTest - buildpack: https://github.com/ddollar/heroku-buildpack-multi.git + buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git memory: 1024M + disk_quota: 1024M + disk: 1024M host: shops domain: dev.cf.hybris.com instances: 1 diff --git a/manifest-stage.yml b/manifest-stage.yml index 8a32a237f..19864c78a 100644 --- a/manifest-stage.yml +++ b/manifest-stage.yml @@ -2,8 +2,10 @@ applications: - name: shops command: npm run-script multiStage - buildpack: https://github.com/ddollar/heroku-buildpack-multi.git + buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git memory: 1024M + disk_quota: 1024M + disk: 1024M host: shops domain: stage.yaas.io instances: 1 diff --git a/manifest-test.yml b/manifest-test.yml index 6b3c69b81..cb39ade35 100644 --- a/manifest-test.yml +++ b/manifest-test.yml @@ -2,7 +2,9 @@ applications: - name: bsdtestproject command: npm run-script startServer - buildpack: https://github.com/ddollar/heroku-buildpack-multi.git + buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git memory: 1024M + disk_quota: 1024M + disk: 1024M instances: 1 path: dist/ \ No newline at end of file diff --git a/manifest.yml b/manifest.yml index 5b1c91165..75482a442 100644 --- a/manifest.yml +++ b/manifest.yml @@ -2,7 +2,9 @@ applications: - name: shops-green command: npm run-script multiProd - buildpack: https://github.com/ddollar/heroku-buildpack-multi.git + buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git memory: 1024M + disk_quota: 1024M + disk: 1024M instances: 1 path: dist \ No newline at end of file diff --git a/package.json b/package.json index 8e0abb2b4..140c957e4 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,9 @@ "bower": "latest", "compression": "1.4.1", "express": "~4.4.2", - "grunt": "latest", + "grunt": "0.4.5", "grunt-angular-templates": "0.5.7", - "grunt-cli": "latest", + "grunt-cli": "1.2.0", "grunt-concurrent": "~0.4.3", "grunt-contrib-clean": "~0.5.0", "grunt-contrib-compass": "~0.7.2", @@ -53,7 +53,6 @@ "jade": "~1.3.1", "load-grunt-tasks": "~0.2.0", "request": "~2.36.0" - }, "devDependencies": { "grunt-contrib-watch": "^0.5.3", diff --git a/public/img/fb_signInLogo-mobile.png b/public/img/fb_signInLogo-mobile.png new file mode 100644 index 000000000..e62e6b33e Binary files /dev/null and b/public/img/fb_signInLogo-mobile.png differ diff --git a/public/img/g_signInLogo-mobile.png b/public/img/g_signInLogo-mobile.png new file mode 100644 index 000000000..0cdc9a506 Binary files /dev/null and b/public/img/g_signInLogo-mobile.png differ diff --git a/public/img/g+_signInLogo.png b/public/img/g_signInLogo.png similarity index 100% rename from public/img/g+_signInLogo.png rename to public/img/g_signInLogo.png diff --git a/public/index.html b/public/index.html index 1ba5ce836..38d07e4dd 100644 --- a/public/index.html +++ b/public/index.html @@ -10,6 +10,7 @@ + @@ -56,6 +57,7 @@ + @@ -63,6 +65,7 @@ + @@ -95,6 +98,10 @@ + + + + @@ -116,9 +123,11 @@ + + @@ -146,6 +155,7 @@ + diff --git a/public/js/app/account/controllers/change-email-confirmation-ctrl.js b/public/js/app/account/controllers/change-email-confirmation-ctrl.js new file mode 100644 index 000000000..c76e2eaf2 --- /dev/null +++ b/public/js/app/account/controllers/change-email-confirmation-ctrl.js @@ -0,0 +1,35 @@ +/** + * [y] hybris Platform + * + * Copyright (c) 2000-2016 hybris AG + * All rights reserved. + * + * This software is the confidential and proprietary information of hybris + * ("Confidential Information"). You shall not disclose such Confidential + * Information and shall use it only in accordance with the terms of the + * license agreement you entered into with hybris. + */ + +'use strict'; + +angular.module('ds.account') + .controller('ChangeEmailConfirmationCtrl', ['$scope', '$stateParams', 'AccountSvc', 'AuthSvc', '$translate', + function ($scope, $stateParams, AccountSvc, AuthSvc, $translate) { + + $scope.token = $stateParams.token; + $scope.confirmed = false; + + AccountSvc.confirmEmailUpdate($scope.token) + .then(function () { + + //Sign out user + AuthSvc.signOut(); + + //Message that email is changed successfully + $scope.confirmed = true; + }, function (error) { + console.log(error); + //Message that there is error, and to try again or etc? + $scope.error = $translate.instant('EDIT_EMAIL_SOMETHING_WENT_WRONG'); + }); + }]); \ No newline at end of file diff --git a/public/js/app/account/controllers/modals/edit-user-email-dialog-ctrl.js b/public/js/app/account/controllers/modals/edit-user-email-dialog-ctrl.js index 6544bbe17..42f16a4b9 100644 --- a/public/js/app/account/controllers/modals/edit-user-email-dialog-ctrl.js +++ b/public/js/app/account/controllers/modals/edit-user-email-dialog-ctrl.js @@ -14,22 +14,40 @@ 'use strict'; angular.module('ds.account') - .controller('EditUserEmailDialogCtrl', ['$scope', 'account', 'AccountSvc', '$modalInstance', - function ($scope, account, AccountSvc, $modalInstance) { + .controller('EditUserEmailDialogCtrl', ['$scope', 'account', 'AccountSvc', '$modalInstance', '$translate', + function ($scope, account, AccountSvc, $modalInstance, $translate) { - $scope.account = angular.copy(account); + $scope.account = account; + $scope.error = ''; + $scope.step = 1; $scope.closeEditUserDialog = function () { $modalInstance.dismiss('cancel'); }; $scope.updateUserInfo = function () { - var account = angular.copy($scope.account); + + //Force sync of email address + $scope.account.syncContactEmail = true; - AccountSvc.updateAccount(account).then(function () { - $modalInstance.close(account); + AccountSvc.updateEmail($scope.account).then(function () { + $scope.step = 2; + }, function (error) { + if (error.status === 401) { + $scope.error = $translate.instant('EDIT_EMAIL_PASSWORD_NOT_CORRECT'); + } + else if(error.status === 409) { + $scope.error = $translate.instant('EDIT_EMAIL_ALREADY_IN_USE'); + } + else { + $scope.error = $translate.instant('EDIT_EMAIL_SOMETHING_WENT_WRONG'); + } }); }; + $scope.confirm = function () { + $modalInstance.close($scope.account); + }; + }]); })(); \ No newline at end of file diff --git a/public/js/app/account/directives/customer-details/customer-details-ctrl.js b/public/js/app/account/directives/customer-details/customer-details-ctrl.js index defd727e5..3acdfc05e 100644 --- a/public/js/app/account/directives/customer-details/customer-details-ctrl.js +++ b/public/js/app/account/directives/customer-details/customer-details-ctrl.js @@ -37,19 +37,17 @@ }; $scope.editUserEmail = function (account) { - $scope.modalInstance = $modal.open({ + + $modal.open({ templateUrl: 'js/app/account/templates/modals/edit-user-email-dialog.html', controller: 'EditUserEmailDialogCtrl', resolve: { account: function () { - return account; + return { + email: account.contactEmail + }; } - }, - backdrop: 'static' - }); - - $scope.modalInstance.result.then(function (result) { - $scope.account = result; + } }); }; diff --git a/public/js/app/account/directives/customer-details/customer-details.html b/public/js/app/account/directives/customer-details/customer-details.html index d8c47f7e1..c1ad122d8 100644 --- a/public/js/app/account/directives/customer-details/customer-details.html +++ b/public/js/app/account/directives/customer-details/customer-details.html @@ -31,7 +31,7 @@
{{'EDIT_EMAIL_CHANGED_MSG'|translate}}
+ ++ {{'EDIT_EMAIL_CHANGE_FAILED'|translate}} +
+Or
-