@@ 123-133 (lines=11) @@ | ||
120 | $absoluteMin = self::$default_min_quantity; |
|
121 | $absoluteMax = self::$default_max_quantity; |
|
122 | $parent = $buyable->Parent(); |
|
123 | if ($minFieldName) { |
|
124 | if (isset($buyable->$minFieldName) && $buyable->$minFieldName > 0) { |
|
125 | $absoluteMin = $buyable->$minFieldName; |
|
126 | } |
|
127 | //product variations |
|
128 | elseif (!isset($buyable->$minFieldName)) { |
|
129 | if ($parent && isset($parent->$minFieldName) && $parent->$minFieldName > 0) { |
|
130 | $absoluteMin = $parent->$minFieldName; |
|
131 | } |
|
132 | } |
|
133 | } |
|
134 | if ($maxFieldName) { |
|
135 | if (isset($buyable->$maxFieldName) && $buyable->$maxFieldName > 0) { |
|
136 | $absoluteMax = $buyable->$maxFieldName; |
|
@@ 134-144 (lines=11) @@ | ||
131 | } |
|
132 | } |
|
133 | } |
|
134 | if ($maxFieldName) { |
|
135 | if (isset($buyable->$maxFieldName) && $buyable->$maxFieldName > 0) { |
|
136 | $absoluteMax = $buyable->$maxFieldName; |
|
137 | } |
|
138 | //product variations |
|
139 | elseif (!isset($buyable->$maxFieldName)) { |
|
140 | if ($parent && isset($parent->$maxFieldName) && $parent->$maxFieldName > 0) { |
|
141 | $absoluteMax = $parent->$maxFieldName; |
|
142 | } |
|
143 | } |
|
144 | } |
|
145 | if ($buyable->UnlimitedStock) { |
|
146 | //nothing more to do |
|
147 | } elseif (self::$use_stock_quantities) { |