Sfoglia il codice sorgente

[Frontend] Correctif originProduct

feature/export_comptable
Guillaume 4 anni fa
parent
commit
9b4568e962
1 ha cambiato i file con 11 aggiunte e 0 eliminazioni
  1. +11
    -0
      ShopBundle/Model/ProductFamily.php

+ 11
- 0
ShopBundle/Model/ProductFamily.php Vedi 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…
Annulla
Salva