Ver código fonte

[Frontend] Correctif originProduct

feature/export_comptable
Guillaume 4 anos atrás
pai
commit
9b4568e962
1 arquivos alterados com 11 adições e 0 exclusões
  1. +11
    -0
      ShopBundle/Model/ProductFamily.php

+ 11
- 0
ShopBundle/Model/ProductFamily.php Ver arquivo

@@ -791,4 +791,15 @@ abstract class ProductFamily extends AbstractDocumentEntity implements ProductPr

return $arrayProductsGroupByTitle;
}

public function getOriginProduct()
{
$products = $this->getProducts() ;

foreach($products as $product) {
if($product->getStatus() == 1 && $product->getOriginProduct()) {
return $product ;
}
}
}
}

Carregando…
Cancelar
Salvar