Open jrasmussen451 opened 8 years ago
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); }]);
Static products that have variants should be disallowed.