protected function setItemSupplier(ApiItemInterface $item, ProductInterface $product)
    {
        $supplier = null;
        $supplierName = '';
        // Get products supplier.
        if ($product->getSupplier()) {
            $supplier = $product->getSupplier();
            $supplierName = $product->getSupplier()->getName();
        }
        $item->setSupplier($supplier);
        $item->setSupplierName($supplierName);
    }
protected function setItemSupplier(ApiItemInterface $item, ProductInterface $product)
    {
        $supplier = null;
        $supplierName = '';
        // Get products supplier.
        if ($product->getSupplier()) {
            $supplier = $product->getSupplier();
            $supplierName = $product->getSupplier()->getName();
        }
        $item->setSupplier($supplier);
        $item->setSupplierName($supplierName);
    }
protected function setItemSupplier ( ApiItemInterface $ item , ProductInterface $ product ) { $ supplier = null ; $ supplierName = '' ; // Get products supplier. if ( $ product -> getSupplier ( ) ) { $ supplier = $ product -> getSupplier ( ) ; $ supplierName = $ product -> getSupplier ( ) -> getName ( ) ; } $ item -> setSupplier ( $ supplier ) ; $ item -> setSupplierName ( $ supplierName ) ; }
Set supplier of an item.

@param ApiItemInterface $item
@param ProductInterface $product
Set supplier of an item .