Browse Source

[Frontend] Correctif originProduct

feature/export_comptable
Guillaume 4 years ago
parent
commit
9b4568e962
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      ShopBundle/Model/ProductFamily.php

+ 11
- 0
ShopBundle/Model/ProductFamily.php View File

@@ -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 ;
}
}
}
}

Loading…
Cancel
Save