Skip to content

Instantly share code, notes, and snippets.

@mattmutt
Created May 13, 2016 23:51
Show Gist options
  • Save mattmutt/f838143a94e1e2b6b3b89e9ab39c88ba to your computer and use it in GitHub Desktop.
Save mattmutt/f838143a94e1e2b6b3b89e9ab39c88ba to your computer and use it in GitHub Desktop.
public function hasOrderItemMailingServicesOverlayCapability($item, $printGroupId)
{
$checkForProductMailingService = $item->getProduct()->getProductOptionValueByName(OptionValue::NAME_MAILING_SERVICE);
return ($this->params['addressCount'] > 0 && !empty(MailingListLegacy::getInfo($printGroupId)) &&
!empty($checkForProductMailingService && $checkForProductMailingService->getConfig()) &&
$item->getSides() === 2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment