Example #1
0
 /**
  * Get related products based on the same parent product category.
  * @param \Jigoshop\Entity\Product $product
  *
  * @return array
  */
 protected function getRelated($product)
 {
     if (!$this->options->get('products.related')) {
         return array();
     }
     $count = $this->wp->applyFilters('jigoshop/frontend/page/product/render/related_products_count', 3);
     return $this->productService->findByQuery(ProductHelper::getRelated($product, $count));
 }