private function performValidationOnAttributeGroups() { if (!$this->attributeGroups and !$this->product->hasActiveAttributeGroups()) { $this->valid(); return; } }
private function checkProductHasNoActiveAttributeGroupsWhenInputHasNone() { if (!$this->attributeOption and $this->product->hasActiveAttributeGroups()) { $this->setErrorMessage('请选择需要购买商品的属性'); return false; } return true; }