From 1fb9c4877b38de6494410c1d930554c582462f51 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 6 May 2009 22:55:28 +0000 Subject: [PATCH] Prevent a possible logic problem in the Sku with shipsSeparately and isShippingRequired. --- lib/WebGUI/Asset/Sku.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/Asset/Sku.pm b/lib/WebGUI/Asset/Sku.pm index 29f43a0a0..f68e473e1 100644 --- a/lib/WebGUI/Asset/Sku.pm +++ b/lib/WebGUI/Asset/Sku.pm @@ -637,11 +637,14 @@ sub setTaxConfiguration { =head2 shipsSeparately Returns a boolean indicating whether this item must be shipped separately from other items. +If the shipsSeparately property is true, but isShippingRequired is false, this will return +false. =cut sub shipsSeparately { - return shift->get('shipsSeparately'); + my ($self) = @_; + return $self->isShippingRequired && $self->get('shipsSeparately'); }