Pārlūkot izejas kodu

[Frontend] Correctif originProduct

feature/export_comptable
Guillaume pirms 4 gadiem
vecāks
revīzija
9b4568e962
1 mainītis faili ar 11 papildinājumiem un 0 dzēšanām
  1. +11
    -0
      ShopBundle/Model/ProductFamily.php

+ 11
- 0
ShopBundle/Model/ProductFamily.php Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt