Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product List Add To Cart - disable for static products with variants #53

Open
jrasmussen451 opened this issue Jul 27, 2016 · 1 comment
Labels

Comments

@jrasmussen451
Copy link
Contributor

Static products that have variants should be disallowed.

@jrasmussen451 jrasmussen451 self-assigned this Jul 27, 2016
@jrasmussen451
Copy link
Contributor Author

something like below in shortProductViewCtrl ... need to get the Product and Variant and then the VariantCount is the specifier (if its 0, then no variants).

four51.app.controller('shortProductViewCtrl', ['$routeParams', '$scope', 'ProductDisplayService', 'Order', 'User', '$location', '$route', function ($routeParams, $scope, ProductDisplayService) { ProductDisplayService.getProductAndVariant($scope.p.InteropID, null, function (data) { $scope.LineItem = {}; $scope.LineItem.Product = data.product; ProductDisplayService.setNewLineItemScope($scope); ProductDisplayService.setProductViewScope($scope); if($scope.$parent.itemsToAdd && $scope.LineItem.Product.Type == 'Static' && $scope.LineItem.Product.SpecCount == 0 && $scope.LineItem.Product.VariantCount == 0){ //VariantCount would be greater than 0 if there were variants $scope.$parent.itemsToAdd.push($scope.LineItem); } }, 1, 1, null); }]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant